Revision 710f401...

Go back to digest for 22nd January 2012

Features in Multimedia

Matěj Laitl committed changes in [amarok] /:

MemoryCollection: use also album artist as identifying key in album map

This has some far-reaching consequences which I believe are only
positive, most notably Amarok is able to differentiate between 2 albums
with same name but different album artists in USB Mass Storage
collection and in "new" iPod collection. This unifies album artist
handling across MemoryCollection and SqlCollection, 2 major collection
storage implementations in Amarok.

Technically, AlbumMap is changed from:
typedef QMap<QString, Meta::AlbumPtr> AlbumMap;
to:
class AlbumMap : public QMap<Meta::AlbumKey, Meta::AlbumPtr>

with insert(), remove(), value(), contains() QMap methods hidden and
reimplemented for convenience and to prevent coding mistakes. (you no
longer can add album under wrong key)

This change is tested to work with new iPod collection, UMS collection
(depends on previous "MetaFile: guess album artist as in SQL collection
scanner, compilations"), all tests still pass.

Only area that received just very basic testing are online
service collections that are also affected by this change.

Docstrings and comments extended thanks to suggestions by Maximilian
Kossick.

DIGEST: Albums with same name but different album artist are now
correctly separated in USB Mass Storage, iPod and various
online service collections.
REVIEW: 103715

File Changes

Modified 21 files
  •   ChangeLog
  •   tests/TestTrackOrganizer.cpp
  •   tests/browsers/TestSingleCollectionTreeItemModel.cpp
  •   tests/synchronization/TestMasterSlaveSynchronizationJob.cpp
  •   tests/synchronization/TestOneWaySynchronizationJob.cpp
  •   tests/synchronization/TestUnionJob.cpp
  •   src/services/ampache/AmpacheServiceQueryMaker.cpp
  •   src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.cpp
  •   src/core-impl/collections/playdarcollection/PlaydarCollection.cpp
  •   src/core-impl/collections/support/MemoryCollection.h
  •   src/core-impl/collections/support/MemoryMatcher.cpp
  •   src/core-impl/collections/support/MemoryMeta.cpp
  •   src/core-impl/collections/support/MemoryMeta.h
  •   src/core-impl/collections/upnpcollection/UpnpCache.cpp
  •   src/core-impl/collections/upnpcollection/UpnpCache.h
  •   src/core/meta/support/MetaKeys.cpp
  •   src/core/meta/support/MetaKeys.h
  •   src/core-impl/collections/daap/daapreader/Reader.cpp
  •   src/core-impl/collections/ipodcollection/handler/IpodHandler.cpp
  •   src/core-impl/collections/ipodcollection/handler/IpodHandler.h
  •   src/core-impl/collections/mediadevicecollection/handler/MediaDeviceHandler.cpp
21 files changed in total