Bug 127462 - amarok allows setting of cover image for unknown albums, but does not display it
Summary: amarok allows setting of cover image for unknown albums, but does not display it
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 19:47 UTC by richlv
Modified: 2007-01-14 18:55 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 richlv 2006-05-16 19:47:20 UTC
Version:           svn revision 541449 (using KDE KDE 3.5.2)
Installed from:    Slackware Packages
OS:                Linux

amarok allows setting of cover image for unknown albums, but does not display it in context browser, tooltip or other places.

maybe cover setting for unknown albums should not be allowed at all, unless album is explicitly named "unknown" ?
Comment 1 Tobias Knieper 2007-01-14 18:55:36 UTC
SVN commit 623397 by tknieper:

Deactivate setting covers for unknown albums. They result in covers 
md5sumed over the artist only. Context browser doesn't display them 
reliable.

BUG: 127462
 


 M  +5 -4      collectionbrowser.cpp  
 M  +4 -1      coverfetcher.cpp  


--- trunk/extragear/multimedia/amarok/src/collectionbrowser.cpp #623396:623397
@@ -1420,8 +1420,10 @@
                        COMPILATION_SET, COMPILATION_UNSET, ORGANIZE, DELETE, TRASH,
                        FILE_MENU };
 
+        QString trueItemText = getTrueItemText( cat, item );
         KURL::List selection = listSelected();
         QStringList siblingSelection = listSelectedSiblingsOf( cat, item );
+
         menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), MAKE );
         menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
         menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), selection.count() == 1 ? i18n( "&Queue Track" )
@@ -1472,6 +1474,8 @@
             #ifndef AMAZON_SUPPORT
             menu.setItemEnabled( FETCH, false );
             #endif
+            if( trueItemText.isEmpty() ) // disable cover fetch for unknown albums
+                menu.setItemEnabled( FETCH, false );
         }
 
         if ( ( (cat == IdAlbum || cat == IdVisYearAlbum) && siblingSelection.count() > 0 ) //album
@@ -1488,8 +1492,6 @@
             , i18n( "Edit Track &Information...",  "Edit &Information for %n Tracks...", selection.count())
             , this, SLOT( showTrackInfo() ), 0, INFO );
 
-        QString trueItemText = getTrueItemText( cat, item );
-
         switch( menu.exec( point ) )
         {
             case APPEND:
@@ -2205,8 +2207,7 @@
         {
             trueItemText = getTrueItemText( cat, item );
             //debug() << "selected item: " << trueItemText << endl;
-            if( !trueItemText.isEmpty() ) // filter out "Unknown"
-                list << trueItemText;
+            list << trueItemText;
         }
         item = item->itemBelow();
     }
--- trunk/extragear/multimedia/amarok/src/coverfetcher.cpp #623396:623397
@@ -45,6 +45,9 @@
         menu.insertItem( SmallIconSet( Amarok::icon( "zoom" ) ), i18n( "&Show Fullsize" ), SHOW );
         menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).arg( CoverManager::amazonTld() ), FETCH );
         menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "Set &Custom Cover" ), CUSTOM );
+        bool disable = !album.isEmpty(); // disable setting covers for unknown albums
+        menu.setItemEnabled( FETCH, disable );
+        menu.setItemEnabled( CUSTOM, disable );
         menu.insertSeparator();
 
         menu.insertItem( SmallIconSet( Amarok::icon( "remove" ) ), i18n( "&Unset Cover" ), DELETE );
@@ -55,7 +58,7 @@
         #ifndef AMAZON_SUPPORT
         menu.setItemEnabled( FETCH, false );
         #endif
-        bool disable = !CollectionDB::instance()->albumImage( artist, album, 0 ).contains( "nocover" );
+        disable = !CollectionDB::instance()->albumImage( artist, album, 0 ).contains( "nocover" );
         menu.setItemEnabled( SHOW, disable );
         menu.setItemEnabled( DELETE, disable );