Update to 2.2.2.90 = 2.3 beta 1:

VERSION 2.3-Beta
  FEATURES:
    * Added a configuration dialog for Local Podcasts. Update interval and base
      download directory can now be configured. (BR 221398)
    * Make it possible to go to next/previous track with horizontal mouse
      wheel button on TrayIcon. (BR 225783)
    * New main toolbar with completely redesigned look and new features.
      Contributed by Thomas Luebking <thomas.luebking@web.de>.
    * Podcasts and Saved Playlists can now be grouped by provider like iPod, Local,
      USB Mass Storage, etc. This can be toggled using a button in the relevant
      Category.
    * The playlist context menu now has a "Show in Media Sources" action for
      many types of track.
    * The collection scanner now also looks for cover images named
      "folder.*". Apparently some applications use this convention. (BR 224692)
    * It's now possible to automatically use a USB Mass Storage device as a
      collection when it's connected.
    * The progress bar tooltip now shows the position in the track that the
      cursor is hovering, making it simple to jump to a specific position.
    * D-Bus: Added StopAfterCurrent method for /Player.
    * You can now elect to rescan specific folders. Right-click on a folder in
      the collection setup dialog to rescan just that folder. This will only
      work for folders that have previously been added to the collection, i.e.
      you cannot check a folder and immediately rescan it. This will never be
      recursive (as that defeats the point of scanning a specific folder!)
    * Non collection files with a cue sheet will now load their tracks as
      individual tracks in the playlist instead of as one big track with
      bookmark markers.
    * Dynamic Collection is back. (BR 171213)
    * Searching covers from Last.fm using custom query in interactive mode.

  CHANGES:
    * All move/copy operations to the local collection are asynchronous.
    * Proper handling of disk full and permision errors for copy/move
      operations to the local collection.
    * A preview of the moving/copying operations is now shown in the Organize
      dialog.
    * Added an expander icon to the collection root items.
    * The equalizer configuration is now a seperate tool window accessible
      from the tool menu.
    * Files with ogg and flac extensions can now be copied to UMS devices.
    * The search/filter edit in the playlist is now cleared when pressing
      enter. (BR 217159)
    * Amarok now checks if the version of the "amarokcollectionscanner" tool
      is correct. Some users had issues with having mutiple versions of it
      installed, causing scanning to fail.
    * First run: Let users decided on how to handle music location set
      in standard desktop services.
    * Improved cover fetching accuracy and speed.
    * Usability: Better design of playback configuration dialog.
    * Use millisecond accuracy for track bookmarks. Backwards compatible
      with bookmarks stored in previos versions. (BR 215145)
    * Loving a track for Last.fm via the global keyboard action also show a
      message in the status bar.
    * Improved usability of the playlist layout editor dialog.
    * Duplicate unique file identifiers are now indicated in debug output,
      along with the paths of the files, when found instead of being silently
      ignored. This can help discover multiple copies of the same file or
      files which incorrectly have the same MusicBrainz unique identifier.

  BUGFIXES:
    * Corruption of guid strings by passing them as a KUrl caused podcast episodes
      to be readded on each update. This issue has been solved.
      If you have episodes that appear twice, remove the channel and add it again.
      (BR 219516)
    * Cleaned up the Organize dialog to make it more usable. (BR 199574)
    * Made it harder to Move Files unintentionally. (BR 220716)
    * Returned "Organize Files" to the collection's context menu. (BR 215902)
    * Fixed Amarok Solid action for playing audio CDs working. (BR 209204)
    * Fixed crash with moving applets in the Context View. (BR 191918)
    * Fixed crash in KNotify. (BR 224673)
    * Fixed queue management with mouse. (BR 217153)
    * Fixed playback of some streams causing the progress slider to show
      garbage track length and position values like -322:0-35:0-59.
    * Prevent a crash when loading PLS playlists with invalid filepaths.
    * Fixed scrolling crashes with the cover manager. (BR 224000)
    * Fixed a bug that was deleting files when using "Move to collection"
      from the file browser. (BR 217002)
    * Allow fetching of album covers in the unified view. (BR 220873)
    * Lyrics applet: Fixed scrollbar incorrectly displayed (and sometimes not
      at all) for long lyrics under KDE 4.4. (BR 222260)
    * Fixed bug in Photos applet that made it break with translated versions
      of Amarok. Patch by Bellegarde Cédric <gnumdk@gmail.com>. (BR 222566)
    * Lyrics applet: Fixed saving and restoring font styles. (BR 222277)
    * Lyrics applet: Fixed a bug where sometimes suggested URLs are not
      cleared when switching tracks.
    * Fixed playlist layout editor blocking control of Amarok. (BR 220825)
    * Fixed moodbar in progress slider not correctly updating after moodbar
      style change (BR 220695)
    * Fixed progress slider not moving for many streams (and possible other
      types of tracks) (BR 221747)
    * Sort artists named like "The Foo" correctly in all cases. (BR 176670)
    * Fixed behaviour when clearing the bookmark manager filter.
    * Fixed track not being added to the playlist when playing a track from
      the bookmark manager.
