summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 8136ff1..6a38adc 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -86,25 +86,25 @@ void MediaPlayer::play() {
86 86
87void MediaPlayer::setPlaying( bool play ) { 87void MediaPlayer::setPlaying( bool play ) {
88 if ( !play ) { 88 if ( !play ) {
89 return; 89 return;
90 } 90 }
91 91
92 if ( mediaPlayerState->isPaused() ) { 92 if ( mediaPlayerState->isPaused() ) {
93 mediaPlayerState->setPaused( FALSE ); 93 mediaPlayerState->setPaused( FALSE );
94 return; 94 return;
95 } 95 }
96 96
97 QString tickerText, time, fileName; 97 QString tickerText, time, fileName;
98 if( playList->whichList() == 0 ) { //check for filelist 98 if( playList->currentTab() == PlayListWidget::CurrentPlayList ) { //check for filelist
99 const DocLnk *playListCurrent = playList->current(); 99 const DocLnk *playListCurrent = playList->current();
100 if ( playListCurrent != NULL ) { 100 if ( playListCurrent != NULL ) {
101 currentFile = playListCurrent; 101 currentFile = playListCurrent;
102 } 102 }
103 xineControl->play( currentFile->file() ); 103 xineControl->play( currentFile->file() );
104 fileName = currentFile->name(); 104 fileName = currentFile->name();
105 long seconds = mediaPlayerState->length();// 105 long seconds = mediaPlayerState->length();//
106 time.sprintf("%li:%02i", seconds/60, (int)seconds%60 ); 106 time.sprintf("%li:%02i", seconds/60, (int)seconds%60 );
107 //qDebug(time); 107 //qDebug(time);
108 108
109 } else { 109 } else {
110 //if playing in file list.. play in a different way 110 //if playing in file list.. play in a different way
@@ -138,41 +138,41 @@ void MediaPlayer::setPlaying( bool play ) {
138 } else { 138 } else {
139 if ( xineControl->getMetaInfo().isEmpty() ) { 139 if ( xineControl->getMetaInfo().isEmpty() ) {
140 tickerText = tr( " File: " ) + fileName + tr( ", Length: " ) + time + " "; 140 tickerText = tr( " File: " ) + fileName + tr( ", Length: " ) + time + " ";
141 } else { 141 } else {
142 tickerText = xineControl->getMetaInfo() + " Length: " + time + " "; 142 tickerText = xineControl->getMetaInfo() + " Length: " + time + " ";
143 } 143 }
144 } 144 }
145 audioUI->setTickerText( tickerText ); 145 audioUI->setTickerText( tickerText );
146} 146}
147 147
148 148
149void MediaPlayer::prev() { 149void MediaPlayer::prev() {
150 if( playList->whichList() == 0 ) { //if using the playlist 150 if( playList->currentTab() == PlayListWidget::CurrentPlayList ) { //if using the playlist
151 if ( playList->prev() ) { 151 if ( playList->prev() ) {
152 play(); 152 play();
153 } else if ( mediaPlayerState->isLooping() ) { 153 } else if ( mediaPlayerState->isLooping() ) {
154 if ( playList->last() ) { 154 if ( playList->last() ) {
155 play(); 155 play();
156 } 156 }
157 } else { 157 } else {
158 mediaPlayerState->setList(); 158 mediaPlayerState->setList();
159 } 159 }
160 } 160 }
161} 161}
162 162
163 163
164void MediaPlayer::next() { 164void MediaPlayer::next() {
165 165
166 if(playList->whichList() == 0) { //if using the playlist 166 if(playList->currentTab() == PlayListWidget::CurrentPlayList) { //if using the playlist
167 if ( playList->next() ) { 167 if ( playList->next() ) {
168 play(); 168 play();
169 } else if ( mediaPlayerState->isLooping() ) { 169 } else if ( mediaPlayerState->isLooping() ) {
170 if ( playList->first() ) { 170 if ( playList->first() ) {
171 play(); 171 play();
172 } 172 }
173 } else { 173 } else {
174 mediaPlayerState->setList(); 174 mediaPlayerState->setList();
175 } 175 }
176 } else { //if playing from file list, let's just stop 176 } else { //if playing from file list, let's just stop
177 qDebug("<<<<<<<<<<<<<<<<<stop for filelists"); 177 qDebug("<<<<<<<<<<<<<<<<<stop for filelists");
178 mediaPlayerState->setPlaying(false); 178 mediaPlayerState->setPlaying(false);