Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 13cc4ed..5411a64 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -62,28 +62,46 @@ void MediaPlayer::setPlaying( bool play ) { return; } if ( mediaPlayerState->paused() ) { mediaPlayerState->setPaused( FALSE ); return; } const DocLnk *playListCurrent = playList->current(); if ( playListCurrent != NULL ) { currentFile = playListCurrent; } + + xineControl->play( currentFile->file() ); - audioUI->setTickerText( currentFile->file( ) ); + xineControl->length(); + long seconds = mediaPlayerState->length();// + QString time; time.sprintf("%li:%02i", seconds/60, (int)seconds%60 ); + qDebug(time); - xineControl->play( currentFile->file() ); + QString tickerText; + if( currentFile->file().left(4) == "http" ) + tickerText= tr( " File: " ) + currentFile->name(); + else + tickerText = tr( " File: " ) + currentFile->name() + tr(", Length: ") + time; + +// QString fileInfo = mediaPlayerState->curDecoder()->fileInfo(); + +// if ( !fileInfo.isEmpty() ) +// tickerText += ", " + fileInfo; +// audioUI->setTickerText( tickerText + "." ); + + audioUI->setTickerText( currentFile->file( ) ); + } void MediaPlayer::prev() { if ( playList->prev() ) { play(); } else if ( mediaPlayerState->looping() ) { if ( playList->last() ) { play(); } } else { mediaPlayerState->setList(); |