This commit is contained in:
Thomas Klausner 2010-02-16 09:41:59 +00:00
parent f1243d4dc3
commit 611774c462
7 changed files with 42 additions and 415 deletions

View file

@ -1,14 +1,13 @@
# $NetBSD: Makefile,v 1.29 2010/02/15 17:25:02 thomasklausner Exp $
# $NetBSD: Makefile,v 1.30 2010/02/16 09:41:59 thomasklausner Exp $
#
DISTNAME= amarok-${VERS}
VERS= 2.2.2
PKGREVISION= 3
VERS= 2.2.2.90
CATEGORIES= audio multimedia
#MASTER_SITES= http://download.kde.org/unstable/amarok/${VERS}/src/ \
# ftp://gd.tuwien.ac.at/kde/unstable/amarok/${VERS}/src/
MASTER_SITES= http://download.kde.org/stable/amarok/${VERS}/src/ \
ftp://gd.tuwien.ac.at/kde/stable/amarok/${VERS}/src/
MASTER_SITES= http://download.kde.org/unstable/amarok/${VERS}/src/ \
ftp://gd.tuwien.ac.at/kde/unstable/amarok/${VERS}/src/
#MASTER_SITES= http://download.kde.org/stable/amarok/${VERS}/src/ \
# ftp://gd.tuwien.ac.at/kde/stable/amarok/${VERS}/src/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= wiz@NetBSD.org
@ -35,7 +34,7 @@ SUBST_CLASSES+= mysql
SUBST_STAGE.mysql= post-patch
SUBST_MESSAGE.mysql= Fixup paths for MySQL embedded
SUBST_FILES.mysql= cmake/modules/FindMySQLAmarok.cmake
SUBST_FILES.mysql+= src/collection/mysqlecollection/CMakeLists.txt
SUBST_FILES.mysql+= src/collection/sqlcollection/mysqlecollection/CMakeLists.txt
SUBST_SED.mysql= -e s:/opt/mysqle/:${BUILDLINK_PREFIX.mysql-embedded}/mysqld:
SUBST_SED.mysql+= -e s:@@WLR@@:${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-embedded}/mysqld/lib/mysql:

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.14 2010/01/13 13:37:33 thomasklausner Exp $
@comment $NetBSD: PLIST,v 1.15 2010/02/16 09:41:59 thomasklausner Exp $
bin/amarok
bin/amarok_afttagger
bin/amarokcollectionscanner
@ -38,6 +38,9 @@ lib/kde4/kcm_amarok_service_ampache.so
lib/kde4/kcm_amarok_service_lastfm.so
lib/kde4/kcm_amarok_service_magnatunestore.so
lib/kde4/kcm_amarok_service_mp3tunes.so
lib/libamarok-sqlcollection.so
lib/libamarok-sqlcollection.so.1
lib/libamarok-sqlcollection.so.1.0.0
lib/libamaroklib.so
lib/libamaroklib.so.1
lib/libamaroklib.so.1.0.0
@ -496,6 +499,7 @@ share/kde4/servicetypes/amarok_codecinstall.desktop
share/kde4/servicetypes/amarok_context_applet.desktop
share/kde4/servicetypes/amarok_data_engine.desktop
share/kde4/servicetypes/amarok_plugin.desktop
share/locale/af/LC_MESSAGES/amarok.mo
share/locale/bg/LC_MESSAGES/amarok.mo
share/locale/bg/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/bg/LC_MESSAGES/amarokcollectionscanner_qt.mo
@ -504,6 +508,10 @@ share/locale/ca/LC_MESSAGES/amarok.mo
share/locale/ca/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/ca/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/ca/LC_MESSAGES/amarokpkg.mo
share/locale/ca@valencia/LC_MESSAGES/amarok.mo
share/locale/ca@valencia/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/ca@valencia/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/ca@valencia/LC_MESSAGES/amarokpkg.mo
share/locale/cs/LC_MESSAGES/amarok.mo
share/locale/cs/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/cs/LC_MESSAGES/amarokcollectionscanner_qt.mo
@ -542,10 +550,6 @@ share/locale/it/LC_MESSAGES/amarok.mo
share/locale/it/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/it/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/it/LC_MESSAGES/amarokpkg.mo
share/locale/km/LC_MESSAGES/amarok.mo
share/locale/km/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/km/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/km/LC_MESSAGES/amarokpkg.mo
share/locale/lv/LC_MESSAGES/amarok.mo
share/locale/lv/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/lv/LC_MESSAGES/amarokcollectionscanner_qt.mo
@ -577,6 +581,10 @@ share/locale/pt_BR/LC_MESSAGES/amarok.mo
share/locale/pt_BR/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/pt_BR/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/pt_BR/LC_MESSAGES/amarokpkg.mo
share/locale/ro/LC_MESSAGES/amarok.mo
share/locale/ro/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/ro/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/ro/LC_MESSAGES/amarokpkg.mo
share/locale/ru/LC_MESSAGES/amarok.mo
share/locale/ru/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/ru/LC_MESSAGES/amarokcollectionscanner_qt.mo
@ -589,11 +597,17 @@ share/locale/sr/LC_MESSAGES/amarok.mo
share/locale/sr/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/sr/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/sr/LC_MESSAGES/amarokpkg.mo
share/locale/sr@ijekavian/LC_MESSAGES/amarok.mo
share/locale/sr@ijekavian/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/sr@ijekavian/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/sr@ijekavian/LC_MESSAGES/amarokpkg.mo
share/locale/sr@ijekavianlatin/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/sr@latin/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/sv/LC_MESSAGES/amarok.mo
share/locale/sv/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/sv/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/sv/LC_MESSAGES/amarokpkg.mo
share/locale/th/LC_MESSAGES/amarok.mo
share/locale/tr/LC_MESSAGES/amarok.mo
share/locale/tr/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/tr/LC_MESSAGES/amarokcollectionscanner_qt.mo
@ -602,8 +616,6 @@ share/locale/uk/LC_MESSAGES/amarok.mo
share/locale/uk/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/uk/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/uk/LC_MESSAGES/amarokpkg.mo
share/locale/wa/LC_MESSAGES/amarok.mo
share/locale/wa/LC_MESSAGES/amarokcollectionscanner_qt.mo
share/locale/zh_CN/LC_MESSAGES/amarok.mo
share/locale/zh_CN/LC_MESSAGES/amarok_scriptengine_qscript.mo
share/locale/zh_CN/LC_MESSAGES/amarokcollectionscanner_qt.mo

