[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeextragear-1/amarok/src
From:       Stefan Bogner <bochi () online ! ms>
Date:       2004-09-05 23:55:58
Message-ID: 20040905235558.48BD024FF () office ! kde ! org
[Download RAW message or body]

CVS commit by bochi: 

make covermanager use artist.id-album.id for saving as well


  M +6 -4      covermanager.cpp   1.44


--- kdeextragear-1/amarok/src/covermanager.cpp  #1.43:1.44
@@ -547,8 +547,10 @@ void CoverViewItem::updateCover( const Q
 QString CoverViewItem::albumPath()
 {
-    QString fileName( QFile::encodeName( m_artist + " - " + m_album ) );
-    fileName.replace( " ", "_" ).replace( "?", "" ).replace( "/", "_" ).append( \
".png" ); +    CollectionDB *db = new CollectionDB();
+    uint artistid = db->getValueID( "artist", m_artist, false );
+    uint albumid = db->getValueID( "album", m_album, false );
+    QString fileName( QString::number( artistid ) + "-" + QString::number( albumid ) \
+ ".png" );  
-    return KGlobal::dirs()->saveLocation( "data", kapp->instanceName() + '/' ) + \
"albumcovers/"+fileName.lower(); +    return KGlobal::dirs()->saveLocation( "data", \
kapp->instanceName() + '/' ) + "albumcovers/" + fileName;  }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic