summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -74,49 +74,49 @@ MediaPlayer::~MediaPlayer() {
}
void MediaPlayer::pauseCheck( bool b ) {
if ( b && !mediaPlayerState->isPlaying() ) {
mediaPlayerState->setPaused( FALSE );
}
}
void MediaPlayer::play() {
mediaPlayerState->setPlaying( FALSE );
mediaPlayerState->setPlaying( TRUE );
}
void MediaPlayer::setPlaying( bool play ) {
if ( !play ) {
return;
}
if ( mediaPlayerState->isPaused() ) {
mediaPlayerState->setPaused( FALSE );
return;
}
QString tickerText, time, fileName;
- if( playList->whichList() == 0 ) { //check for filelist
+ if( playList->currentTab() == PlayListWidget::CurrentPlayList ) { //check for filelist
const DocLnk *playListCurrent = playList->current();
if ( playListCurrent != NULL ) {
currentFile = playListCurrent;
}
xineControl->play( currentFile->file() );
fileName = currentFile->name();
long seconds = mediaPlayerState->length();//
time.sprintf("%li:%02i", seconds/60, (int)seconds%60 );
//qDebug(time);
} else {
//if playing in file list.. play in a different way
// random and looping settings enabled causes problems here,
// since there is no selected file in the playlist, but a selected file in the file list,
// so we remember and shutoff
l = mediaPlayerState->isLooping();
if(l) {
mediaPlayerState->setLooping( false );
}
r = mediaPlayerState->isShuffled();
mediaPlayerState->setShuffled( false );
fileName = playList->currentFileListPathName();
xineControl->play( fileName );
@@ -126,65 +126,65 @@ void MediaPlayer::setPlaying( bool play ) {
if( fileName.left(4) != "http" ) {
fileName = QFileInfo( fileName ).baseName();
}
}
if( fileName.left(4) == "http" ) {
if ( xineControl->getMetaInfo().isEmpty() ) {
tickerText = tr( " File: " ) + fileName;
} else {
tickerText = xineControl->getMetaInfo();
}
} else {
if ( xineControl->getMetaInfo().isEmpty() ) {
tickerText = tr( " File: " ) + fileName + tr( ", Length: " ) + time + " ";
} else {
tickerText = xineControl->getMetaInfo() + " Length: " + time + " ";
}
}
audioUI->setTickerText( tickerText );
}
void MediaPlayer::prev() {
- if( playList->whichList() == 0 ) { //if using the playlist
+ if( playList->currentTab() == PlayListWidget::CurrentPlayList ) { //if using the playlist
if ( playList->prev() ) {
play();
} else if ( mediaPlayerState->isLooping() ) {
if ( playList->last() ) {
play();
}
} else {
mediaPlayerState->setList();
}
}
}
void MediaPlayer::next() {
- if(playList->whichList() == 0) { //if using the playlist
+ if(playList->currentTab() == PlayListWidget::CurrentPlayList) { //if using the playlist
if ( playList->next() ) {
play();
} else if ( mediaPlayerState->isLooping() ) {
if ( playList->first() ) {
play();
}
} else {
mediaPlayerState->setList();
}
} else { //if playing from file list, let's just stop
qDebug("<<<<<<<<<<<<<<<<<stop for filelists");
mediaPlayerState->setPlaying(false);
mediaPlayerState->setView('l');
if(l) mediaPlayerState->setLooping(l);
if(r) mediaPlayerState->setShuffled(r);
}
qApp->processEvents();
}
void MediaPlayer::startDecreasingVolume() {
volumeDirection = -1;
startTimer( 100 );
volControl->decVol(2);