summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayer.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp20
1 files changed, 19 insertions, 1 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
@@ -63,27 +63,45 @@ void MediaPlayer::setPlaying( bool play ) {
63 } 63 }
64 64
65 if ( mediaPlayerState->paused() ) { 65 if ( mediaPlayerState->paused() ) {
66 mediaPlayerState->setPaused( FALSE ); 66 mediaPlayerState->setPaused( FALSE );
67 return; 67 return;
68 } 68 }
69 69
70 const DocLnk *playListCurrent = playList->current(); 70 const DocLnk *playListCurrent = playList->current();
71 if ( playListCurrent != NULL ) { 71 if ( playListCurrent != NULL ) {
72 currentFile = playListCurrent; 72 currentFile = playListCurrent;
73 } 73 }
74 74
75 xineControl->play( currentFile->file() );
76
77 xineControl->length();
78 long seconds = mediaPlayerState->length();//
79 QString time; time.sprintf("%li:%02i", seconds/60, (int)seconds%60 );
80 qDebug(time);
81
82 QString tickerText;
83 if( currentFile->file().left(4) == "http" )
84 tickerText= tr( " File: " ) + currentFile->name();
85 else
86 tickerText = tr( " File: " ) + currentFile->name() + tr(", Length: ") + time;
87
88// QString fileInfo = mediaPlayerState->curDecoder()->fileInfo();
89
90// if ( !fileInfo.isEmpty() )
91// tickerText += ", " + fileInfo;
92// audioUI->setTickerText( tickerText + "." );
93
75 audioUI->setTickerText( currentFile->file( ) ); 94 audioUI->setTickerText( currentFile->file( ) );
76 95
77 xineControl->play( currentFile->file() );
78} 96}
79 97
80 98
81void MediaPlayer::prev() { 99void MediaPlayer::prev() {
82 if ( playList->prev() ) { 100 if ( playList->prev() ) {
83 play(); 101 play();
84 } else if ( mediaPlayerState->looping() ) { 102 } else if ( mediaPlayerState->looping() ) {
85 if ( playList->last() ) { 103 if ( playList->last() ) {
86 play(); 104 play();
87 } 105 }
88 } else { 106 } else {
89 mediaPlayerState->setList(); 107 mediaPlayerState->setList();