Commit 6c51db43 authored by Michael Pyne's avatar Michael Pyne
Browse files

Backport the simple (and yet effective) JuK startup speedups to KDE 4.1. Avoiding searching an

MPEG file for an attached cover unnecessarily can be a big win, especially since
Q3ListView::pixmap() and ::compare() (called on startup for each PlaylistItem) would indirectly
lead to a cover search happening.

svn path=/branches/KDE/4.1/kdemultimedia/juk/; revision=851611
parent 728b77df
......@@ -72,7 +72,7 @@ CoverInfo::CoverInfo(const FileHandle &file) :
m_hasCover(false),
m_hasAttachedCover(false),
m_haveCheckedForCover(false),
m_coverKey(CoverManager::NoMatch),
m_coverKey(CoverManager::idForTrack(file.absFilePath())),
m_needsConverting(false)
{
......
......@@ -4,6 +4,7 @@ Type=Application
Exec=juk -caption "%c" %i
Icon=juk
X-DocPath=juk/index.html
X-DBUS-StartupType=Unique
Comment=
Terminal=false
Name=JuK
......
......@@ -371,9 +371,9 @@ int PlaylistItem::compare(const PlaylistItem *firstItem, const PlaylistItem *sec
return 0;
break;
case CoverColumn:
if(firstItem->d->fileHandle.coverInfo()->hasCover() == secondItem->d->fileHandle.coverInfo()->hasCover())
if(firstItem->d->fileHandle.coverInfo()->coverId() == secondItem->d->fileHandle.coverInfo()->coverId())
return 0;
else if (firstItem->d->fileHandle.coverInfo()->hasCover())
else if (firstItem->d->fileHandle.coverInfo()->coverId() != CoverManager::NoMatch)
return -1;
else
return 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment