[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-1/amarok
From: Mark Kretschmann <markey () web ! de>
Date: 2005-04-21 8:42:00
Message-ID: 20050421084200.50F46496 () office ! kde ! org
[Download RAW message or body]
CVS commit by markey:
Patch from Christian Loose <christian.loose@hamburg.de>:
Re-enabled support for reading embedded cover images from ID3 tags.
CCBUG: 88492
M +2 -1 ChangeLog 1.617
M +9 -19 src/collectiondb.cpp 1.325
--- kdeextragear-1/amarok/ChangeLog #1.616:1.617
@@ -6,4 +6,5 @@
VERSION 1.3-beta1:
FEATURES:
+ * Support for reading embedded images from the ID3 tag. (BR 88492)
* Wikipedia tab in ContextBrowser allows for artist biography retrieval
and more!
@@ -24,5 +25,5 @@
CHANGES:
- * Add a label (with shortcut) to the Playlist filter
+ * Add a label (with shortcut) to the Playlist filter.
BUGFIXES:
--- kdeextragear-1/amarok/src/collectiondb.cpp #1.324:1.325
@@ -733,8 +733,4 @@ CollectionDB::findImageByMetabundle( Met
Q_UNUSED( width );
- // Deactived because TagLib (1.3.1) crashes frequently with this stuff
-
- #if 0
-
QCString widthKey = makeWidthKey( width );
QCString tagKey = md5sum( trackInformation.url().path(), \
trackInformation.artist() ); //what's more unique than the file name? @@ -764,19 \
+760,11 @@ CollectionDB::findImageByMetabundle( Met
debug() << "Size of image: " << imgVector.size() << " byte" << \
endl;
- QByteArray imgData;
- const char *tempCString = imgVector.data();
-
- // is there a better way to do this?
- imgData.setRawData ( tempCString , imgVector.size() );
- QImage image = QImage( imgData );
-
- // if we don't reset, the whole system get's meesed up
- imgData.resetRawData ( tempCString , imgVector.size() );
- if (! image.isNull() )
+ QImage image;
+ if( image.loadFromData((const uchar*)imgVector.data(), \
imgVector.size()) ) {
if ( width > 1 )
{
- image.smoothScale( width, width, QImage::ScaleMin ).save( \
tagCoverDir.filePath( widthKey + tagKey ), "PNG" );
- return tagCoverDir.filePath( widthKey + tagKey ) ;
+ image.smoothScale( width, width, QImage::ScaleMin ).save( \
m_cacheDir.filePath( widthKey + tagKey ), "PNG" ); + return \
m_cacheDir.filePath( widthKey + tagKey ); } else
{
@@ -789,6 +777,4 @@ CollectionDB::findImageByMetabundle( Met
} // caching
- #endif
-
return QString::null;
}
@@ -856,5 +842,9 @@ QString
CollectionDB::albumImage( MetaBundle trackInformation, uint width )
{
- return albumImage( trackInformation.artist(), trackInformation.album(), width );
+ QString path = findImageByMetabundle( trackInformation, width );
+ if( path.isEmpty() )
+ path =albumImage( trackInformation.artist(), trackInformation.album(), width \
); +
+ return path;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic