Bug 139711 - Add the ability to mark podcasts as unlistened
Summary: Add the ability to mark podcasts as unlistened
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-07 05:00 UTC by Everett Attebury
Modified: 2007-01-08 22:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Everett Attebury 2007-01-07 05:00:31 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Debian testing/unstable Packages
OS:                Linux

It would be nice to be able to mark individual and entire podcasts as unlistened, in case it was either accidentally marked as listened, or if the user wanted to re-listen to an entire podcast feed and keep track of their progress.
Comment 1 Alexandre Oliveira 2007-01-08 22:18:38 UTC
SVN commit 621476 by aoliveira:

Let users set podcasts as new
BUG: 139711


 M  +17 -3     playlistbrowseritem.cpp  


--- trunk/extragear/multimedia/amarok/src/playlistbrowseritem.cpp #621475:621476
@@ -2275,7 +2275,7 @@
 {
     KPopupMenu menu( listView() );
 
-    enum Actions { LOAD, APPEND, QUEUE, DELETE, RESCAN, LISTENED, CONFIG };
+    enum Actions { LOAD, APPEND, QUEUE, DELETE, RESCAN, LISTENED, NEW, CONFIG };
 
     menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD );
     menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
@@ -2284,6 +2284,7 @@
     menu.insertItem( SmallIconSet( Amarok::icon( "remove" ) ), i18n( "&Delete" ), DELETE );
     menu.insertItem( SmallIconSet( Amarok::icon( "refresh" ) ), i18n( "&Check for Updates" ), RESCAN );
     menu.insertItem( SmallIconSet( Amarok::icon( "artist" ) ), i18n( "Mark as &Listened" ), LISTENED );
+    menu.insertItem( SmallIconSet( Amarok::icon( "artist" ) ), i18n( "Mark as &New" ), NEW );
     menu.insertItem( SmallIconSet( Amarok::icon( "configure" ) ), i18n( "&Configure..." ), CONFIG );
     menu.setItemEnabled( LISTENED, hasNew() );
     menu.setItemEnabled( CONFIG, m_settingsValid );
@@ -2310,6 +2311,9 @@
             setListened();
             break;
 
+        case NEW:
+            setListened(false);
+            break;
         case DELETE:
             PlaylistBrowser::instance()->removeSelectedItems();
             break;
@@ -2793,7 +2797,7 @@
 {
     KPopupMenu menu( listView() );
 
-    enum Actions { LOAD, APPEND, QUEUE, GET, ASSOCIATE, DELETE, MEDIA_DEVICE, LISTENED, OPEN_WITH /* has to be last */ };
+    enum Actions { LOAD, APPEND, QUEUE, GET, ASSOCIATE, DELETE, MEDIA_DEVICE, LISTENED, NEW, OPEN_WITH /* has to be last */ };
     menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD );
     menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
     menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), QUEUE );
@@ -2838,12 +2842,14 @@
     menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Download Media" ), GET );
     menu.insertItem( SmallIconSet( Amarok::icon( "attach" ) ), i18n( "&Associate with Local File" ), ASSOCIATE );
     menu.insertItem( SmallIconSet( Amarok::icon( "artist" ) ),   i18n( "Mark as &Listened" ),  LISTENED );
+    menu.insertItem( SmallIconSet( Amarok::icon( "artist" ) ),   i18n( "Mark as &New" ),  NEW );
     menu.insertItem( SmallIconSet( Amarok::icon("remove") ), i18n( "De&lete Downloaded Podcast" ), DELETE );
 
     menu.setItemEnabled( GET, !isOnDisk() );
     menu.setItemEnabled( ASSOCIATE, !isOnDisk() );
     menu.setItemEnabled( DELETE, isOnDisk() );
-    menu.setItemEnabled( LISTENED, isNew() );
+    menu.setItemVisible( LISTENED, isNew() );
+    menu.setItemVisible( NEW, !isNew() );
 
     uint id = menu.exec( position );
     switch( id )
@@ -2880,6 +2886,14 @@
             }
             break;
 
+        case NEW:
+            for ( QListViewItemIterator it( listView(), QListViewItemIterator::Selected); *it; ++it )
+            {
+                if ( isPodcastEpisode( *it ) )
+                    static_cast<PodcastEpisode*>(*it)->setListened(false);
+            }
+            break;
+
         case MEDIA_DEVICE:
             // tags on podcasts are sometimes bad, thus use other meta information if available
             if( isSelected() )