View file

@ -1,8 +1,6 @@
$NetBSD: distinfo,v 1.17 2010/01/13 13:37:33 thomasklausner Exp $
$NetBSD: distinfo,v 1.18 2010/02/16 09:41:59 thomasklausner Exp $
SHA1 (amarok-2.2.2.tar.bz2) = 2075299b856477cf55cba8ba983ea25a93dc139b
RMD160 (amarok-2.2.2.tar.bz2) = 0782c4b032d318179bd8bb91353f8e33772d2912
Size (amarok-2.2.2.tar.bz2) = 8788107 bytes
SHA1 (patch-aa) = 524a9563db17cbf5e234f2ebe261820326e5d30d
SHA1 (patch-ab) = 62beea32f17ce6e138702e740d089c6257ddfced
SHA1 (patch-ac) = c8c111d0927efe56a07ce89b2ec788a6364257aa
SHA1 (amarok-2.2.2.90.tar.bz2) = fd0f2f42aae199b63a8fb0818033b4c3c027b866
RMD160 (amarok-2.2.2.90.tar.bz2) = 0b595183c17b58fe2f9da6afcca44bf32d574366
Size (amarok-2.2.2.90.tar.bz2) = 9166245 bytes
SHA1 (patch-ab) = 88fd8b4062ffec4c045837e596358f4d93dc3585

