Bug 111058 - [PATCH] 'stop playing after this song' for radio streams
Summary: [PATCH] 'stop playing after this song' for radio streams
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.3
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-19 08:34 UTC by Dominik Karall
Modified: 2006-11-05 21:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch that enables stop after song in streams... A minor bug there is, it shows OSD for next track, too, but I couldn't find very clean way to prevent that from happening... And it barely matters. (972 bytes, patch)
2006-11-04 00:20 UTC, Tuomas Nurmi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Karall 2005-08-19 08:34:06 UTC
Version:           1.3 (using KDE KDE 3.4.2)
Installed from:    Gentoo Packages
OS:                Linux

It would be cool to have this feature in amarok too. If the radio stream changes the title of the song, amarok should stop playing if 'stop playing after this song' was selected.
Cause when I'm using a script to stop amarok at a special time, I don't like to stop a song in the middle, so I set the 'stop playing after...' option and it works great, but as this does not work with radio streams, it wouldn't stop playing.

dominik
Comment 1 Tuomas Nurmi 2006-11-04 00:20:18 UTC
Created attachment 18390 [details]
Patch that enables stop after song in streams... A minor bug there is, it shows OSD for next track, too, but I couldn't find very clean way to prevent that from happening... And it barely matters.
Comment 2 Alexandre Oliveira 2006-11-05 21:59:39 UTC
SVN commit 602384 by aoliveira:

Stop after current works for streams. Patch by Tuomas Nurmi <tnurmi@edu.kauhajoki.fi>
BUG: 111058


 M  +3 -2      playlist.cpp  


--- trunk/extragear/multimedia/amarok/src/playlist.cpp #602383:602384
@@ -2224,11 +2224,12 @@
     {
         if ( m_currentTrack && !trackChanged ) {
             //if the track hasn't changed then this is a meta-data update
-
+            if( stopAfterMode() == StopAfterCurrent )
+                Playlist::instance()->playNextTrack( true );
             //this is a hack, I repeat a hack! FIXME FIXME
             //we do it because often the stream title is from the pls file and is informative
             //we don't want to lose it when we get the meta data
-            if ( m_currentTrack->artist().isEmpty() ) {
+            else if ( m_currentTrack->artist().isEmpty() ) {
                 QString comment = m_currentTrack->title();
                 m_currentTrack->copyFrom( bundle );
                 m_currentTrack->setComment( comment );