summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayer.cpp
authorllornkcor <llornkcor>2002-08-03 11:26:12 (UTC)
committer llornkcor <llornkcor>2002-08-03 11:26:12 (UTC)
commit3b1ab71b7bfe42310661764e1089200290c7b817 (patch) (side-by-side diff)
tree361ad970ec2f4c06bd7d9cc1a94b45040539f844 /noncore/multimedia/opieplayer2/mediaplayer.cpp
parent7d4b246bc728b73e9d38e110619222dd89c1fd1c (diff)
downloadopie-3b1ab71b7bfe42310661764e1089200290c7b817.zip
opie-3b1ab71b7bfe42310661764e1089200290c7b817.tar.gz
opie-3b1ab71b7bfe42310661764e1089200290c7b817.tar.bz2
initial fx for time readout
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp22
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
@@ -71,10 +71,28 @@ void MediaPlayer::setPlaying( bool play ) {
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( ) );
+
}