View file

@ -1,12 +1,9 @@
# $NetBSD: options.mk,v 1.5 2010/02/15 17:24:45 thomasklausner Exp $
# $NetBSD: options.mk,v 1.6 2010/02/16 09:41:59 thomasklausner Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.amarok
PKG_SUPPORTED_OPTIONS= libgpod libmp4v2 libmtp libvisual mp3tunes
PKG_SUGGESTED_OPTIONS= libgpod libmp4v2 libmtp libvisual mp3tunes
# XXX: not packaged yet
# libifp, 1.0.0.2: Support iRiver iFP audio devices <http://ifp-driver.sourceforge.net/libifp/>
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mlibgpod)
@ -15,6 +12,11 @@ BUILDLINK_API_DEPENDS.libgpod+= libgpod>=0.6.0nb1
.include "../../x11/gtk2/buildlink3.mk"
.endif
# libifp is currently not supported
#.if !empty(PKG_OPTIONS:Mlibifp)
#.include "../../audio/libifp/buildlink3.mk"
#.endif
.if !empty(PKG_OPTIONS:Mlibmp4v2)
.include "../../multimedia/libmp4v2/buildlink3.mk"
.endif
@ -38,5 +40,4 @@ BUILDLINK_API_DEPENDS.libgpod+= libgpod>=0.6.0nb1
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
# XXX: make sure qt4-libs have glib enabled
.endif

View file

@ -1,369 +0,0 @@
$NetBSD: patch-aa,v 1.10 2010/01/13 13:37:33 thomasklausner Exp $
post-2.2.2 patch from upstream
--- src/collection/sqlcollection/ScanResultProcessor.cpp.orig 2010-01-06 22:19:46.000000000 +0000
+++ src/collection/sqlcollection/ScanResultProcessor.cpp
@@ -42,19 +42,59 @@ ScanResultProcessor::ScanResultProcessor
ScanResultProcessor::~ScanResultProcessor()
{
//everything has a URL, so enough to just delete from here
+ QSet<QStringList*> currSet; //prevent double deletes
foreach( QStringList *list, m_urlsHashByUid )
- delete list;
+ {
+ if( list )
+ {
+ if( !currSet.contains( list ) )
+ {
+ delete list;
+ currSet.insert( list );
+ }
+ }
+ else
+ debug() << "GAAH! Tried to double-delete a value in m_urlsHashByUid";
+ }
foreach( QLinkedList<QStringList*> *list, m_albumsHashByName )
{
- foreach( QStringList *slist, *list )
- delete slist;
- delete list;
+ if( list )
+ {
+ foreach( QStringList *slist, *list )
+ {
+ if( slist )
+ {
+ if( !currSet.contains( slist ) )
+ {
+ delete slist;
+ currSet.insert( slist );
+ }
+ else
+ debug() << "GAAH! Tried to double-delete a value in m_albumsHashByName";
+ }
+ }
+ delete list;
+ }
}
foreach( QLinkedList<QStringList*> *list, m_tracksHashByAlbum )
{
- foreach( QStringList *slist, *list )
- delete slist;
- delete list;
+ if( list )
+ {
+ foreach( QStringList *slist, *list )
+ {
+ if( slist )
+ {
+ if( !currSet.contains( slist ) )
+ {
+ delete slist;
+ currSet.insert( slist );
+ }
+ else
+ debug() << "GAAH! Tried to double-delete a value in m_tracksHashByAlbum";
+ }
+ }
+ delete list;
+ }
}
}
@@ -67,11 +107,11 @@ ScanResultProcessor::setScanType( ScanTy
void
ScanResultProcessor::addDirectory( const QString &dir, uint mtime )
{
- DEBUG_BLOCK
- debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime;
+ //DEBUG_BLOCK
+ //debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime;
if( dir.isEmpty() )
{
- debug() << "got directory with no path from the scanner, not adding";
+ //debug() << "got directory with no path from the scanner, not adding";
return;
}
setupDatabase();
@@ -254,7 +294,7 @@ ScanResultProcessor::rollback()
void
ScanResultProcessor::processDirectory( const QList<QVariantMap > &data )
{
-// DEBUG_BLOCK
+ //DEBUG_BLOCK
setupDatabase();
//using the following heuristics:
//if more than one album is in the dir, use the artist of each track as albumartist
@@ -274,24 +314,54 @@ ScanResultProcessor::processDirectory( c
if( row.value( Field::ALBUM ).toString() != album )
multipleAlbums = true;
}
+
if( multipleAlbums || album.isEmpty() || artists.size() == 1 )
{
foreach( const QVariantMap &row, data )
{
- int artist = genericId( &m_artists, row.value( Field::ARTIST ).toString(), &m_nextArtistNum );
- addTrack( row, artist );
+ QString uid = row.value( Field::UNIQUEID ).toString();
+ if( m_uidsSeenThisScan.contains( uid ) )
+ {
+ QString originalLocation = ( ( m_urlsHashByUid.contains( uid ) &&
+ m_urlsHashByUid[uid] != 0 ) ?
+ MountPointManager::instance()->getAbsolutePath( m_urlsHashByUid[uid]->at( 1 ).toInt(), m_urlsHashByUid[uid]->at( 2 ) ) : "(unknown)" );
+ debug() << "Skipping file with uniqueid " << uid << " as it was already seen this scan," <<
+ "file is at " << row.value( Field::URL ).toString() << ", original file is at " << originalLocation;
+ }
+ else
+ {
+ int artist = genericId( &m_artists, row.value( Field::ARTIST ).toString(), &m_nextArtistNum );
+ //debug() << "artist found = " << artist;
+ addTrack( row, artist );
+ m_uidsSeenThisScan.insert( uid );
+ }
}
}
else
{
QString albumArtist = findAlbumArtist( artists, data.count() );
+ //debug() << "albumArtist found = " << albumArtist;
//an empty string means that no albumartist was found
int artist = albumArtist.isEmpty() ? 0 : genericId( &m_artists, albumArtist, &m_nextArtistNum );
+ //debug() << "artist found = " << artist;
//debug() << "albumartist " << albumArtist << "for artists" << artists;
foreach( const QVariantMap &row, data )
{
- addTrack( row, artist );
+ QString uid = row.value( Field::UNIQUEID ).toString();
+ if( m_uidsSeenThisScan.contains( uid ) )
+ {
+ QString originalLocation = ( ( m_urlsHashByUid.contains( uid ) &&
+ m_urlsHashByUid[uid] != 0 ) ?
+ MountPointManager::instance()->getAbsolutePath( m_urlsHashByUid[uid]->at( 1 ).toInt(), m_urlsHashByUid[uid]->at( 2 ) ) : "(unknown)" );
+ debug() << "Skipping file with uniqueid " << uid << " as it was already seen this scan," <<
+ "file is at " << row.value( Field::URL ).toString() << ", original file is at " << originalLocation;
+ }
+ else
+ {
+ addTrack( row, artist );
+ m_uidsSeenThisScan.insert( uid );
+ }
}
}
}
@@ -299,6 +369,7 @@ ScanResultProcessor::processDirectory( c
QString
ScanResultProcessor::findAlbumArtist( const QSet<QString> &artists, int trackCount ) const
{
+ //DEBUG_BLOCK
QMap<QString, int> artistCount;
bool featuring;
QStringList trackArtists;
@@ -371,6 +442,7 @@ void
ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId )
{
//DEBUG_BLOCK
+ //debug() << "albumArtistId = " << albumArtistId;
//amarok 1 stored all tracks of a compilation in different directories.
//when using its "Organize Collection" feature
//try to detect these cases
@@ -419,7 +491,15 @@ ScanResultProcessor::addTrack( const QVa
//urlId will take care of the urls table part of AFT
int url = urlId( path, uid );
-
+/*
+ foreach( QString key, m_urlsHashByUid.keys() )
+ debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key];
+ foreach( int key, m_urlsHashById.keys() )
+ debug() << "Key: " << key << ", list: " << *m_urlsHashById[key];
+ typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs
+ foreach( blahType key, m_urlsHashByLocation.keys() )
+ debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
+*/
QStringList *trackList = new QStringList();
int id = m_nextTrackNum;
//debug() << "Appending new track number with tracknum: " << id;
@@ -470,7 +550,7 @@ ScanResultProcessor::addTrack( const QVa
//insert into hashes
if( m_tracksHashByUrl.contains( url ) && m_tracksHashByUrl[url] != 0 )
{
- //debug() << "m_tracksHashByUrl contains the url!";
+ //debug() << "m_tracksHashByUrl already contains url " << url;
//need to replace, not overwrite/add a new one
QStringList *oldValues = m_tracksHashByUrl[url];
QString oldId = oldValues->at( 0 );
@@ -490,8 +570,24 @@ ScanResultProcessor::addTrack( const QVa
m_tracksHashById.insert( id, trackList );
}
+ //debug() << "album = " << album;
+
if( m_tracksHashByAlbum.contains( album ) && m_tracksHashByAlbum[album] != 0 )
- m_tracksHashByAlbum[album]->append( trackList );
+ {
+ //contains isn't the fastest on linked lists, but in reality this is on the order of maybe
+ //ten quick pointer comparisons per track on average...probably lower
+ //debug() << "trackList is " << trackList;
+ if( !m_tracksHashByAlbum[album]->contains( trackList ) )
+ {
+ //debug() << "appending trackList to m_tracksHashByAlbum";
+ m_tracksHashByAlbum[album]->append( trackList );
+ }
+ else
+ {
+ //debug() << "not appending trackList to m_tracksHashByAlbum";
+ }
+
+ }
else
{
QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>();
@@ -595,6 +691,8 @@ ScanResultProcessor::albumId( const QStr
QLinkedList<QStringList*> *list = m_albumsHashByName[album];
foreach( QStringList *slist, *list )
{
+ //debug() << "albumArtistId = " << albumArtistId;
+ //debug() << "Checking list: " << *slist;
if( slist->at( 2 ).isEmpty() && albumArtistId == 0 )
{
//debug() << "artist is empty and albumArtistId = 0, returning " << slist->at( 0 );
@@ -631,7 +729,10 @@ ScanResultProcessor::albumInsert( const
albumList->append( QString() );
m_albumsHashById[returnedNum] = albumList;
if( m_albumsHashByName.contains( album ) && m_albumsHashByName[album] != 0 )
- m_albumsHashByName[album]->append( albumList );
+ {
+ if( !m_albumsHashByName[album]->contains( albumList ) )
+ m_albumsHashByName[album]->append( albumList );
+ }
else
{
QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>();
@@ -645,7 +746,7 @@ ScanResultProcessor::albumInsert( const
int
ScanResultProcessor::urlId( const QString &url, const QString &uid )
{
- /*
+/*
DEBUG_BLOCK
foreach( QString key, m_urlsHashByUid.keys() )
debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key];
@@ -654,8 +755,7 @@ ScanResultProcessor::urlId( const QStrin
typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs
foreach( blahType key, m_urlsHashByLocation.keys() )
debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
- */
-
+*/
QFileInfo fileInfo( url );
const QString dir = fileInfo.absoluteDir().absolutePath();
int dirId = directoryId( dir );
@@ -665,6 +765,7 @@ ScanResultProcessor::urlId( const QStrin
QPair<int, QString> locationPair( deviceId, rpath );
//debug() << "in urlId with url = " << url << " and uid = " << uid;
//debug() << "checking locationPair " << locationPair;
+/*
if( m_urlsHashByLocation.contains( locationPair ) )
{
QStringList values;
@@ -674,6 +775,7 @@ ScanResultProcessor::urlId( const QStrin
values << "zero";
//debug() << "m_urlsHashByLocation contains it! It is " << values;
}
+*/
QStringList currUrlIdValues;
if( m_urlsHashByUid.contains( uid ) && m_urlsHashByUid[uid] != 0 )
currUrlIdValues = *m_urlsHashByUid[uid];
@@ -717,6 +819,7 @@ ScanResultProcessor::urlId( const QStrin
//debug() << "m_urlsHashByUid contains this UID, updating deviceId and path";
QStringList *list = m_urlsHashByUid[uid];
//debug() << "list from UID hash is " << list << " with values " << *list;
+ QPair<int, QString> oldLocationPair( list->at( 1 ).toInt(), list->at( 2 ) );
list->replace( 1, QString::number( deviceId ) );
list->replace( 2, rpath );
list->replace( 3, QString::number( dirId ) );
@@ -737,6 +840,7 @@ ScanResultProcessor::urlId( const QStrin
delete oldList;
}
m_urlsHashByLocation[locationPair] = list;
+ m_urlsHashByLocation.remove( oldLocationPair );
}
m_permanentTablesUrlUpdates.insert( uid, url );
m_changedUrls.insert( uid, QPair<QString, QString>( MountPointManager::instance()->getAbsolutePath( currUrlIdValues[1].toInt(), currUrlIdValues[2] ), url ) );
@@ -751,6 +855,7 @@ ScanResultProcessor::urlId( const QStrin
{
QStringList *list = m_urlsHashByLocation[locationPair];
//debug() << "Replacing hash " << list->at( 4 ) << " with " << uid;
+ QString oldId = list->at( 4 );
list->replace( 4, uid );
if( m_urlsHashByUid.contains( uid )
&& m_urlsHashByUid[uid] != 0
@@ -762,6 +867,7 @@ ScanResultProcessor::urlId( const QStrin
delete oldList;
}
m_urlsHashByUid[uid] = list;
+ m_urlsHashByUid.remove( oldId );
}
m_permanentTablesUidUpdates.insert( url, uid );
m_changedUids.insert( currUrlIdValues[4], uid );
@@ -855,7 +961,8 @@ ScanResultProcessor::directoryId( const
int
ScanResultProcessor::checkExistingAlbums( const QString &album )
{
-// DEBUG_BLOCK
+ //DEBUG_BLOCK
+ //debug() << "looking for album " << album;
// "Unknown" albums shouldn't be handled as compilations
if( album.isEmpty() )
return 0;
@@ -865,7 +972,10 @@ ScanResultProcessor::checkExistingAlbums
//it's probably a compilation.
//this handles A1 compilations that were automatically organized by Amarok
if( !m_albumsHashByName.contains( album ) || m_albumsHashByName[album] == 0 )
+ {
+ //debug() << "hashByName doesn't contain album, or it's zero";
return 0;
+ }
QStringList trackIds;
QLinkedList<QStringList*> *llist = m_albumsHashByName[album];
@@ -915,8 +1025,10 @@ ScanResultProcessor::checkExistingAlbums
}
}
+ //debug() << "trackIds = " << trackIds;
if( trackIds.isEmpty() )
{
+ //debug() << "trackIds empty, returning zero";
return 0;
}
else
@@ -933,6 +1045,7 @@ ScanResultProcessor::checkExistingAlbums
list->replace( 3, compilationString );
}
}
+ //debug() << "returning " << compilationId;
return compilationId;
}
}
@@ -1167,6 +1280,17 @@ ScanResultProcessor::copyHashesToTempTab
foreach( blahType key, m_urlsHashByLocation.keys() )
debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
debug() << "Next album num: " << m_nextAlbumNum;
+
+ foreach( int key, m_tracksHashById.keys() )
+ debug() << "Key: " << key << ", list: " << *m_tracksHashById[key];
+ foreach( int key, m_tracksHashByUrl.keys() )
+ debug() << "Key: " << key << ", list: " << *m_tracksHashByUrl[key];
+ foreach( int key, m_tracksHashByAlbum.keys() )
+ {
+ debug() << "Key: " << key;
+ foreach( QStringList* item, *m_tracksHashByAlbum[key] )
+ debug() << "list: " << item << " is " << *item;
+ }
*/
DEBUG_BLOCK

View file

@ -1,12 +1,12 @@
$NetBSD: patch-ab,v 1.7 2009/10/04 21:43:58 thomasklausner Exp $
$NetBSD: patch-ab,v 1.8 2010/02/16 09:41:59 thomasklausner Exp $
--- src/collection/mysqlecollection/CMakeLists.txt.orig 2009-09-28 17:34:03.000000000 +0000
+++ src/collection/mysqlecollection/CMakeLists.txt
@@ -82,6 +82,7 @@ if(APPLE)
--- src/collection/sqlcollection/mysqlecollection/CMakeLists.txt.orig 2010-02-12 21:43:50.000000000 +0000
+++ src/collection/sqlcollection/mysqlecollection/CMakeLists.txt
@@ -49,6 +49,7 @@ if(APPLE)
SET_TARGET_PROPERTIES(amarok_collection-mysqlecollection PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif(APPLE)
+SET_TARGET_PROPERTIES(amarok_collection-mysqlecollection PROPERTIES LINK_FLAGS "@@WLR@@")
install(TARGETS amarok_collection-mysqlecollection DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES ../sqlcollection/org.kde.amarok.SqlCollection.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
install(FILES amarok_collection-mysqlecollection.desktop DESTINATION ${SERVICES_INSTALL_DIR})

View file

@ -1,14 +0,0 @@
$NetBSD: patch-ac,v 1.7 2010/01/13 13:37:33 thomasklausner Exp $
post-2.2.2 patch from upstream
--- src/collection/sqlcollection/ScanResultProcessor.h.orig 2010-01-06 22:19:46.000000000 +0000
+++ src/collection/sqlcollection/ScanResultProcessor.h
@@ -94,6 +94,7 @@ class ScanResultProcessor : public QObje
QMap<QString, int> m_directories;
QMap<QString, QList< QPair< QString, QString > > > m_imageMap;
+ QSet<QString> m_uidsSeenThisScan;
QHash<QString, uint> m_filesInDirs;
TrackUrls m_changedUids; //not really track urls