[Amarok] 352cb0e This moves the items that were in meta/ (including

Jeff Mitchell mitchell at kde.org
Tue Mar 23 20:48:17 CET 2010


	A	 src/core/statistics/providers/url/PermanentUrlStatisticsProvider.h	 [License: UNKNOWN]


	A	 src/core/statistics/providers/url/PermanentUrlStatisticsProvider.cpp	 [License: UNKNOWN]


	A	 src/core/statistics/providers/tag/TagStatisticsProvider.h	 [License: UNKNOWN]


	A	 src/core/statistics/providers/tag/TagStatisticsProvider.cpp	 [License: UNKNOWN]


	A	 src/core/statistics/StatisticsProvider.h	 [License: UNKNOWN]


	A	 src/core/statistics/StatisticsProvider.cpp	 [License: UNKNOWN]


	A	 src/core/playlists/providers/user/UserPlaylistProvider.h	 [License: UNKNOWN]


	A	 src/core/playlists/providers/user/UserPlaylistProvider.cpp	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/xspf/XSPFPlaylist.h	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/xspf/XSPFPlaylist.cpp	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/pls/PLSPlaylist.h	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/pls/PLSPlaylist.cpp	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/m3u/M3UPlaylist.h	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/m3u/M3UPlaylist.cpp	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/PlaylistFileSupport.h	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/PlaylistFileSupport.cpp	 [License: UNKNOWN]


	A	 src/core/playlists/impl/file/PlaylistFile.h	 [License: UNKNOWN]


	A	 src/core/playlists/impl/dynamic/DynamicPlaylist.h	 [License: UNKNOWN]


	A	 src/core/playlists/impl/dynamic/DynamicPlaylist.cpp	 [License: UNKNOWN]


	A	 src/core/playlists/PlaylistProvider.h	 [License: UNKNOWN]


	A	 src/core/playlists/PlaylistProvider.cpp	 [License: Trivialfile.]


	A	 src/core/playlists/Playlist.h	 [License: UNKNOWN]


	A	 src/core/playlists/Playlist.cpp	 [License: UNKNOWN]


	A	 src/core/meta/support/PrivateMetaRegistry.h	 [License: UNKNOWN]


	A	 src/core/meta/support/PrivateMetaRegistry.cpp	 [License: UNKNOWN]


	A	 src/core/meta/support/MetaUtility.h	 [License: UNKNOWN]


	A	 src/core/meta/support/MetaUtility.cpp	 [License: UNKNOWN]


	A	 src/core/meta/support/MetaConstants.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/stream/Stream_p.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/stream/Stream.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/stream/Stream.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/proxy/MetaProxy_p.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/proxy/MetaProxy.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/proxy/MetaProxy.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/multi/MultiTrack.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/multi/MultiTrack.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/multi/MultiSourceCapabilityImpl.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/multi/MultiSourceCapabilityImpl.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/file/TagLibUtils.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/file/TagLibUtils.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/file/File_p.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/file/File.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/file/File.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/default/DefaultMetaTypes.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/cue/Cue_p.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/cue/CueFileSupport.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/cue/CueFileSupport.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/cue/Cue.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/cue/Cue.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/cdda/AudioCdTrackProvider_p.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/cdda/AudioCdTrackProvider_p.cpp	 [License: UNKNOWN]


	A	 src/core/meta/impl/cdda/AudioCdTrackProvider.h	 [License: UNKNOWN]


	A	 src/core/meta/impl/cdda/AudioCdTrackProvider.cpp	 [License: UNKNOWN]


	A	 src/core/meta/Meta.h	 [License: UNKNOWN]


	A	 src/core/meta/Meta.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/WriteLabelCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/WriteLabelCapability.cpp	 [License: Trivialfile.]


	A	 src/core/capabilities/UpdateCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/UpdateCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/TimecodeWriteCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/TimecodeWriteCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/TimecodeLoadCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/TimecodeLoadCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/StreamInfoCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/StreamInfoCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/StatisticsCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/StatisticsCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/SourceInfoCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/SourceInfoCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/ReadLabelCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/ReadLabelCapability.cpp	 [License: Trivialfile.]


	A	 src/core/capabilities/OrganiseCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/OrganiseCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/MultiSourceCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/MultiSourceCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/MultiPlayableCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/MultiPlayableCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/LastFmCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/LastFmCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/FindInSourceCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/FindInSourceCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/EditablePlaylistCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/EditablePlaylistCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/EditCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/EditCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/DecoratorCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/DecoratorCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/CustomActionsCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/CustomActionsCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/CurrentTrackActionsCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/CurrentTrackActionsCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/CollectionCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/CollectionCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/Capability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/Capability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/BoundedPlaybackCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/BoundedPlaybackCapability.cpp	 [License: UNKNOWN]


	A	 src/core/capabilities/BookmarkThisCapability.h	 [License: UNKNOWN]


	A	 src/core/capabilities/BookmarkThisCapability.cpp	 [License: UNKNOWN]

commit 352cb0e3f9da46288f81865000c15806d4975ec5
Author: Jeff Mitchell <mitchell at kde.org>
Date:   Tue Mar 23 15:38:57 2010 -0400

    This moves the items that were in meta/ (including meta itself) into core/
    
    It also removes various references to meta/ and its subdirectories from CMakeLists. Please don't start adding these back. With the various meta/ directories around, in addition to some capabilities/ directories and the like, requiring you to
    use the full path not only keeps you mindful of the strucure (if you add or change it around) but also ensures that you're referencing the directory and files that you think that you are.
    
    Plus, this consistency will make it far easier for any further restructuring to be done, which is not unlikely.
    
    CCMAIL:amarok-devel at kde.org
    
    Interim step towards core/
    
    Finish the move to core/

diff --git a/src/Amarok.cpp b/src/Amarok.cpp
index f29d386..91789e1 100644
--- a/src/Amarok.cpp
+++ b/src/Amarok.cpp
@@ -18,10 +18,10 @@
 
 
 #include "App.h"
-#include "Meta.h"
-#include "meta/support/MetaUtility.h"
-#include "capabilities/SourceInfoCapability.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/SourceInfoCapability.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 
 
 #include <QDateTime>
diff --git a/src/AmarokMimeData.h b/src/AmarokMimeData.h
index 1766539..cebb1c4 100644
--- a/src/AmarokMimeData.h
+++ b/src/AmarokMimeData.h
@@ -19,8 +19,8 @@
 
 #include "amarok_export.h"
 #include "amarokurls/BookmarkGroup.h"
-#include "meta/Meta.h"
-#include "playlists/Playlist.h"
+#include "core/meta/Meta.h"
+#include "core/playlists/Playlist.h"
 #include "podcasts/PodcastMeta.h"
 #include "collection/QueryMaker.h"
 
diff --git a/src/App.cpp b/src/App.cpp
index ba58dcb..db22a4a 100644
--- a/src/App.cpp
+++ b/src/App.cpp
@@ -31,15 +31,15 @@
 #include "EngineController.h"
 #include "firstruntutorial/FirstRunTutorial.h"
 #include "KNotificationBackend.h"
-#include "capabilities/SourceInfoCapability.h"
-#include "meta/support/MetaConstants.h"
-#include "meta/Meta.h"
-#include "meta/support/MetaUtility.h"
+#include "core/capabilities/SourceInfoCapability.h"
+#include "core/meta/support/MetaConstants.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaUtility.h"
 #include "Osd.h"
 #include "PlaybackConfig.h"
 #include "PlayerDBusHandler.h"
-#include "Playlist.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/Playlist.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "playlist/PlaylistActions.h"
 #include "playlist/PlaylistModelStack.h"
 #include "playlist/PlaylistController.h"
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5a082cf..2c3437a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -49,9 +49,6 @@ include_directories(
     dialogs
     dynamic
     likeback
-    meta
-    meta/capabilities
-    meta/playlists
     playlistmanager
     plugin
     podcasts
@@ -278,50 +275,50 @@ set(libstatusbar_SRCS
 #####################################################################
 # META
 #####################################################################
-set(meta_SRCS
-    meta/capabilities/Capability.cpp
-    meta/playlists/impl/file/m3u/M3UPlaylist.cpp
-    meta/Meta.cpp
-    meta/support/MetaUtility.cpp
-    meta/impl/file/TagLibUtils.cpp
+set(core_SRCS
+    core/capabilities/Capability.cpp
+    core/playlists/impl/file/m3u/M3UPlaylist.cpp
+    core/meta/Meta.cpp
+    core/meta/support/MetaUtility.cpp
+    core/meta/impl/file/TagLibUtils.cpp
     ../shared/MetaReplayGain.cpp
-    meta/playlists/Playlist.cpp
-    meta/playlists/impl/file/pls/PLSPlaylist.cpp
-    meta/statistics/StatisticsProvider.cpp
-    meta/playlists/PlaylistProvider.cpp
-    meta/playlists/providers/user/UserPlaylistProvider.cpp
-    meta/playlists/impl/file/PlaylistFileSupport.cpp
-    meta/support/PrivateMetaRegistry.cpp
-    meta/playlists/impl/file/xspf/XSPFPlaylist.cpp
-    meta/capabilities/BookmarkThisCapability.cpp
-    meta/capabilities/BoundedPlaybackCapability.cpp
-    meta/capabilities/CollectionCapability.cpp
-    meta/capabilities/CurrentTrackActionsCapability.cpp
-    meta/capabilities/CustomActionsCapability.cpp
-    meta/capabilities/DecoratorCapability.cpp
-    meta/capabilities/EditCapability.cpp
-    meta/capabilities/EditablePlaylistCapability.cpp
-    meta/capabilities/FindInSourceCapability.cpp
-    meta/capabilities/LastFmCapability.cpp
-    meta/capabilities/MultiPlayableCapability.cpp
-    meta/capabilities/MultiSourceCapability.cpp
-    meta/capabilities/OrganiseCapability.cpp
-    meta/capabilities/ReadLabelCapability.cpp
-    meta/capabilities/SourceInfoCapability.cpp
-    meta/capabilities/StatisticsCapability.cpp
-    meta/capabilities/StreamInfoCapability.cpp
-    meta/capabilities/TimecodeLoadCapability.cpp
-    meta/capabilities/TimecodeWriteCapability.cpp
-    meta/capabilities/UpdateCapability.cpp
-    meta/capabilities/WriteLabelCapability.cpp
-    meta/impl/file/File.cpp
-    meta/impl/multi/MultiTrack.cpp
-    meta/impl/multi/MultiSourceCapabilityImpl.cpp
-    meta/impl/cue/CueFileSupport.cpp
-    meta/impl/proxy/MetaProxy.cpp
-    meta/impl/stream/Stream.cpp
-    meta/statistics/providers/url/PermanentUrlStatisticsProvider.cpp
-    meta/statistics/providers/tag/TagStatisticsProvider.cpp
+    core/playlists/Playlist.cpp
+    core/playlists/impl/file/pls/PLSPlaylist.cpp
+    core/statistics/StatisticsProvider.cpp
+    core/playlists/PlaylistProvider.cpp
+    core/playlists/providers/user/UserPlaylistProvider.cpp
+    core/playlists/impl/file/PlaylistFileSupport.cpp
+    core/meta/support/PrivateMetaRegistry.cpp
+    core/playlists/impl/file/xspf/XSPFPlaylist.cpp
+    core/capabilities/BookmarkThisCapability.cpp
+    core/capabilities/BoundedPlaybackCapability.cpp
+    core/capabilities/CollectionCapability.cpp
+    core/capabilities/CurrentTrackActionsCapability.cpp
+    core/capabilities/CustomActionsCapability.cpp
+    core/capabilities/DecoratorCapability.cpp
+    core/capabilities/EditCapability.cpp
+    core/capabilities/EditablePlaylistCapability.cpp
+    core/capabilities/FindInSourceCapability.cpp
+    core/capabilities/LastFmCapability.cpp
+    core/capabilities/MultiPlayableCapability.cpp
+    core/capabilities/MultiSourceCapability.cpp
+    core/capabilities/OrganiseCapability.cpp
+    core/capabilities/ReadLabelCapability.cpp
+    core/capabilities/SourceInfoCapability.cpp
+    core/capabilities/StatisticsCapability.cpp
+    core/capabilities/StreamInfoCapability.cpp
+    core/capabilities/TimecodeLoadCapability.cpp
+    core/capabilities/TimecodeWriteCapability.cpp
+    core/capabilities/UpdateCapability.cpp
+    core/capabilities/WriteLabelCapability.cpp
+    core/meta/impl/file/File.cpp
+    core/meta/impl/multi/MultiTrack.cpp
+    core/meta/impl/multi/MultiSourceCapabilityImpl.cpp
+    core/meta/impl/cue/CueFileSupport.cpp
+    core/meta/impl/proxy/MetaProxy.cpp
+    core/meta/impl/stream/Stream.cpp
+    core/statistics/providers/url/PermanentUrlStatisticsProvider.cpp
+    core/statistics/providers/tag/TagStatisticsProvider.cpp
 )
 
 #####################################################################
@@ -496,8 +493,8 @@ set(libplaylist_SRCS
 
 if(KDEMULTIMEDIA_FOUND)
     set(audiocdsupport_SRCS
-        meta/audiocd/AudioCdTrackProvider.cpp
-        meta/audiocd/AudioCdTrackProvider_p.cpp
+        core/meta/impl/cdda/AudioCdTrackProvider.cpp
+        core/meta/impl/cdda/AudioCdTrackProvider_p.cpp
        )
 endif(KDEMULTIMEDIA_FOUND)
 
@@ -583,7 +580,7 @@ set(amaroklib_LIB_SRCS
     ${libservicebrowser_SRCS}
     ${libdynamic_SRCS}
     ${likeback_SRCS}
-    ${meta_SRCS}
+    ${core_SRCS}
     ${collection_SRCS}
     ${mac_SRCS}
     ${libplaylistbrowser_SRCS}
diff --git a/src/DirectoryLoader.cpp b/src/DirectoryLoader.cpp
index 422cb34..c48d007 100644
--- a/src/DirectoryLoader.cpp
+++ b/src/DirectoryLoader.cpp
@@ -20,7 +20,7 @@
 
 #include "Debug.h"
 #include "CollectionManager.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "playlist/PlaylistModelStack.h"
 #include "playlistmanager/PlaylistManager.h"
 
diff --git a/src/DirectoryLoader.h b/src/DirectoryLoader.h
index 9fbe45c..8b1545f 100644
--- a/src/DirectoryLoader.h
+++ b/src/DirectoryLoader.h
@@ -21,7 +21,7 @@
 
 #include <QObject>
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <KFileItem>
 
diff --git a/src/EngineController.cpp b/src/EngineController.cpp
index d6ea01e..79acb4f 100644
--- a/src/EngineController.cpp
+++ b/src/EngineController.cpp
@@ -32,12 +32,12 @@
 #include "Debug.h"
 #include "MainWindow.h"
 #include "MediaDeviceMonitor.h"
-#include "meta/Meta.h"
-#include "meta/support/MetaConstants.h"
-#include "capabilities/MultiPlayableCapability.h"
-#include "capabilities/MultiSourceCapability.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaConstants.h"
+#include "core/capabilities/MultiPlayableCapability.h"
+#include "core/capabilities/MultiSourceCapability.h"
 #include "playlist/PlaylistActions.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "PluginManager.h"
 
 #include <KFileItem>
diff --git a/src/EngineController.h b/src/EngineController.h
index 5d7cdb0..9e889ee 100644
--- a/src/EngineController.h
+++ b/src/EngineController.h
@@ -21,9 +21,9 @@
 #ifndef AMAROK_ENGINECONTROLLER_H
 #define AMAROK_ENGINECONTROLLER_H
 
-#include "capabilities/BoundedPlaybackCapability.h"
+#include "core/capabilities/BoundedPlaybackCapability.h"
 #include "EngineObserver.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QMap>
 #include <QMutex>
diff --git a/src/EngineObserver.h b/src/EngineObserver.h
index ab9a686..4e8c5ce 100644
--- a/src/EngineObserver.h
+++ b/src/EngineObserver.h
@@ -19,7 +19,7 @@
 #define AMAROK_ENGINEOBSERVER_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <Phonon/Global>
 #include <QHash>
diff --git a/src/GlobalCollectionActions.cpp b/src/GlobalCollectionActions.cpp
index 198fed8..ed158dc 100644
--- a/src/GlobalCollectionActions.cpp
+++ b/src/GlobalCollectionActions.cpp
@@ -15,7 +15,7 @@
  ****************************************************************************************/
  
 #include "GlobalCollectionActions.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 
 namespace The
diff --git a/src/GlobalCollectionActions.h b/src/GlobalCollectionActions.h
index 449cb4c..e6c8912 100644
--- a/src/GlobalCollectionActions.h
+++ b/src/GlobalCollectionActions.h
@@ -18,7 +18,7 @@
 #define GLOBALCOLLECTIONACTIONS_H
 
 #include "amarok_export.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "SmartPointerList.h"
 
 #include <QAction>
diff --git a/src/GlobalCurrentTrackActions.h b/src/GlobalCurrentTrackActions.h
index acfeaa1..826d9a8 100644
--- a/src/GlobalCurrentTrackActions.h
+++ b/src/GlobalCurrentTrackActions.h
@@ -18,7 +18,7 @@
 #define GLOBALCURRENTTRACKACTIONS_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "SmartPointerList.h"
 
 #include <QAction>
diff --git a/src/KNotificationBackend.cpp b/src/KNotificationBackend.cpp
index a0b7236..3f365c8 100644
--- a/src/KNotificationBackend.cpp
+++ b/src/KNotificationBackend.cpp
@@ -19,7 +19,7 @@
 #include "Amarok.h"
 #include "Debug.h"
 #include "EngineController.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QTimer>
 
diff --git a/src/LastfmReadLabelCapability.cpp b/src/LastfmReadLabelCapability.cpp
index 497cec6..e60f959 100644
--- a/src/LastfmReadLabelCapability.cpp
+++ b/src/LastfmReadLabelCapability.cpp
@@ -17,7 +17,7 @@
 #include "LastfmReadLabelCapability.h"
 
 #include "Debug.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QMap>
 #include <QNetworkReply>
diff --git a/src/LastfmReadLabelCapability.h b/src/LastfmReadLabelCapability.h
index e610435..f29f7b6 100644
--- a/src/LastfmReadLabelCapability.h
+++ b/src/LastfmReadLabelCapability.h
@@ -18,8 +18,8 @@
 #ifndef LASTFMREADLABELCAPABILITY_H
 #define LASTFMREADLABELCAPABILITY_H
 
-#include "capabilities/Capability.h"
-#include "capabilities/ReadLabelCapability.h"
+#include "core/capabilities/Capability.h"
+#include "core/capabilities/ReadLabelCapability.h"
 class QNetworkReply;
 
 namespace Meta
diff --git a/src/MainWindow.h b/src/MainWindow.h
index b8ff66a..dc557e9 100644
--- a/src/MainWindow.h
+++ b/src/MainWindow.h
@@ -19,7 +19,7 @@
 #define MAINWINDOW_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "EngineObserver.h"
 #include "browsers/BrowserWidget.h"
 
diff --git a/src/TrayIcon.cpp b/src/TrayIcon.cpp
index 1a98b3e..1d21f0b 100644
--- a/src/TrayIcon.cpp
+++ b/src/TrayIcon.cpp
@@ -26,8 +26,8 @@
 #include "EngineController.h"
 #include "amarokconfig.h"
 #include "GlobalCurrentTrackActions.h"
-#include "meta/support/MetaConstants.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
+#include "core/meta/support/MetaConstants.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
 #include "playlist/PlaylistActions.h"
 #include "playlist/PlaylistModelStack.h"
 #include <KAboutData>
diff --git a/src/TrayIcon.h b/src/TrayIcon.h
index 0ba05ec..38dda3c 100644
--- a/src/TrayIcon.h
+++ b/src/TrayIcon.h
@@ -20,7 +20,7 @@
 #define AMAROK_TRAYICON_H
 
 #include "EngineObserver.h" //baseclass
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "SmartPointerList.h"
 
 #include <KStatusNotifierItem> //baseclass
diff --git a/src/TrayIconLegacy.cpp b/src/TrayIconLegacy.cpp
index 9122af7..0abce14 100644
--- a/src/TrayIconLegacy.cpp
+++ b/src/TrayIconLegacy.cpp
@@ -26,8 +26,8 @@
 #include "EngineController.h"
 #include "amarokconfig.h"
 #include "GlobalCurrentTrackActions.h"
-#include "meta/support/MetaConstants.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
+#include "core/meta/support/MetaConstants.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
 #include "playlist/PlaylistActions.h"
 #include "playlist/PlaylistModelStack.h"
 #include <KAction>
diff --git a/src/TrayIconLegacy.h b/src/TrayIconLegacy.h
index e254c3e..80677e7 100644
--- a/src/TrayIconLegacy.h
+++ b/src/TrayIconLegacy.h
@@ -20,7 +20,7 @@
 #define AMAROK_TRAYICONLEGACY_H
 
 #include "EngineObserver.h" //baseclass
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "SmartPointerList.h"
 
 #include <KSystemTrayIcon> //baseclass
diff --git a/src/amarokurls/AmarokUrlHandler.h b/src/amarokurls/AmarokUrlHandler.h
index 3e535bd..78b32b0 100644
--- a/src/amarokurls/AmarokUrlHandler.h
+++ b/src/amarokurls/AmarokUrlHandler.h
@@ -20,7 +20,7 @@
 #include "amarok_export.h"
 #include "AmarokUrlGenerator.h"
 #include "AmarokUrlRunnerBase.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "playlist/PlaylistViewUrlRunner.h"
 
 #include <KIcon>
diff --git a/src/amarokurls/BookmarkMetaActions.cpp b/src/amarokurls/BookmarkMetaActions.cpp
index 6e9ff21..c2545cf 100644
--- a/src/amarokurls/BookmarkMetaActions.cpp
+++ b/src/amarokurls/BookmarkMetaActions.cpp
@@ -21,7 +21,7 @@
 #include "EngineController.h"
 #include "ProgressWidget.h"
 #include "SvgHandler.h"
-#include "capabilities/TimecodeWriteCapability.h"
+#include "core/capabilities/TimecodeWriteCapability.h"
 
 #include <KIcon>
 #include <KLocale>
diff --git a/src/amarokurls/BookmarkMetaActions.h b/src/amarokurls/BookmarkMetaActions.h
index 2fca7af..9b826e7 100644
--- a/src/amarokurls/BookmarkMetaActions.h
+++ b/src/amarokurls/BookmarkMetaActions.h
@@ -18,7 +18,7 @@
 #define BOOKMARKMETAACTIONS_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QAction>
 
diff --git a/src/amarokurls/NavigationUrlGenerator.cpp b/src/amarokurls/NavigationUrlGenerator.cpp
index dfeaf29..2f6ea6d 100644
--- a/src/amarokurls/NavigationUrlGenerator.cpp
+++ b/src/amarokurls/NavigationUrlGenerator.cpp
@@ -21,7 +21,7 @@
 #include "Debug.h"
 #include "MainWindow.h"
 #include "ServiceBrowser.h"
-#include "SourceInfoCapability.h"
+#include "core/capabilities/SourceInfoCapability.h"
 #include "browsers/CollectionTreeItemModelBase.h"
 #include "browsers/collectionbrowser/CollectionWidget.h"
 #include "browsers/playlistbrowser/PlaylistBrowser.h"
diff --git a/src/amarokurls/NavigationUrlGenerator.h b/src/amarokurls/NavigationUrlGenerator.h
index 15ca1b6..1f76a57 100644
--- a/src/amarokurls/NavigationUrlGenerator.h
+++ b/src/amarokurls/NavigationUrlGenerator.h
@@ -19,7 +19,7 @@
 
 #include "amarok_export.h"
 #include "AmarokUrlGenerator.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 class AmarokUrl;
 
diff --git a/src/amarokurls/PlayUrlGenerator.cpp b/src/amarokurls/PlayUrlGenerator.cpp
index 8ed6c16..32c6c5d 100644
--- a/src/amarokurls/PlayUrlGenerator.cpp
+++ b/src/amarokurls/PlayUrlGenerator.cpp
@@ -20,7 +20,7 @@
 #include "AmarokUrlHandler.h"
 #include "Debug.h"
 #include "EngineController.h"
-#include "meta/support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 
 PlayUrlGenerator * PlayUrlGenerator::s_instance = 0;
 
diff --git a/src/amarokurls/PlayUrlGenerator.h b/src/amarokurls/PlayUrlGenerator.h
index 1459f95..131b737 100644
--- a/src/amarokurls/PlayUrlGenerator.h
+++ b/src/amarokurls/PlayUrlGenerator.h
@@ -19,7 +19,7 @@
 
 #include "amarok_export.h"
 #include "AmarokUrlGenerator.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QString>
 
diff --git a/src/app_mac.cpp b/src/app_mac.cpp
index a2e8c52..f07edba 100644
--- a/src/app_mac.cpp
+++ b/src/app_mac.cpp
@@ -20,7 +20,7 @@
 #include "CollectionManager.h"
 #include "Debug.h"
 #include "DirectoryLoader.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "Playlist.h"
 #include "PlaylistFileSupport.h"
 #include "playlist/PlaylistController.h"
diff --git a/src/browsers/BrowserCategoryListSortFilterProxyModel.h b/src/browsers/BrowserCategoryListSortFilterProxyModel.h
index 462736f..cd6cc2e 100644
--- a/src/browsers/BrowserCategoryListSortFilterProxyModel.h
+++ b/src/browsers/BrowserCategoryListSortFilterProxyModel.h
@@ -19,7 +19,7 @@
 
 #include <QSortFilterProxyModel>
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 class BrowserCategoryListSortFilterProxyModel : public QSortFilterProxyModel
 {
diff --git a/src/browsers/CollectionSortFilterProxyModel.h b/src/browsers/CollectionSortFilterProxyModel.h
index e64db72..1152f69 100644
--- a/src/browsers/CollectionSortFilterProxyModel.h
+++ b/src/browsers/CollectionSortFilterProxyModel.h
@@ -18,7 +18,7 @@
 #ifndef COLLECTIONSORTFILTERPROXYMODEL_H
 #define COLLECTIONSORTFILTERPROXYMODEL_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QSortFilterProxyModel>
 
diff --git a/src/browsers/CollectionTreeItem.cpp b/src/browsers/CollectionTreeItem.cpp
index b3b9091..44378ab 100644
--- a/src/browsers/CollectionTreeItem.cpp
+++ b/src/browsers/CollectionTreeItem.cpp
@@ -21,7 +21,7 @@
 #include "Debug.h"
 #include "amarokconfig.h"
 
-#include "capabilities/DecoratorCapability.h"
+#include "core/capabilities/DecoratorCapability.h"
 
 #include <KLocale>
 
diff --git a/src/browsers/CollectionTreeItem.h b/src/browsers/CollectionTreeItem.h
index 828bbf7..d205680 100644
--- a/src/browsers/CollectionTreeItem.h
+++ b/src/browsers/CollectionTreeItem.h
@@ -20,7 +20,7 @@
 
 #include "Collection.h"
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QList>
 
diff --git a/src/browsers/CollectionTreeItemModel.h b/src/browsers/CollectionTreeItemModel.h
index ba93e19..6eac298 100644
--- a/src/browsers/CollectionTreeItemModel.h
+++ b/src/browsers/CollectionTreeItemModel.h
@@ -20,7 +20,7 @@
 #define COLLECTIONTREEITEMMODEL_H
 
 #include "CollectionTreeItemModelBase.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 
 #include <QMap>
diff --git a/src/browsers/CollectionTreeItemModelBase.cpp b/src/browsers/CollectionTreeItemModelBase.cpp
index ae71586..45e2e82 100644
--- a/src/browsers/CollectionTreeItemModelBase.cpp
+++ b/src/browsers/CollectionTreeItemModelBase.cpp
@@ -26,10 +26,10 @@
 #include "CollectionTreeItem.h"
 #include "Debug.h"
 #include "Expression.h"
-#include "meta/support/MetaConstants.h"
+#include "core/meta/support/MetaConstants.h"
 #include "QueryMaker.h"
 #include "amarokconfig.h"
-#include "capabilities/EditCapability.h"
+#include "core/capabilities/EditCapability.h"
 
 #include <KIcon>
 #include <KIconLoader>
diff --git a/src/browsers/CollectionTreeItemModelBase.h b/src/browsers/CollectionTreeItemModelBase.h
index 50a6e7e..ef693fa 100644
--- a/src/browsers/CollectionTreeItemModelBase.h
+++ b/src/browsers/CollectionTreeItemModelBase.h
@@ -21,7 +21,7 @@
 
 #include "amarok_export.h"
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QAbstractItemModel>
 #include <QHash>
diff --git a/src/browsers/CollectionTreeView.cpp b/src/browsers/CollectionTreeView.cpp
index 48ab06b..a61114e 100644
--- a/src/browsers/CollectionTreeView.cpp
+++ b/src/browsers/CollectionTreeView.cpp
@@ -28,11 +28,11 @@
 #include "browsers/CollectionTreeItemModel.h"
 #include "context/ContextView.h"
 #include "GlobalCollectionActions.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "MetaQueryMaker.h"
-#include "capabilities/BookmarkThisCapability.h"
-#include "capabilities/CollectionCapability.h"
-#include "capabilities/CustomActionsCapability.h"
+#include "core/capabilities/BookmarkThisCapability.h"
+#include "core/capabilities/CollectionCapability.h"
+#include "core/capabilities/CustomActionsCapability.h"
 #include "PaletteHandler.h"
 #include "playlist/PlaylistModelStack.h"
 #include "PopupDropperFactory.h"
diff --git a/src/browsers/CollectionTreeView.h b/src/browsers/CollectionTreeView.h
index 533067e..36543de 100644
--- a/src/browsers/CollectionTreeView.h
+++ b/src/browsers/CollectionTreeView.h
@@ -19,7 +19,7 @@
 
 #include "CollectionSortFilterProxyModel.h"
 #include "playlist/PlaylistController.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "widgets/PrettyTreeView.h"
 
 
diff --git a/src/browsers/SingleCollectionTreeItemModel.h b/src/browsers/SingleCollectionTreeItemModel.h
index bcad701..b636558 100644
--- a/src/browsers/SingleCollectionTreeItemModel.h
+++ b/src/browsers/SingleCollectionTreeItemModel.h
@@ -21,7 +21,7 @@
 
 #include "amarok_export.h"
 #include "CollectionTreeItemModelBase.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QAbstractItemModel>
 #include <QMap>
diff --git a/src/browsers/filebrowser/FileView.cpp b/src/browsers/filebrowser/FileView.cpp
index 85b6251..0d379dc 100644
--- a/src/browsers/filebrowser/FileView.cpp
+++ b/src/browsers/filebrowser/FileView.cpp
@@ -27,7 +27,7 @@
 #include "DirectoryLoader.h"
 #include "EngineController.h"
 #include "MainWindow.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "PaletteHandler.h"
 #include "playlist/PlaylistModelStack.h"
 #include "PopupDropperFactory.h"
diff --git a/src/browsers/playlistbrowser/MetaPlaylistModel.h b/src/browsers/playlistbrowser/MetaPlaylistModel.h
index 50156d4..31fe248 100644
--- a/src/browsers/playlistbrowser/MetaPlaylistModel.h
+++ b/src/browsers/playlistbrowser/MetaPlaylistModel.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_METAPLAYLISTMODEL_H
 #define AMAROK_METAPLAYLISTMODEL_H
 
-#include "playlists/Playlist.h"
+#include "core/playlists/Playlist.h"
 #include "playlist/PlaylistModelStack.h"
 
 #include <QAbstractItemModel>
diff --git a/src/browsers/playlistbrowser/PlaylistBrowser.cpp b/src/browsers/playlistbrowser/PlaylistBrowser.cpp
index 268bf75..195fd80 100644
--- a/src/browsers/playlistbrowser/PlaylistBrowser.cpp
+++ b/src/browsers/playlistbrowser/PlaylistBrowser.cpp
@@ -19,7 +19,7 @@
 #include "Amarok.h"
 #include "Debug.h"
 #include "DynamicCategory.h"
-#include "Playlist.h"
+#include "core/playlists/Playlist.h"
 #include "UserPlaylistCategory.h"
 #include "PlaylistManager.h"
 
diff --git a/src/browsers/playlistbrowser/PlaylistViewItem.h b/src/browsers/playlistbrowser/PlaylistViewItem.h
index 9330728..e3934d8 100644
--- a/src/browsers/playlistbrowser/PlaylistViewItem.h
+++ b/src/browsers/playlistbrowser/PlaylistViewItem.h
@@ -18,7 +18,7 @@
 #ifndef PLAYLISTVIEWITEM_H
 #define PLAYLISTVIEWITEM_H
 
-#include "meta/PlaylistGroup.h"
+#include "core/meta/PlaylistGroup.h"
 
 #include <QSharedData>
 #include <KSharedPtr>
diff --git a/src/browsers/playlistbrowser/PlaylistsInGroupsProxy.cpp b/src/browsers/playlistbrowser/PlaylistsInGroupsProxy.cpp
index 8cb8322..31364fc 100644
--- a/src/browsers/playlistbrowser/PlaylistsInGroupsProxy.cpp
+++ b/src/browsers/playlistbrowser/PlaylistsInGroupsProxy.cpp
@@ -18,7 +18,7 @@
 
 #include "AmarokMimeData.h"
 #include "Debug.h"
-#include "playlists/Playlist.h"
+#include "core/playlists/Playlist.h"
 #include "SvgHandler.h"
 #include "UserPlaylistModel.h"
 #include "playlist/PlaylistModelStack.h"
diff --git a/src/browsers/playlistbrowser/PodcastCategory.cpp b/src/browsers/playlistbrowser/PodcastCategory.cpp
index c4d08b2..dcba7ea 100644
--- a/src/browsers/playlistbrowser/PodcastCategory.cpp
+++ b/src/browsers/playlistbrowser/PodcastCategory.cpp
@@ -24,7 +24,7 @@
 #include "context/popupdropper/libpud/PopupDropperItem.h"
 #include "context/popupdropper/libpud/PopupDropper.h"
 #include "Debug.h"
-#include "meta/support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 #include "PodcastModel.h"
 #include "PodcastMeta.h"
 #include "PopupDropperFactory.h"
diff --git a/src/browsers/playlistbrowser/UserPlaylistModel.cpp b/src/browsers/playlistbrowser/UserPlaylistModel.cpp
index ef32031..cb36a8c 100644
--- a/src/browsers/playlistbrowser/UserPlaylistModel.cpp
+++ b/src/browsers/playlistbrowser/UserPlaylistModel.cpp
@@ -17,7 +17,7 @@
 
 #include "UserPlaylistModel.h"
 #include "playlistmanager/PlaylistManager.h"
-#include "playlists/PlaylistProvider.h"
+#include "core/playlists/PlaylistProvider.h"
 
 #include "AmarokMimeData.h"
 #include "CollectionManager.h"
diff --git a/src/browsers/playlistbrowser/UserPlaylistModel.h b/src/browsers/playlistbrowser/UserPlaylistModel.h
index 37808ca..8d4de98 100644
--- a/src/browsers/playlistbrowser/UserPlaylistModel.h
+++ b/src/browsers/playlistbrowser/UserPlaylistModel.h
@@ -18,8 +18,8 @@
 #define USERPLAYLISTMODEL_H
 
 #include "MetaPlaylistModel.h"
-#include "Meta.h"
-#include "playlists/Playlist.h"
+#include "core/meta/Meta.h"
+#include "core/playlists/Playlist.h"
 
 #include <QAction>
 #include <QAbstractItemModel>
diff --git a/src/collection/CMakeLists.txt b/src/collection/CMakeLists.txt
index c3a8c32..79046d6 100644
--- a/src/collection/CMakeLists.txt
+++ b/src/collection/CMakeLists.txt
@@ -1,4 +1,8 @@
-include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES}  )
+include_directories(
+                    ${KDE4_INCLUDE_DIR}
+                    ${QT_INCLUDES}
+                    ${Amarok_SOURCE_DIR}/src
+                   )
 
 set(AMAROK_COLLECTION_SUPPORT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/support)
 
diff --git a/src/collection/Collection.cpp b/src/collection/Collection.cpp
index 19932c9..d4912e1 100644
--- a/src/collection/Collection.cpp
+++ b/src/collection/Collection.cpp
@@ -17,7 +17,7 @@
 #include "Collection.h"
 
 #include "CollectionLocation.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 Amarok::CollectionFactory::CollectionFactory() : QObject()
 {
diff --git a/src/collection/Collection.h b/src/collection/Collection.h
index d74f803..86614cb 100644
--- a/src/collection/Collection.h
+++ b/src/collection/Collection.h
@@ -19,9 +19,9 @@
 
 #include "Amarok.h"
 #include "amarok_export.h"
-#include "capabilities/Capability.h"
+#include "core/capabilities/Capability.h"
 #include "QueryMaker.h"
-#include "playlists/providers/user/UserPlaylistProvider.h"
+#include "core/playlists/providers/user/UserPlaylistProvider.h"
 
 #include <QObject>
 #include <QSharedData>
diff --git a/src/collection/CollectionLocation.cpp b/src/collection/CollectionLocation.cpp
index cb73f38..721e0ef 100644
--- a/src/collection/CollectionLocation.cpp
+++ b/src/collection/CollectionLocation.cpp
@@ -23,7 +23,7 @@
 #include "Components.h"
 #include "Debug.h"
 #include "QueryMaker.h"
-#include "capabilities/UpdateCapability.h"
+#include "core/capabilities/UpdateCapability.h"
 
 
 CollectionLocation::CollectionLocation()
diff --git a/src/collection/CollectionLocation.h b/src/collection/CollectionLocation.h
index 116acba..aa4d699 100644
--- a/src/collection/CollectionLocation.h
+++ b/src/collection/CollectionLocation.h
@@ -20,7 +20,7 @@
 #define AMAROK_COLLECTIONLOCATION_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QList>
 #include <QObject>
diff --git a/src/collection/CollectionLocationDelegate.h b/src/collection/CollectionLocationDelegate.h
index 44eedbb..9b7718c 100644
--- a/src/collection/CollectionLocationDelegate.h
+++ b/src/collection/CollectionLocationDelegate.h
@@ -19,7 +19,7 @@
 #define COLLECTIONLOCATIONDELEGATE_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 class CollectionLocation;
 
diff --git a/src/collection/CollectionManager.cpp b/src/collection/CollectionManager.cpp
index 190f464..478c823 100644
--- a/src/collection/CollectionManager.cpp
+++ b/src/collection/CollectionManager.cpp
@@ -23,8 +23,8 @@
 #include "Collection.h"
 #include "EngineController.h"
 #include "MetaQueryMaker.h"
-#include "meta/impl/file/File.h"
-#include "meta/impl/stream/Stream.h"
+#include "core/meta/impl/file/File.h"
+#include "core/meta/impl/stream/Stream.h"
 #include "PluginManager.h"
 #include "SmartPointerList.h"
 #include "SqlStorage.h"
diff --git a/src/collection/CollectionManager.h b/src/collection/CollectionManager.h
index 7365ba7..6128d10 100644
--- a/src/collection/CollectionManager.h
+++ b/src/collection/CollectionManager.h
@@ -19,7 +19,7 @@
 
 #include "amarok_export.h"
 #include "Collection.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "QueryMaker.h"
 
 #include <QList>
diff --git a/src/collection/QueryMaker.h b/src/collection/QueryMaker.h
index f2ea81e..1c6c26b 100644
--- a/src/collection/QueryMaker.h
+++ b/src/collection/QueryMaker.h
@@ -18,8 +18,8 @@
 #define AMAROK_COLLECTION_QUERYMAKER_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
-#include "meta/support/MetaConstants.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaConstants.h"
 
 #include <QObject>
 #include <QStringList>
diff --git a/src/collection/TrackForUrlWorker.h b/src/collection/TrackForUrlWorker.h
index 0903c2c..d276370 100644
--- a/src/collection/TrackForUrlWorker.h
+++ b/src/collection/TrackForUrlWorker.h
@@ -19,7 +19,7 @@
 
 #include "Amarok.h"
 #include "amarok_export.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <KUrl>
 
diff --git a/src/collection/audiocd/AudioCdCollection.h b/src/collection/audiocd/AudioCdCollection.h
index 3b84fa7..aef886a 100644
--- a/src/collection/audiocd/AudioCdCollection.h
+++ b/src/collection/audiocd/AudioCdCollection.h
@@ -20,7 +20,7 @@
 #include "Collection.h"
 #include "MediaDeviceCollection.h"
 #include "MemoryCollection.h"
-#include "meta/impl/proxy/MetaProxy.h"
+#include "core/meta/impl/proxy/MetaProxy.h"
 
 #include <kio/jobclasses.h>
 #include <KUrl>
diff --git a/src/collection/audiocd/AudioCdCollectionCapability.h b/src/collection/audiocd/AudioCdCollectionCapability.h
index f4f9d57..936cbce 100644
--- a/src/collection/audiocd/AudioCdCollectionCapability.h
+++ b/src/collection/audiocd/AudioCdCollectionCapability.h
@@ -17,9 +17,9 @@
 #ifndef AUDIOCDCOLLECTIONCAPABILITY_H
 #define AUDIOCDCOLLECTIONCAPABILITY_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
-#include "capabilities/CollectionCapability.h"
+#include "core/capabilities/CollectionCapability.h"
 
 class AudioCdCollection;
 
diff --git a/src/collection/audiocd/AudioCdMeta.h b/src/collection/audiocd/AudioCdMeta.h
index b85d924..603b106 100644
--- a/src/collection/audiocd/AudioCdMeta.h
+++ b/src/collection/audiocd/AudioCdMeta.h
@@ -18,7 +18,7 @@
 #ifndef AUDIOCDMETA_H
 #define AUDIOCDMETA_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 class AudioCdCollection;
 
diff --git a/src/collection/audiocd/CMakeLists.txt b/src/collection/audiocd/CMakeLists.txt
index 600303d..f6b785d 100644
--- a/src/collection/audiocd/CMakeLists.txt
+++ b/src/collection/audiocd/CMakeLists.txt
@@ -1,7 +1,5 @@
 include_directories( ../..
         ../../plugin
-        ../../meta
-        ../../meta/capabilities
         ../../collection
         ../mediadevicecollection
         ../mediadevicecollection/support
diff --git a/src/collection/daap/CMakeLists.txt b/src/collection/daap/CMakeLists.txt
index 0223266..9651e9d 100644
--- a/src/collection/daap/CMakeLists.txt
+++ b/src/collection/daap/CMakeLists.txt
@@ -1,6 +1,5 @@
 include_directories( ../..
     ../../plugin
-    ../../meta
     ../../collection
     ${CMAKE_CURRENT_BINARY_DIR}/../..
     ${AMAROK_COLLECTION_SUPPORT_DIR}
diff --git a/src/collection/daap/DaapMeta.h b/src/collection/daap/DaapMeta.h
index 9b1be9c..d951503 100644
--- a/src/collection/daap/DaapMeta.h
+++ b/src/collection/daap/DaapMeta.h
@@ -17,7 +17,7 @@
 #ifndef DAAPMETA_H
 #define DAAPMETA_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 class DaapCollection;
 
diff --git a/src/collection/ipodcollection/CMakeLists.txt b/src/collection/ipodcollection/CMakeLists.txt
index e8045b2..47d8a8b 100644
--- a/src/collection/ipodcollection/CMakeLists.txt
+++ b/src/collection/ipodcollection/CMakeLists.txt
@@ -6,8 +6,6 @@ endif(NOT GDK_FOUND)
 if (IPOD_FOUND AND WITH_IPOD)
    include_directories( ../..
    ../../plugin
-   ../../meta
-   ../../meta/file
    ../../collection
    ../../metadata/audible
    ../mediadevicecollection
diff --git a/src/collection/ipodcollection/handler/IpodHandler.cpp b/src/collection/ipodcollection/handler/IpodHandler.cpp
index a847d07..712815f 100644
--- a/src/collection/ipodcollection/handler/IpodHandler.cpp
+++ b/src/collection/ipodcollection/handler/IpodHandler.cpp
@@ -34,7 +34,7 @@ extern "C" {
 
 #include "SvgHandler.h"
 
-#include "meta/impl/file/File.h" // for KIO file handling
+#include "core/meta/impl/file/File.h" // for KIO file handling
 
 #include <KCodecs> // KMD5
 #include <kdiskfreespaceinfo.h>
diff --git a/src/collection/mediadevicecollection/MediaDeviceCollection.cpp b/src/collection/mediadevicecollection/MediaDeviceCollection.cpp
index a8d1586..9e25480 100644
--- a/src/collection/mediadevicecollection/MediaDeviceCollection.cpp
+++ b/src/collection/mediadevicecollection/MediaDeviceCollection.cpp
@@ -22,7 +22,7 @@
 #include "MediaDeviceInfo.h"
 #include "MediaDeviceMeta.h"
 
-#include "capabilities/CollectionCapability.h"
+#include "core/capabilities/CollectionCapability.h"
 #include "MediaDeviceCollectionCapability.h"
 #include "MediaDeviceDecoratorCapability.h"
 
diff --git a/src/collection/mediadevicecollection/MediaDeviceCollectionCapability.h b/src/collection/mediadevicecollection/MediaDeviceCollectionCapability.h
index 0ddf1e0..5c81ad4 100644
--- a/src/collection/mediadevicecollection/MediaDeviceCollectionCapability.h
+++ b/src/collection/mediadevicecollection/MediaDeviceCollectionCapability.h
@@ -17,9 +17,9 @@
 #ifndef MEDIADEVICECOLLECTIONCAPABILITY_H
 #define MEDIADEVICECOLLECTIONCAPABILITY_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
-#include "capabilities/CollectionCapability.h"
+#include "core/capabilities/CollectionCapability.h"
 
 class MediaDeviceCollection;
 
diff --git a/src/collection/mediadevicecollection/MediaDeviceCollectionLocation.cpp b/src/collection/mediadevicecollection/MediaDeviceCollectionLocation.cpp
index 1c3cf7d..f2f8346 100644
--- a/src/collection/mediadevicecollection/MediaDeviceCollectionLocation.cpp
+++ b/src/collection/mediadevicecollection/MediaDeviceCollectionLocation.cpp
@@ -17,7 +17,7 @@
 #include "MediaDeviceCollectionLocation.h"
 
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "MediaDeviceCollection.h"
 #include "MediaDeviceHandler.h"
 //#include "MediaDeviceMeta.h"
diff --git a/src/collection/mediadevicecollection/MediaDeviceDecoratorCapability.cpp b/src/collection/mediadevicecollection/MediaDeviceDecoratorCapability.cpp
index 578a371..9dfc321 100644
--- a/src/collection/mediadevicecollection/MediaDeviceDecoratorCapability.cpp
+++ b/src/collection/mediadevicecollection/MediaDeviceDecoratorCapability.cpp
@@ -17,7 +17,7 @@
 #include "MediaDeviceDecoratorCapability.h"
 #include "MediaDeviceCollection.h"
 
-#include "capabilities/CollectionCapability.h"
+#include "core/capabilities/CollectionCapability.h"
 
 #include <QAction>
 
diff --git a/src/collection/mediadevicecollection/MediaDeviceDecoratorCapability.h b/src/collection/mediadevicecollection/MediaDeviceDecoratorCapability.h
index ac016b9..c122c3b 100644
--- a/src/collection/mediadevicecollection/MediaDeviceDecoratorCapability.h
+++ b/src/collection/mediadevicecollection/MediaDeviceDecoratorCapability.h
@@ -17,9 +17,9 @@
 #ifndef MEDIADEVICE_DECORATOR_CAPABILITY_H
 #define MEDIADEVICE_DECORATOR_CAPABILITY_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
-#include "capabilities/DecoratorCapability.h"
+#include "core/capabilities/DecoratorCapability.h"
 
 class MediaDeviceCollection;
 class QAction;
diff --git a/src/collection/mediadevicecollection/MediaDeviceMeta.cpp b/src/collection/mediadevicecollection/MediaDeviceMeta.cpp
index 03de886..1804cee 100644
--- a/src/collection/mediadevicecollection/MediaDeviceMeta.cpp
+++ b/src/collection/mediadevicecollection/MediaDeviceMeta.cpp
@@ -26,9 +26,9 @@
 #include "covermanager/CoverFetchingActions.h"
 #include "Debug.h"
 #include "SvgHandler.h"
-#include "capabilities/CustomActionsCapability.h"
-#include "capabilities/EditCapability.h"
-#include "capabilities/UpdateCapability.h"
+#include "core/capabilities/CustomActionsCapability.h"
+#include "core/capabilities/EditCapability.h"
+#include "core/capabilities/UpdateCapability.h"
 
 #include <KIcon>
 #include <KUrl>
diff --git a/src/collection/mediadevicecollection/MediaDeviceMeta.h b/src/collection/mediadevicecollection/MediaDeviceMeta.h
index 3c77bce..87dfd57 100644
--- a/src/collection/mediadevicecollection/MediaDeviceMeta.h
+++ b/src/collection/mediadevicecollection/MediaDeviceMeta.h
@@ -18,7 +18,7 @@
 #define MEDIADEVICEMETA_H
 
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "mediadevicecollection_export.h"
 
 #include <QList>
diff --git a/src/collection/mediadevicecollection/handler/MediaDeviceHandler.h b/src/collection/mediadevicecollection/handler/MediaDeviceHandler.h
index d1a06a2..204cdd2 100644
--- a/src/collection/mediadevicecollection/handler/MediaDeviceHandler.h
+++ b/src/collection/mediadevicecollection/handler/MediaDeviceHandler.h
@@ -28,12 +28,12 @@
 
 #include "MediaDeviceMeta.h"
 #include "MemoryCollection.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "statusbar/StatusBar.h"
 
 #include "mediadevicecollection_export.h"
 
-#include "playlists/providers/user/UserPlaylistProvider.h"
+#include "core/playlists/providers/user/UserPlaylistProvider.h"
 
 #include <threadweaver/Job.h>
 
diff --git a/src/collection/mediadevicecollection/playlist/MediaDevicePlaylist.cpp b/src/collection/mediadevicecollection/playlist/MediaDevicePlaylist.cpp
index 11c265a..b95afa9 100644
--- a/src/collection/mediadevicecollection/playlist/MediaDevicePlaylist.cpp
+++ b/src/collection/mediadevicecollection/playlist/MediaDevicePlaylist.cpp
@@ -18,7 +18,7 @@
 
 #include "CollectionManager.h"
 #include "Debug.h"
-//#include "meta/stream/Stream.h"
+//#include "core/meta/stream/Stream.h"
 //#include "MediaDeviceStorage.h"
 #include "playlistmanager/PlaylistManager.h"
 #include "MediaDeviceUserPlaylistProvider.h"
diff --git a/src/collection/mediadevicecollection/playlist/MediaDevicePlaylist.h b/src/collection/mediadevicecollection/playlist/MediaDevicePlaylist.h
index 214c3f1..ea30ef6 100644
--- a/src/collection/mediadevicecollection/playlist/MediaDevicePlaylist.h
+++ b/src/collection/mediadevicecollection/playlist/MediaDevicePlaylist.h
@@ -17,7 +17,7 @@
 #ifndef METAMEDIADEVICEPLAYLIST_H
 #define METAMEDIADEVICEPLAYLIST_H
 
-#include "playlists/Playlist.h"
+#include "core/playlists/Playlist.h"
 
 #include "Debug.h"
 
diff --git a/src/collection/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.cpp b/src/collection/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.cpp
index d192840..72029f7 100644
--- a/src/collection/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.cpp
+++ b/src/collection/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.cpp
@@ -21,10 +21,10 @@
 #include "CollectionManager.h"
 #include "Debug.h"
 #include "MediaDeviceCollection.h"
-#include "playlists/impl/file/m3u/M3UPlaylist.h"
-#include "playlists/impl/file/pls/PLSPlaylist.h"
-#include "playlists/impl/file/xspf/XSPFPlaylist.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/impl/file/m3u/M3UPlaylist.h"
+#include "core/playlists/impl/file/pls/PLSPlaylist.h"
+#include "core/playlists/impl/file/xspf/XSPFPlaylist.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "PlaylistManager.h"
 //#include "MediaDeviceStorage.h"
 #include "SvgHandler.h"
diff --git a/src/collection/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.h b/src/collection/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.h
index 9520e6c..4ca67ec 100644
--- a/src/collection/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.h
+++ b/src/collection/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_COLLECTION_MEDIADEVICEUSERPLAYLISTPROVIDER_H
 #define AMAROK_COLLECTION_MEDIADEVICEUSERPLAYLISTPROVIDER_H
 
-#include "playlists/providers/user/UserPlaylistProvider.h"
+#include "core/playlists/providers/user/UserPlaylistProvider.h"
 #include "MediaDevicePlaylist.h"
 
 #include <klocale.h>
diff --git a/src/collection/mtpcollection/CMakeLists.txt b/src/collection/mtpcollection/CMakeLists.txt
index 00978c7..c1283ef 100644
--- a/src/collection/mtpcollection/CMakeLists.txt
+++ b/src/collection/mtpcollection/CMakeLists.txt
@@ -5,8 +5,6 @@ if (MTP_FOUND)
    include_directories(
        ${Amarok_SOURCE_DIR}/src
        ${Amarok_SOURCE_DIR}/src/plugin
-       ${Amarok_SOURCE_DIR}/src/meta
-       ${Amarok_SOURCE_DIR}/src/meta/capabilities
        ${Amarok_SOURCE_DIR}/src/collection
        ${Amarok_SOURCE_DIR}/src/collection/mediadevicecollection
        ${Amarok_SOURCE_DIR}/src/collection/mediadevicecollection/support
diff --git a/src/collection/mtpcollection/handler/MtpHandler.cpp b/src/collection/mtpcollection/handler/MtpHandler.cpp
index c441f7c..37ccb12 100644
--- a/src/collection/mtpcollection/handler/MtpHandler.cpp
+++ b/src/collection/mtpcollection/handler/MtpHandler.cpp
@@ -25,7 +25,7 @@
 #include "MtpCollection.h"
 #include "Debug.h"
 
-#include "meta/impl/file/File.h" // for KIO file handling
+#include "core/meta/impl/file/File.h" // for KIO file handling
 
 #include <KIO/Job>
 #include <KIO/DeleteJob>
diff --git a/src/collection/nepomukcollection/CMakeLists.txt b/src/collection/nepomukcollection/CMakeLists.txt
index 707a660..86e4f76 100644
--- a/src/collection/nepomukcollection/CMakeLists.txt
+++ b/src/collection/nepomukcollection/CMakeLists.txt
@@ -1,7 +1,6 @@
 
 include_directories( ../..
         ../../plugin
-   ../../meta
    ../../collection
    ../../dialogs
 #./search-api
diff --git a/src/collection/nepomukcollection/NepomukAlbum.cpp b/src/collection/nepomukcollection/NepomukAlbum.cpp
index 929a051..1b96fa5 100644
--- a/src/collection/nepomukcollection/NepomukAlbum.cpp
+++ b/src/collection/nepomukcollection/NepomukAlbum.cpp
@@ -22,9 +22,9 @@
 #include "NepomukRegistry.h"
 
 #include "covermanager/CoverFetchingActions.h"
-#include "meta/CustomActionsCapability.h"
+#include "core/meta/CustomActionsCapability.h"
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QAction>
 #include <QDir>
diff --git a/src/collection/nepomukcollection/NepomukAlbum.h b/src/collection/nepomukcollection/NepomukAlbum.h
index 73fab5a..7f0f722 100644
--- a/src/collection/nepomukcollection/NepomukAlbum.h
+++ b/src/collection/nepomukcollection/NepomukAlbum.h
@@ -19,7 +19,7 @@
 
 #include "NepomukCollection.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QPixmap>
 #include <QString>
diff --git a/src/collection/nepomukcollection/NepomukArtist.cpp b/src/collection/nepomukcollection/NepomukArtist.cpp
index 5ec9b7b..fe9dddf 100644
--- a/src/collection/nepomukcollection/NepomukArtist.cpp
+++ b/src/collection/nepomukcollection/NepomukArtist.cpp
@@ -20,7 +20,7 @@
 #include "NepomukQueryMaker.h"
 
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QString>
 
diff --git a/src/collection/nepomukcollection/NepomukArtist.h b/src/collection/nepomukcollection/NepomukArtist.h
index 3914495..f20d4eb 100644
--- a/src/collection/nepomukcollection/NepomukArtist.h
+++ b/src/collection/nepomukcollection/NepomukArtist.h
@@ -19,7 +19,7 @@
 
 #include "NepomukCollection.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 class NepomukCollection;
 
diff --git a/src/collection/nepomukcollection/NepomukComposer.cpp b/src/collection/nepomukcollection/NepomukComposer.cpp
index 295449f..e808063 100644
--- a/src/collection/nepomukcollection/NepomukComposer.cpp
+++ b/src/collection/nepomukcollection/NepomukComposer.cpp
@@ -16,7 +16,7 @@
 
 #include "NepomukComposer.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QString>
 
diff --git a/src/collection/nepomukcollection/NepomukComposer.h b/src/collection/nepomukcollection/NepomukComposer.h
index 7c29457..f3c3362 100644
--- a/src/collection/nepomukcollection/NepomukComposer.h
+++ b/src/collection/nepomukcollection/NepomukComposer.h
@@ -17,7 +17,7 @@
 #ifndef NEPOMUKCOMPOSER_H
 #define NEPOMUKCOMPOSER_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include "QString"
 
diff --git a/src/collection/nepomukcollection/NepomukGenre.cpp b/src/collection/nepomukcollection/NepomukGenre.cpp
index 1a1ed3a..2e2efd7 100644
--- a/src/collection/nepomukcollection/NepomukGenre.cpp
+++ b/src/collection/nepomukcollection/NepomukGenre.cpp
@@ -16,7 +16,7 @@
 
 #include "NepomukGenre.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QString>
 
diff --git a/src/collection/nepomukcollection/NepomukGenre.h b/src/collection/nepomukcollection/NepomukGenre.h
index 5aec0f5..8bd3b93 100644
--- a/src/collection/nepomukcollection/NepomukGenre.h
+++ b/src/collection/nepomukcollection/NepomukGenre.h
@@ -17,7 +17,7 @@
 #ifndef NEPOMUKGENRE_H
 #define NEPOMUKGENRE_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include "QString"
 
diff --git a/src/collection/nepomukcollection/NepomukRegistry.h b/src/collection/nepomukcollection/NepomukRegistry.h
index 67528a7..a21347e 100644
--- a/src/collection/nepomukcollection/NepomukRegistry.h
+++ b/src/collection/nepomukcollection/NepomukRegistry.h
@@ -22,7 +22,7 @@
 #include "NepomukArtist.h"
 #include "NepomukTrack.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QHash>
 #include <QTimer>
diff --git a/src/collection/nepomukcollection/NepomukTrack.cpp b/src/collection/nepomukcollection/NepomukTrack.cpp
index 8b50cd6..afed68d 100644
--- a/src/collection/nepomukcollection/NepomukTrack.cpp
+++ b/src/collection/nepomukcollection/NepomukTrack.cpp
@@ -26,7 +26,7 @@
 
 #include "Amarok.h"
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QDateTime>
 #include <QFile>
diff --git a/src/collection/nepomukcollection/NepomukTrack.h b/src/collection/nepomukcollection/NepomukTrack.h
index c2d984c..53fdb23 100644
--- a/src/collection/nepomukcollection/NepomukTrack.h
+++ b/src/collection/nepomukcollection/NepomukTrack.h
@@ -17,7 +17,7 @@
 #ifndef NEPOMUKTRACK_H
 #define NEPOMUKTRACK_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QDateTime>
 
diff --git a/src/collection/nepomukcollection/NepomukYear.cpp b/src/collection/nepomukcollection/NepomukYear.cpp
index 972b880..2b9fecf 100644
--- a/src/collection/nepomukcollection/NepomukYear.cpp
+++ b/src/collection/nepomukcollection/NepomukYear.cpp
@@ -16,7 +16,7 @@
 
 #include "NepomukYear.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QString>
 
diff --git a/src/collection/nepomukcollection/NepomukYear.h b/src/collection/nepomukcollection/NepomukYear.h
index f07a359..4542651 100644
--- a/src/collection/nepomukcollection/NepomukYear.h
+++ b/src/collection/nepomukcollection/NepomukYear.h
@@ -17,7 +17,7 @@
 #ifndef NEPOMUKYEAR_H
 #define NEPOMUKYEAR_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QString>
 
diff --git a/src/collection/proxycollection/ProxyCollection.h b/src/collection/proxycollection/ProxyCollection.h
index fc522de..b593437 100644
--- a/src/collection/proxycollection/ProxyCollection.h
+++ b/src/collection/proxycollection/ProxyCollection.h
@@ -21,8 +21,8 @@
 
 #include "collection/Collection.h"
 #include "collection/CollectionManager.h"
-#include "meta/Meta.h"
-#include "support/MetaUtility.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaUtility.h"
 
 #include <QString>
 #include <QHash>
diff --git a/src/collection/proxycollection/ProxyCollectionMeta.cpp b/src/collection/proxycollection/ProxyCollectionMeta.cpp
index 7c2fb08..322f1c7 100644
--- a/src/collection/proxycollection/ProxyCollectionMeta.cpp
+++ b/src/collection/proxycollection/ProxyCollectionMeta.cpp
@@ -20,8 +20,8 @@
 
 #include "ProxyCollectionMeta.h"
 
-#include "support/MetaUtility.h"
-#include "capabilities/EditCapability.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/EditCapability.h"
 #include "ProxyCollection.h"
 
 #include "Debug.h"
diff --git a/src/collection/proxycollection/ProxyCollectionMeta.h b/src/collection/proxycollection/ProxyCollectionMeta.h
index 0a26098..f425aa5 100644
--- a/src/collection/proxycollection/ProxyCollectionMeta.h
+++ b/src/collection/proxycollection/ProxyCollectionMeta.h
@@ -19,7 +19,7 @@
 #ifndef PROXYCOLLECTIONMETA_H
 #define PROXYCOLLECTIONMETA_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QList>
 
diff --git a/src/collection/proxycollection/ProxyCollectionQueryMaker.cpp b/src/collection/proxycollection/ProxyCollectionQueryMaker.cpp
index 60b6d09..7f9c459 100644
--- a/src/collection/proxycollection/ProxyCollectionQueryMaker.cpp
+++ b/src/collection/proxycollection/ProxyCollectionQueryMaker.cpp
@@ -23,7 +23,7 @@
 #include "collection/support/MemoryCustomValue.h"
 #include "collection/support/MemoryQueryMakerHelper.h"
 #include "Debug.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "ProxyCollection.h"
 
 #include <QMetaEnum>
diff --git a/src/collection/sqlcollection/CMakeLists.txt b/src/collection/sqlcollection/CMakeLists.txt
index 4ba6241..62b8fb6 100644
--- a/src/collection/sqlcollection/CMakeLists.txt
+++ b/src/collection/sqlcollection/CMakeLists.txt
@@ -1,7 +1,6 @@
 
 include_directories(
     .
-    ../../meta
     ${CMAKE_SOURCE_DIR}/src
     ${CMAKE_SOURCE_DIR}/utilities
     ${CMAKE_BINARY_DIR}/src
diff --git a/src/collection/sqlcollection/CapabilityDelegate.h b/src/collection/sqlcollection/CapabilityDelegate.h
index efe86f7..20c6847 100644
--- a/src/collection/sqlcollection/CapabilityDelegate.h
+++ b/src/collection/sqlcollection/CapabilityDelegate.h
@@ -18,7 +18,7 @@
 #define CAPABILITYDELEGATE_H
 
 #include "amarok_sqlcollection_export.h"
-#include "capabilities/Capability.h"
+#include "core/capabilities/Capability.h"
 
 class SqlCollection;
 
diff --git a/src/collection/sqlcollection/CapabilityDelegateImpl.cpp b/src/collection/sqlcollection/CapabilityDelegateImpl.cpp
index e171ba7..737e640 100644
--- a/src/collection/sqlcollection/CapabilityDelegateImpl.cpp
+++ b/src/collection/sqlcollection/CapabilityDelegateImpl.cpp
@@ -24,15 +24,15 @@
 #include "SqlWriteLabelCapability.h"
 #include "amarokurls/BookmarkMetaActions.h"
 #include "covermanager/CoverFetchingActions.h"
-#include "capabilities/CustomActionsCapability.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "capabilities/EditCapability.h"
-#include "capabilities/FindInSourceCapability.h"
-#include "capabilities/StatisticsCapability.h"
-#include "capabilities/TimecodeLoadCapability.h"
-#include "capabilities/TimecodeWriteCapability.h"
-#include "capabilities/OrganiseCapability.h"
-#include "capabilities/UpdateCapability.h"
+#include "core/capabilities/CustomActionsCapability.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/capabilities/EditCapability.h"
+#include "core/capabilities/FindInSourceCapability.h"
+#include "core/capabilities/StatisticsCapability.h"
+#include "core/capabilities/TimecodeLoadCapability.h"
+#include "core/capabilities/TimecodeWriteCapability.h"
+#include "core/capabilities/OrganiseCapability.h"
+#include "core/capabilities/UpdateCapability.h"
 #include "amarokurls/PlayUrlRunner.h"
 
 #include <QAction>
diff --git a/src/collection/sqlcollection/CapabilityDelegateImpl.h b/src/collection/sqlcollection/CapabilityDelegateImpl.h
index 5cc7c9c..43396e8 100644
--- a/src/collection/sqlcollection/CapabilityDelegateImpl.h
+++ b/src/collection/sqlcollection/CapabilityDelegateImpl.h
@@ -19,7 +19,7 @@
 
 #include "CapabilityDelegate.h"
 #include "amarok_sqlcollection_export.h"
-#include "capabilities/Capability.h"
+#include "core/capabilities/Capability.h"
 
 #include <QAction>
 
diff --git a/src/collection/sqlcollection/ScanManager.cpp b/src/collection/sqlcollection/ScanManager.cpp
index a72056a..267ba08 100644
--- a/src/collection/sqlcollection/ScanManager.cpp
+++ b/src/collection/sqlcollection/ScanManager.cpp
@@ -26,8 +26,8 @@
 #include "SqlCollection.h"
 #include "SqlCollectionDBusHandler.h"
 #include "amarokconfig.h"
-#include "meta/support/MetaConstants.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaConstants.h"
+#include "core/meta/support/MetaUtility.h"
 #include "playlistmanager/PlaylistManager.h"
 #include "statusbar/StatusBar.h"
 
diff --git a/src/collection/sqlcollection/ScanResultProcessor.cpp b/src/collection/sqlcollection/ScanResultProcessor.cpp
index 470bad6..8d2e461 100644
--- a/src/collection/sqlcollection/ScanResultProcessor.cpp
+++ b/src/collection/sqlcollection/ScanResultProcessor.cpp
@@ -19,8 +19,8 @@
 
 #include "ArtistHelper.h"
 #include "Debug.h"
-#include "meta/support/MetaConstants.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaConstants.h"
+#include "core/meta/support/MetaUtility.h"
 
 #include <QDir>
 #include <QFileInfo>
diff --git a/src/collection/sqlcollection/SqlBookmarkThisCapability.h b/src/collection/sqlcollection/SqlBookmarkThisCapability.h
index 0358fdd..27ece4d 100644
--- a/src/collection/sqlcollection/SqlBookmarkThisCapability.h
+++ b/src/collection/sqlcollection/SqlBookmarkThisCapability.h
@@ -17,7 +17,7 @@
 #ifndef METASQLBOOKMARKTHISCAPABILITY_H
 #define METASQLBOOKMARKTHISCAPABILITY_H
 
-#include "capabilities/BookmarkThisCapability.h"
+#include "core/capabilities/BookmarkThisCapability.h"
 #include "SqlMeta.h"
 
 namespace Meta
diff --git a/src/collection/sqlcollection/SqlCollectionLocation.cpp b/src/collection/sqlcollection/SqlCollectionLocation.cpp
index a52a431..6205652 100644
--- a/src/collection/sqlcollection/SqlCollectionLocation.cpp
+++ b/src/collection/sqlcollection/SqlCollectionLocation.cpp
@@ -24,8 +24,8 @@
 #include "Components.h"
 #include "Debug.h"
 #include "collection/SqlStorage.h"
-#include "meta/Meta.h"
-#include "support/MetaUtility.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaUtility.h"
 #include "MountPointManager.h"
 #include "dialogs/OrganizeCollectionDialog.h"
 #include "ScanManager.h"
diff --git a/src/collection/sqlcollection/SqlMeta.cpp b/src/collection/sqlcollection/SqlMeta.cpp
index 178860a..7b18e23 100644
--- a/src/collection/sqlcollection/SqlMeta.cpp
+++ b/src/collection/sqlcollection/SqlMeta.cpp
@@ -21,8 +21,8 @@
 #include "Amarok.h"
 #include "CapabilityDelegate.h"
 #include "Debug.h"
-#include "meta/support/MetaUtility.h"
-#include "meta/impl/file/TagLibUtils.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/meta/impl/file/TagLibUtils.h"
 #include "ArtistHelper.h"
 #include "SqlCollection.h"
 #include "SqlQueryMaker.h"
diff --git a/src/collection/sqlcollection/SqlMeta.h b/src/collection/sqlcollection/SqlMeta.h
index 9c4d9cd..32d74e2 100644
--- a/src/collection/sqlcollection/SqlMeta.h
+++ b/src/collection/sqlcollection/SqlMeta.h
@@ -18,7 +18,7 @@
 #ifndef SQLMETA_H
 #define SQLMETA_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "amarok_sqlcollection_export.h"
 
 #include <QByteArray>
diff --git a/src/collection/sqlcollection/SqlQueryMakerInternal.h b/src/collection/sqlcollection/SqlQueryMakerInternal.h
index b8ecda4..9b07759 100644
--- a/src/collection/sqlcollection/SqlQueryMakerInternal.h
+++ b/src/collection/sqlcollection/SqlQueryMakerInternal.h
@@ -18,7 +18,7 @@
 #define SQLQUERYMAKERINTERNAL_H
 
 #include "collection/QueryMaker.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QObject>
 #include <QPointer>
diff --git a/src/collection/sqlcollection/SqlReadLabelCapability.h b/src/collection/sqlcollection/SqlReadLabelCapability.h
index d40a206..d6710c0 100644
--- a/src/collection/sqlcollection/SqlReadLabelCapability.h
+++ b/src/collection/sqlcollection/SqlReadLabelCapability.h
@@ -19,7 +19,7 @@
 #ifndef SQLREADLABELCAPABILITY_H
 #define SQLREADLABELCAPABILITY_H
 
-#include "capabilities/ReadLabelCapability.h"
+#include "core/capabilities/ReadLabelCapability.h"
 #include "SqlMeta.h"
 
 class SqlStorage;
diff --git a/src/collection/sqlcollection/SqlWriteLabelCapability.h b/src/collection/sqlcollection/SqlWriteLabelCapability.h
index afd2a8c..62d542f 100644
--- a/src/collection/sqlcollection/SqlWriteLabelCapability.h
+++ b/src/collection/sqlcollection/SqlWriteLabelCapability.h
@@ -19,7 +19,7 @@
 #ifndef SQLWRITELABELCAPABILITY_H
 #define SQLWRITELABELCAPABILITY_H
 
-#include "capabilities/WriteLabelCapability.h"
+#include "core/capabilities/WriteLabelCapability.h"
 #include "SqlMeta.h"
 
 class SqlStorage;
diff --git a/src/collection/sqlcollection/XesamCollectionBuilder.cpp b/src/collection/sqlcollection/XesamCollectionBuilder.cpp
index 061bdc5..76310dd 100644
--- a/src/collection/sqlcollection/XesamCollectionBuilder.cpp
+++ b/src/collection/sqlcollection/XesamCollectionBuilder.cpp
@@ -17,7 +17,7 @@
 #include "XesamCollectionBuilder.h"
 
 #include "Debug.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 #include "SqlCollection.h"
 #include "XesamDbus.h"
 
diff --git a/src/collection/support/MemoryCollection.h b/src/collection/support/MemoryCollection.h
index 13007e4..37e38e4 100644
--- a/src/collection/support/MemoryCollection.h
+++ b/src/collection/support/MemoryCollection.h
@@ -17,7 +17,7 @@
 #ifndef MEMORYCOLLECTION_H
 #define MEMORYCOLLECTION_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QReadWriteLock>
 
diff --git a/src/collection/support/MemoryCustomValue.h b/src/collection/support/MemoryCustomValue.h
index 5d3eb4c..bbb1681 100644
--- a/src/collection/support/MemoryCustomValue.h
+++ b/src/collection/support/MemoryCustomValue.h
@@ -18,7 +18,7 @@
 #define MEMORYCUSTOMVALUE_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "collection/QueryMaker.h"
 
 #include <QList>
diff --git a/src/collection/support/MemoryFilter.h b/src/collection/support/MemoryFilter.h
index 00a50ae..6bb8106 100644
--- a/src/collection/support/MemoryFilter.h
+++ b/src/collection/support/MemoryFilter.h
@@ -18,7 +18,7 @@
 #define MEMORYFILTER_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "collection/QueryMaker.h"
 
 #include <QList>
diff --git a/src/collection/support/MemoryMatcher.h b/src/collection/support/MemoryMatcher.h
index beddaf8..76474a2 100644
--- a/src/collection/support/MemoryMatcher.h
+++ b/src/collection/support/MemoryMatcher.h
@@ -20,7 +20,7 @@
 
 #include "amarok_export.h"
 #include "MemoryCollection.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 /**
 A helper class for finding items in a MemoryCollection
diff --git a/src/collection/support/MemoryQueryMakerHelper.cpp b/src/collection/support/MemoryQueryMakerHelper.cpp
index 47c2463..01d58b9 100644
--- a/src/collection/support/MemoryQueryMakerHelper.cpp
+++ b/src/collection/support/MemoryQueryMakerHelper.cpp
@@ -17,7 +17,7 @@
 #include "MemoryQueryMakerHelper.h"
 
 #include "collection/support/MemoryCustomValue.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QList>
 #include <QSet>
diff --git a/src/collection/support/MemoryQueryMakerHelper.h b/src/collection/support/MemoryQueryMakerHelper.h
index 4595e97..f46a93a 100644
--- a/src/collection/support/MemoryQueryMakerHelper.h
+++ b/src/collection/support/MemoryQueryMakerHelper.h
@@ -18,7 +18,7 @@
 #define MEMORYQUERYMAKERHELPER_H
 
 #include <QList>
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 namespace MemoryQueryMakerHelper
 {
diff --git a/src/collection/support/MemoryQueryMakerInternal.cpp b/src/collection/support/MemoryQueryMakerInternal.cpp
index 897ac42..3293af2 100644
--- a/src/collection/support/MemoryQueryMakerInternal.cpp
+++ b/src/collection/support/MemoryQueryMakerInternal.cpp
@@ -22,7 +22,7 @@
 #include "MemoryMatcher.h"
 #include "MemoryQueryMakerHelper.h"
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QSharedPointer>
 
diff --git a/src/collection/support/MemoryQueryMakerInternal.h b/src/collection/support/MemoryQueryMakerInternal.h
index 095c691..e7abb5c 100644
--- a/src/collection/support/MemoryQueryMakerInternal.h
+++ b/src/collection/support/MemoryQueryMakerInternal.h
@@ -18,7 +18,7 @@
 #define MEMORYQUERYMAKERINTERNAL_H
 
 #include "collection/QueryMaker.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QObject>
 #include <QPointer>
diff --git a/src/collection/support/PlaylistCollection.cpp b/src/collection/support/PlaylistCollection.cpp
index 4ed0a4a..b54ef45 100644
--- a/src/collection/support/PlaylistCollection.cpp
+++ b/src/collection/support/PlaylistCollection.cpp
@@ -18,7 +18,7 @@
 
 #include "MemoryQueryMaker.h"
 #include "PlaylistCollectionLocation.h"
-#include "playlists/PlaylistProvider.h"
+#include "core/playlists/PlaylistProvider.h"
 
 PlaylistCollection::PlaylistCollection( const Meta::PlaylistPtr &playlist )
         : Amarok::Collection()
diff --git a/src/collection/support/PlaylistCollection.h b/src/collection/support/PlaylistCollection.h
index 31bf7ba..fca1c7c 100644
--- a/src/collection/support/PlaylistCollection.h
+++ b/src/collection/support/PlaylistCollection.h
@@ -19,7 +19,7 @@
 
 #include "collection/Collection.h"
 #include "MemoryCollection.h"
-#include "playlists/Playlist.h"
+#include "core/playlists/Playlist.h"
 
 #include <QSharedPointer>
 
diff --git a/src/collection/support/PlaylistCollectionLocation.cpp b/src/collection/support/PlaylistCollectionLocation.cpp
index 128cff1..ee9d53a 100644
--- a/src/collection/support/PlaylistCollectionLocation.cpp
+++ b/src/collection/support/PlaylistCollectionLocation.cpp
@@ -16,7 +16,7 @@
 
 #include "PlaylistCollectionLocation.h"
 
-#include "playlists/Playlist.h"
+#include "core/playlists/Playlist.h"
 #include "PlaylistCollection.h"
 
 PlaylistCollectionLocation::PlaylistCollectionLocation( const PlaylistCollection *collection )
diff --git a/src/collection/support/XmlQueryWriter.cpp b/src/collection/support/XmlQueryWriter.cpp
index 7d3890c..20b4997 100644
--- a/src/collection/support/XmlQueryWriter.cpp
+++ b/src/collection/support/XmlQueryWriter.cpp
@@ -17,7 +17,7 @@
  ****************************************************************************************/
 
 #include "XmlQueryWriter.h"
-#include "meta/support/MetaConstants.h"
+#include "core/meta/support/MetaConstants.h"
 
 #include "Debug.h"
 
diff --git a/src/collection/umscollection/CMakeLists.txt b/src/collection/umscollection/CMakeLists.txt
index 5b98b35..9087ad3 100644
--- a/src/collection/umscollection/CMakeLists.txt
+++ b/src/collection/umscollection/CMakeLists.txt
@@ -1,7 +1,5 @@
 include_directories( ../..
   ../../plugin
-  ../../meta
-  ../../meta/capabilities
   ../../collection
   ../../metadata/audible
   ../mediadevicecollection
diff --git a/src/collection/umscollection/handler/UmsHandler.cpp b/src/collection/umscollection/handler/UmsHandler.cpp
index 8c678c6..c3c1d20 100644
--- a/src/collection/umscollection/handler/UmsHandler.cpp
+++ b/src/collection/umscollection/handler/UmsHandler.cpp
@@ -25,7 +25,7 @@
 
 #include "SvgHandler.h"
 
-#include "meta/impl/file/File.h" // for KIO file handling
+#include "core/meta/impl/file/File.h" // for KIO file handling
 
 #include <KCodecs> // KMD5
 #include <KDirLister>
diff --git a/src/collection/umscollection/podcasts/UmsPodcastMeta.cpp b/src/collection/umscollection/podcasts/UmsPodcastMeta.cpp
index 519e51f..6ab9557 100644
--- a/src/collection/umscollection/podcasts/UmsPodcastMeta.cpp
+++ b/src/collection/umscollection/podcasts/UmsPodcastMeta.cpp
@@ -16,7 +16,7 @@
 
 #include "UmsPodcastMeta.h"
 
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "UmsPodcastProvider.h"
 
 using namespace Meta;
diff --git a/src/collection/umscollection/podcasts/UmsPodcastMeta.h b/src/collection/umscollection/podcasts/UmsPodcastMeta.h
index 578e351..a972988 100644
--- a/src/collection/umscollection/podcasts/UmsPodcastMeta.h
+++ b/src/collection/umscollection/podcasts/UmsPodcastMeta.h
@@ -17,10 +17,10 @@
 #ifndef UMSPODCASTMETA_H
 #define UMSPODCASTMETA_H
 
-#include "playlists/impl/file/PlaylistFile.h"
+#include "core/playlists/impl/file/PlaylistFile.h"
 #include "podcasts/PodcastMeta.h"
 
-#include "meta/impl/file/File.h"
+#include "core/meta/impl/file/File.h"
 
 class UmsPodcastEpisode;
 class UmsPodcastChannel;
diff --git a/src/collection/upnp/CMakeLists.txt b/src/collection/upnp/CMakeLists.txt
index 93d81e5..4e09efc 100644
--- a/src/collection/upnp/CMakeLists.txt
+++ b/src/collection/upnp/CMakeLists.txt
@@ -1,6 +1,5 @@
 include_directories( ../..
         ../../plugin
-   ../../meta
    ../../collection
    ${CMAKE_CURRENT_BINARY_DIR}/../..
    ${AMAROK_COLLECTION_SUPPORT_DIR}
diff --git a/src/context/CoverBling.cpp b/src/context/CoverBling.cpp
index 1af3c5e..342b510 100644
--- a/src/context/CoverBling.cpp
+++ b/src/context/CoverBling.cpp
@@ -20,7 +20,7 @@
 
 #include "Debug.h"
 #include "collection/CollectionManager.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <math.h>
 #ifdef Q_WS_MAC
diff --git a/src/context/CoverBling.h b/src/context/CoverBling.h
index c06ba95..cf3eb98 100644
--- a/src/context/CoverBling.h
+++ b/src/context/CoverBling.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_COVERBLING_H
 #define AMAROK_COVERBLING_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QGLWidget>
 
diff --git a/src/context/applets/CMakeLists.txt b/src/context/applets/CMakeLists.txt
index 0de16da..37832bb 100644
--- a/src/context/applets/CMakeLists.txt
+++ b/src/context/applets/CMakeLists.txt
@@ -1,8 +1,3 @@
-include_directories(
-                    ../../meta
-                    ../../meta/capabilities
-                   )
-
 add_subdirectory( albums )
 add_subdirectory( currenttrack )
 add_subdirectory( lyrics )
diff --git a/src/context/applets/albums/AlbumItem.cpp b/src/context/applets/albums/AlbumItem.cpp
index f765955..134b9f0 100644
--- a/src/context/applets/albums/AlbumItem.cpp
+++ b/src/context/applets/albums/AlbumItem.cpp
@@ -15,7 +15,7 @@
  ****************************************************************************************/
 
 #include "AlbumItem.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 
 #include <KLocale>
 
diff --git a/src/context/applets/albums/AlbumItem.h b/src/context/applets/albums/AlbumItem.h
index a8ac281..4bf7b72 100644
--- a/src/context/applets/albums/AlbumItem.h
+++ b/src/context/applets/albums/AlbumItem.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_ALBUMITEM_H
 #define AMAROK_ALBUMITEM_H
 
-#include <meta/Meta.h>
+#include "core/meta/Meta.h"
 
 #include <QSize>
 #include <QStandardItem>
diff --git a/src/context/applets/albums/Albums.cpp b/src/context/applets/albums/Albums.cpp
index ce8cf1e..8152b93 100644
--- a/src/context/applets/albums/Albums.cpp
+++ b/src/context/applets/albums/Albums.cpp
@@ -28,8 +28,8 @@
 #include "EngineController.h"
 #include "context/Svg.h"
 #include "context/widgets/TextScrollingWidget.h"
-#include "meta/Meta.h"
-#include "support/MetaUtility.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaUtility.h"
 #include "playlist/PlaylistModel.h"
 #include "TrackItem.h"
 
diff --git a/src/context/applets/albums/Albums.h b/src/context/applets/albums/Albums.h
index 2fb1fdb..8d93644 100644
--- a/src/context/applets/albums/Albums.h
+++ b/src/context/applets/albums/Albums.h
@@ -23,7 +23,7 @@
 
 #include <context/Applet.h>
 #include <context/DataEngine.h>
-#include <meta/Meta.h>
+#include "core/meta/Meta.h"
 
 #include <KDialog>
 
diff --git a/src/context/applets/albums/AlbumsView.cpp b/src/context/applets/albums/AlbumsView.cpp
index 99d05a3..7aafc5e 100644
--- a/src/context/applets/albums/AlbumsView.cpp
+++ b/src/context/applets/albums/AlbumsView.cpp
@@ -22,7 +22,7 @@
 #include "SvgHandler.h"
 #include "TrackItem.h"
 #include "dialogs/TagDialog.h"
-#include "capabilities/CustomActionsCapability.h"
+#include "core/capabilities/CustomActionsCapability.h"
 #include "playlist/PlaylistModelStack.h"
 #include "widgets/PrettyTreeView.h"
 
diff --git a/src/context/applets/albums/AlbumsView.h b/src/context/applets/albums/AlbumsView.h
index 53379fd..c54e2f7 100644
--- a/src/context/applets/albums/AlbumsView.h
+++ b/src/context/applets/albums/AlbumsView.h
@@ -20,7 +20,7 @@
 
 #include <QGraphicsProxyWidget>
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 class QTreeView;
 class QAbstractItemModel;
diff --git a/src/context/applets/albums/TrackItem.cpp b/src/context/applets/albums/TrackItem.cpp
index e32c173..1ca9b8d 100644
--- a/src/context/applets/albums/TrackItem.cpp
+++ b/src/context/applets/albums/TrackItem.cpp
@@ -15,7 +15,7 @@
  ****************************************************************************************/
 
 #include "TrackItem.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 
 #include <QFont>
 
diff --git a/src/context/applets/albums/TrackItem.h b/src/context/applets/albums/TrackItem.h
index 33e4366..0ab8562 100644
--- a/src/context/applets/albums/TrackItem.h
+++ b/src/context/applets/albums/TrackItem.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_TRACKITEM_H
 #define AMAROK_TRACKITEM_H
 
-#include <meta/Meta.h>
+#include "core/meta/Meta.h"
 
 #include <QStandardItem>
 
diff --git a/src/context/applets/coverbling/ImageLoader.h b/src/context/applets/coverbling/ImageLoader.h
index c0a5ce7..9a9d51b 100644
--- a/src/context/applets/coverbling/ImageLoader.h
+++ b/src/context/applets/coverbling/ImageLoader.h
@@ -30,7 +30,7 @@
 #include <qmutex.h>
 #include <qwaitcondition.h>
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 class ImageLoader : public QThread
 {
 public:
diff --git a/src/context/applets/coverbling/PhotoBrowser.cpp b/src/context/applets/coverbling/PhotoBrowser.cpp
index b507f87..856e9c2 100644
--- a/src/context/applets/coverbling/PhotoBrowser.cpp
+++ b/src/context/applets/coverbling/PhotoBrowser.cpp
@@ -29,7 +29,7 @@
 #include <QImage>
 #include <QImageReader>
 #include <QTimer>
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #define ImageLoader PlainImageLoader
 
diff --git a/src/context/applets/coverbling/PhotoBrowser.h b/src/context/applets/coverbling/PhotoBrowser.h
index 4080333..eecbe71 100644
--- a/src/context/applets/coverbling/PhotoBrowser.h
+++ b/src/context/applets/coverbling/PhotoBrowser.h
@@ -24,7 +24,7 @@
 #define PHOTO_BROWSER_H
 
 #include "pictureflow.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 class PhotoBrowser: public PictureFlow
 {
diff --git a/src/context/applets/coverbling/pictureflow.h b/src/context/applets/coverbling/pictureflow.h
index b10646a..a339876 100644
--- a/src/context/applets/coverbling/pictureflow.h
+++ b/src/context/applets/coverbling/pictureflow.h
@@ -29,7 +29,7 @@
 #define PICTUREFLOW_H
 
 #include <qwidget.h>
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include <qpainter.h>
 #include <QHBoxLayout>
 //#include "CoverBling.h"
diff --git a/src/context/applets/currenttrack/CurrentTrack.cpp b/src/context/applets/currenttrack/CurrentTrack.cpp
index 4dff42c..0093810 100644
--- a/src/context/applets/currenttrack/CurrentTrack.cpp
+++ b/src/context/applets/currenttrack/CurrentTrack.cpp
@@ -23,14 +23,14 @@
 #include "Debug.h"
 #include "EngineController.h"
 #include "GlobalCurrentTrackActions.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "meta/support/MetaUtility.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/meta/support/MetaUtility.h"
 #include "PaletteHandler.h"
 #include "SvgHandler.h"
 #include "context/widgets/RatingWidget.h"
 #include "context/widgets/TextScrollingWidget.h"
 #include "context/widgets/DropPixmapItem.h"
-#include "capabilities/UpdateCapability.h"
+#include "core/capabilities/UpdateCapability.h"
 
 #include <plasma/theme.h>
 #include <plasma/widgets/tabbar.h>
diff --git a/src/context/applets/currenttrack/CurrentTrack.h b/src/context/applets/currenttrack/CurrentTrack.h
index 304659b..2de8854 100644
--- a/src/context/applets/currenttrack/CurrentTrack.h
+++ b/src/context/applets/currenttrack/CurrentTrack.h
@@ -22,7 +22,7 @@
 #include <context/Applet.h>
 #include <context/DataEngine.h>
 #include <context/widgets/TrackWidget.h>
-#include <meta/Meta.h>
+#include "core/meta/Meta.h"
 
 #include <ui_currentTrackSettings.h>
 
diff --git a/src/context/applets/info/InfoApplet.h b/src/context/applets/info/InfoApplet.h
index b6003dc..883a2eb 100644
--- a/src/context/applets/info/InfoApplet.h
+++ b/src/context/applets/info/InfoApplet.h
@@ -23,8 +23,8 @@
 #include <context/DataEngine.h>
 #include <context/Svg.h>
 
-#include "playlists/impl/file/xspf/XSPFPlaylist.h"
-#include "playlists/Playlist.h"
+#include "core/playlists/impl/file/xspf/XSPFPlaylist.h"
+#include "core/playlists/Playlist.h"
 
 #include <Plasma/FrameSvg>
  
diff --git a/src/context/applets/lyrics/LyricsApplet.cpp b/src/context/applets/lyrics/LyricsApplet.cpp
index 9da39e4..376c57e 100644
--- a/src/context/applets/lyrics/LyricsApplet.cpp
+++ b/src/context/applets/lyrics/LyricsApplet.cpp
@@ -23,7 +23,7 @@
 #include "EngineController.h"
 #include "context/widgets/TextScrollingWidget.h"
 #include "dialogs/ScriptManager.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "PaletteHandler.h"
 #include "Theme.h"
 
diff --git a/src/context/applets/photos/CMakeLists.txt b/src/context/applets/photos/CMakeLists.txt
index 361665f..aa2822c 100644
--- a/src/context/applets/photos/CMakeLists.txt
+++ b/src/context/applets/photos/CMakeLists.txt
@@ -1,6 +1,5 @@
 include_directories( ../.. 
 					 ../../..
-					 ../../../meta
 )
 
 set( photos_applet_SRCS
diff --git a/src/context/applets/similarartists/ArtistWidget.h b/src/context/applets/similarartists/ArtistWidget.h
index 49afd53..d1d37cc 100644
--- a/src/context/applets/similarartists/ArtistWidget.h
+++ b/src/context/applets/similarartists/ArtistWidget.h
@@ -18,7 +18,7 @@
 #ifndef ARTIST_WIDGET_H
 #define ARTIST_WIDGET_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 //Kde
 #include<KUrl>
diff --git a/src/context/applets/songkick/SongkickApplet.cpp b/src/context/applets/songkick/SongkickApplet.cpp
index 566ccfe..46b763f 100644
--- a/src/context/applets/songkick/SongkickApplet.cpp
+++ b/src/context/applets/songkick/SongkickApplet.cpp
@@ -21,7 +21,7 @@
 #include "Debug.h"
 #include "EngineController.h"
 #include "dialogs/ScriptManager.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "PaletteHandler.h"
 #include "Theme.h"
 
diff --git a/src/context/applets/videoclip/CMakeLists.txt b/src/context/applets/videoclip/CMakeLists.txt
index c640677..91ac57c 100644
--- a/src/context/applets/videoclip/CMakeLists.txt
+++ b/src/context/applets/videoclip/CMakeLists.txt
@@ -10,7 +10,6 @@ set(videoclip_applet_SRCS
 
 include_directories(
     ${Amarok_SOURCE_DIR}/src
-    ${Amarok_SOURCE_DIR}/src/meta
     ${Amarok_SOURCE_DIR}/src/context
     ${Amarok_SOURCE_DIR}/src/context/applets
     ${Amarok_SOURCE_DIR}/src/context/applets/videoclip
diff --git a/src/context/applets/videoclip/VideoclipApplet.cpp b/src/context/applets/videoclip/VideoclipApplet.cpp
index 93269ae..bff68ce 100644
--- a/src/context/applets/videoclip/VideoclipApplet.cpp
+++ b/src/context/applets/videoclip/VideoclipApplet.cpp
@@ -26,7 +26,7 @@
 #include "Amarok.h"
 #include "Debug.h"
 #include "EngineController.h"
-#include "meta/impl/stream/Stream.h"
+#include "core/meta/impl/stream/Stream.h"
 #include "collection/CollectionManager.h"
 #include "context/ContextView.h"
 #include "context/Svg.h"
diff --git a/src/context/containments/CMakeLists.txt b/src/context/containments/CMakeLists.txt
index 7009732..6e0ddef 100644
--- a/src/context/containments/CMakeLists.txt
+++ b/src/context/containments/CMakeLists.txt
@@ -1,7 +1,2 @@
-include_directories(
-                    ../../meta
-                    ../../meta/capabilities
-                   )
-
 #add_subdirectory( oldcontainment )
 add_subdirectory( verticallayout )
diff --git a/src/context/engines/CMakeLists.txt b/src/context/engines/CMakeLists.txt
index 4051253..c973950 100644
--- a/src/context/engines/CMakeLists.txt
+++ b/src/context/engines/CMakeLists.txt
@@ -1,8 +1,3 @@
-include_directories(
-                    ../../meta
-                    ../../meta/capabilities
-                   )
-
 add_subdirectory( wikipedia )
 add_subdirectory( lyrics )
 add_subdirectory( current )
diff --git a/src/context/engines/current/CurrentEngine.cpp b/src/context/engines/current/CurrentEngine.cpp
index 7c72659..9edefb8 100644
--- a/src/context/engines/current/CurrentEngine.cpp
+++ b/src/context/engines/current/CurrentEngine.cpp
@@ -22,8 +22,8 @@
 #include "EngineController.h"
 #include "collection/Collection.h"
 #include "collection/CollectionManager.h"
-#include "support/MetaUtility.h"
-#include "capabilities/SourceInfoCapability.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/SourceInfoCapability.h"
 
 #include <QVariant>
 #include <Phonon/MediaObject>
diff --git a/src/context/engines/current/CurrentEngine.h b/src/context/engines/current/CurrentEngine.h
index 6a6f38c..0882729 100644
--- a/src/context/engines/current/CurrentEngine.h
+++ b/src/context/engines/current/CurrentEngine.h
@@ -21,7 +21,7 @@
 #include "collection/QueryMaker.h"
 #include "context/DataEngine.h"
 #include "EngineObserver.h"
-#include "meta/Meta.h" // album observer
+#include "core/meta/Meta.h" // album observer
 
 class QTimer;
 
diff --git a/src/context/engines/lyrics/LyricsEngine.h b/src/context/engines/lyrics/LyricsEngine.h
index 75b3fb7..7700f7f 100644
--- a/src/context/engines/lyrics/LyricsEngine.h
+++ b/src/context/engines/lyrics/LyricsEngine.h
@@ -21,7 +21,7 @@
 #include "ContextObserver.h"
 #include "context/DataEngine.h"
 #include "context/LyricsManager.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <kio/job.h>
 
diff --git a/src/context/engines/photos/PhotosEngine.h b/src/context/engines/photos/PhotosEngine.h
index 64b8362..ff7626a 100644
--- a/src/context/engines/photos/PhotosEngine.h
+++ b/src/context/engines/photos/PhotosEngine.h
@@ -19,7 +19,7 @@
 
 #include "ContextObserver.h"
 #include "context/DataEngine.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "PhotosInfo.h"
 
 // forward
diff --git a/src/context/engines/similarartists/SimilarArtistsEngine.h b/src/context/engines/similarartists/SimilarArtistsEngine.h
index c47c231..81955dd 100644
--- a/src/context/engines/similarartists/SimilarArtistsEngine.h
+++ b/src/context/engines/similarartists/SimilarArtistsEngine.h
@@ -21,7 +21,7 @@
 
 #include "src/context/ContextObserver.h"
 #include "src/context/DataEngine.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "src/context/applets/similarartists/SimilarArtist.h"
 
 #include <KIO/Job>
diff --git a/src/context/engines/songkick/SongkickEngine.h b/src/context/engines/songkick/SongkickEngine.h
index 039a69b..20697c5 100644
--- a/src/context/engines/songkick/SongkickEngine.h
+++ b/src/context/engines/songkick/SongkickEngine.h
@@ -20,7 +20,7 @@
 
 #include "ContextObserver.h"
 #include "context/DataEngine.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <kio/job.h>
 
diff --git a/src/context/engines/upcomingevents/UpcomingEventsEngine.h b/src/context/engines/upcomingevents/UpcomingEventsEngine.h
index 01b6764..e35d153 100644
--- a/src/context/engines/upcomingevents/UpcomingEventsEngine.h
+++ b/src/context/engines/upcomingevents/UpcomingEventsEngine.h
@@ -22,7 +22,7 @@
 #include "src/context/ContextObserver.h"
 #include <context/DataEngine.h>
 #include "src/context/applets/upcomingevents/LastFmEvent.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 // Qt
 #include <QDomDocument>
diff --git a/src/context/engines/videoclip/VideoclipEngine.h b/src/context/engines/videoclip/VideoclipEngine.h
index 040a58d..e9afc6e 100644
--- a/src/context/engines/videoclip/VideoclipEngine.h
+++ b/src/context/engines/videoclip/VideoclipEngine.h
@@ -19,7 +19,7 @@
 
 #include "ContextObserver.h"
 #include "context/DataEngine.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "VideoclipInfo.h"
 
 #include <KIO/Job>
diff --git a/src/context/engines/wikipedia/WikipediaEngine.h b/src/context/engines/wikipedia/WikipediaEngine.h
index 6d2bdf6..8a56110 100644
--- a/src/context/engines/wikipedia/WikipediaEngine.h
+++ b/src/context/engines/wikipedia/WikipediaEngine.h
@@ -20,7 +20,7 @@
 #define AMAROK_WIKIPEDIA_ENGINE
 
 #include "ContextObserver.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include "context/DataEngine.h"
 
diff --git a/src/context/widgets/TrackWidget.cpp b/src/context/widgets/TrackWidget.cpp
index 3bb21c9..33e23d3 100644
--- a/src/context/widgets/TrackWidget.cpp
+++ b/src/context/widgets/TrackWidget.cpp
@@ -19,7 +19,7 @@
 
 #include "Amarok.h"
 #include "Debug.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 #include "PaletteHandler.h"
 #include "playlist/PlaylistModelStack.h"
 
diff --git a/src/context/widgets/TrackWidget.h b/src/context/widgets/TrackWidget.h
index da66345..e22b0d0 100644
--- a/src/context/widgets/TrackWidget.h
+++ b/src/context/widgets/TrackWidget.h
@@ -18,7 +18,7 @@
 #define TRACK_WIDGET_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "RatingWidget.h"
 #include "ToolBoxIcon.h"
 
diff --git a/src/core/capabilities/BookmarkThisCapability.cpp b/src/core/capabilities/BookmarkThisCapability.cpp
new file mode 100644
index 0000000..da91bd4
--- /dev/null
+++ b/src/core/capabilities/BookmarkThisCapability.cpp
@@ -0,0 +1,26 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#include "BookmarkThisCapability.h"
+
+namespace Meta {
+
+BookmarkThisCapability::~BookmarkThisCapability()
+{
+}
+
+
+}
diff --git a/src/core/capabilities/BookmarkThisCapability.h b/src/core/capabilities/BookmarkThisCapability.h
new file mode 100644
index 0000000..8476b88
--- /dev/null
+++ b/src/core/capabilities/BookmarkThisCapability.h
@@ -0,0 +1,53 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#ifndef METABOOKMARKTHISCAPABILITY_H
+#define METABOOKMARKTHISCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+#include <QAction>
+
+namespace Meta {
+
+/**
+This capability determines whether a meta item in a collection can be directly bookmarked. Not all collections/services supports bookmarks on all levels, and some might not support Item level bookmarks at all as they have no query field and some might only support simple queries.
+
+    @author Nikolaj Hald Nielsen <nhn at kde.org>
+*/
+class AMAROK_EXPORT BookmarkThisCapability : public Capability {
+    Q_OBJECT
+public:
+    virtual ~BookmarkThisCapability();
+
+    virtual bool isBookmarkable() { return false; }
+    virtual QString browserName() = 0;
+    virtual QString collectionName() = 0;
+    virtual bool simpleFiltering() { return false; }
+    virtual QAction * bookmarkAction() = 0;
+
+    /**
+     * Get the capabilityInterfaceType of this capability
+     * @return The capabilityInterfaceType ( always Meta::Capability::BookmarkThis; )
+    */
+    static Type capabilityInterfaceType() { return Meta::Capability::BookmarkThis; }
+
+};
+
+}
+
+#endif
diff --git a/src/core/capabilities/BoundedPlaybackCapability.cpp b/src/core/capabilities/BoundedPlaybackCapability.cpp
new file mode 100644
index 0000000..1f26394
--- /dev/null
+++ b/src/core/capabilities/BoundedPlaybackCapability.cpp
@@ -0,0 +1,35 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#include "BoundedPlaybackCapability.h"
+
+namespace Meta {
+
+Meta::BoundedPlaybackCapability::BoundedPlaybackCapability()
+    : Capability()
+{
+}
+    
+BoundedPlaybackCapability::~BoundedPlaybackCapability()
+{
+}
+
+}
+
+#include "BoundedPlaybackCapability.moc"
+
+
+
diff --git a/src/core/capabilities/BoundedPlaybackCapability.h b/src/core/capabilities/BoundedPlaybackCapability.h
new file mode 100644
index 0000000..b58bdc5
--- /dev/null
+++ b/src/core/capabilities/BoundedPlaybackCapability.h
@@ -0,0 +1,49 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#ifndef METABOUNDEDPLAYBACKCAPABILITY_H
+#define METABOUNDEDPLAYBACKCAPABILITY_H
+
+#include "core/capabilities/Capability.h"
+
+namespace Meta {
+
+/**
+A capability for tracks that represents a given, bounded, interval of a url, for instance a single track in a long podcast.
+
+    @author Nikolaj Hald Nielsen <nhn at kde.org>
+*/
+class BoundedPlaybackCapability : public Capability
+{
+    Q_OBJECT
+public:
+    BoundedPlaybackCapability();
+    ~BoundedPlaybackCapability();
+
+    virtual qint64 startPosition() = 0;
+    virtual qint64 endPosition() = 0;
+    
+    /**
+     * Get the capabilityInterfaceType of this capability
+     * @return The capabilityInterfaceType ( always Meta::Capability::BoundedPlayback; )
+     */
+    static Type capabilityInterfaceType() { return Capability::BoundedPlayback; }
+
+};
+
+}
+
+#endif
diff --git a/src/core/capabilities/Capability.cpp b/src/core/capabilities/Capability.cpp
new file mode 100644
index 0000000..28d4038
--- /dev/null
+++ b/src/core/capabilities/Capability.cpp
@@ -0,0 +1,24 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "Capability.h"
+
+Meta::Capability::~Capability()
+{
+    //nothing to do
+}
+
+#include "Capability.moc"
diff --git a/src/core/capabilities/Capability.h b/src/core/capabilities/Capability.h
new file mode 100644
index 0000000..463d4a1
--- /dev/null
+++ b/src/core/capabilities/Capability.h
@@ -0,0 +1,64 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_CAPABILITY_H
+#define AMAROK_CAPABILITY_H
+
+#include "amarok_export.h"
+
+#include <QObject>
+
+namespace Meta
+{
+    class AMAROK_EXPORT Capability : public QObject
+    {
+        Q_OBJECT
+        Q_ENUMS( Type )
+
+        public:
+            //add additional capabilities here
+            enum Type { Unknown = 0
+                        , Editable = 1
+                        , LastFm = 2
+                        , Buyable = 3
+                        , CustomActions = 4
+                        , EditablePlaylist = 5
+                        , MultiPlayable = 6
+                        , Organisable = 7
+                        , SourceInfo = 8
+                        , CurrentTrackActions = 9
+                        , StreamInfo = 10
+                        , Updatable = 11
+                        , Importable = 12
+                        , Collection = 13
+                        , BookmarkThis = 14
+                        , WriteTimecode = 15
+                        , LoadTimecode = 16
+                        , MultiSource = 17
+                        , BoundedPlayback = 18
+                        , Decorator = 19
+                        , ReadLabel = 20
+                        , WriteLabel = 21
+                        , FindInSource = 22
+                      };
+
+            virtual ~Capability();
+
+    };
+}
+
+
+#endif
diff --git a/src/core/capabilities/CollectionCapability.cpp b/src/core/capabilities/CollectionCapability.cpp
new file mode 100644
index 0000000..3d2cdb4
--- /dev/null
+++ b/src/core/capabilities/CollectionCapability.cpp
@@ -0,0 +1,23 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "CollectionCapability.h"
+
+Meta::CollectionCapability::~CollectionCapability()
+{
+}
+
+#include "CollectionCapability.moc"
diff --git a/src/core/capabilities/CollectionCapability.h b/src/core/capabilities/CollectionCapability.h
new file mode 100644
index 0000000..a8757ed
--- /dev/null
+++ b/src/core/capabilities/CollectionCapability.h
@@ -0,0 +1,44 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_COLLECTIONCAPABILITY_H
+#define AMAROK_COLLECTIONCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+#include "core/meta/Meta.h"
+
+
+#include <QAction>
+#include <QList>
+#include <QObject>
+
+namespace Meta
+{
+
+    class AMAROK_EXPORT CollectionCapability : public Meta::Capability
+    {
+        Q_OBJECT
+
+        public:
+            virtual ~CollectionCapability();
+
+            static Type capabilityInterfaceType() { return Meta::Capability::Collection; }
+            virtual QList<QAction*> collectionActions() = 0;
+    };
+}
+
+#endif
diff --git a/src/core/capabilities/CurrentTrackActionsCapability.cpp b/src/core/capabilities/CurrentTrackActionsCapability.cpp
new file mode 100644
index 0000000..957412f
--- /dev/null
+++ b/src/core/capabilities/CurrentTrackActionsCapability.cpp
@@ -0,0 +1,30 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "CurrentTrackActionsCapability.h"
+
+Meta::CurrentTrackActionsCapability::CurrentTrackActionsCapability()
+    : CustomActionsCapability()
+{
+}
+
+Meta::CurrentTrackActionsCapability::CurrentTrackActionsCapability( const QList< QAction * > & actions )
+    : CustomActionsCapability( actions )
+{
+}
+
+
+#include "CurrentTrackActionsCapability.moc"
diff --git a/src/core/capabilities/CurrentTrackActionsCapability.h b/src/core/capabilities/CurrentTrackActionsCapability.h
new file mode 100644
index 0000000..f87dbb5
--- /dev/null
+++ b/src/core/capabilities/CurrentTrackActionsCapability.h
@@ -0,0 +1,58 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef CURRENTTRACKACTIONSCAPABILITY_H
+#define CURRENTTRACKACTIONSCAPABILITY_H
+
+#include "CustomActionsCapability.h"
+#include "amarok_export.h"
+
+/**
+ * This capability allows tracks to display custom actions in different places ( such as the playlist context menu,
+ * the system tray context menu and others ) when they are the currently playing tracks. Initial use for this will
+ * to add last.fm skip, ban and love actions. This class is based on the CustomActionsCapability class as their
+ * function is very similar although they are used in different places.
+ *
+ *         @author Nikolaj Hald Nielsen <nhn at kde.org>
+ */
+
+namespace Meta {
+    
+    class AMAROK_EXPORT CurrentTrackActionsCapability : public CustomActionsCapability {
+
+        Q_OBJECT
+        public:
+            /**
+             * Constructor
+             */
+            CurrentTrackActionsCapability();
+            /**
+             * Constructor
+             * @param actions A list of actions that to use.
+             */
+            CurrentTrackActionsCapability( const QList< QAction * > &actions );
+            
+            /**
+             * Get the capabilityInterfaceType of this capability
+             * @return The capabilityInterfaceType ( always Meta::Capability::CurrentTrackActions; )
+             */
+            static Type capabilityInterfaceType() { return Meta::Capability::CurrentTrackActions; }
+    };
+
+}
+
+
+#endif
diff --git a/src/core/capabilities/CustomActionsCapability.cpp b/src/core/capabilities/CustomActionsCapability.cpp
new file mode 100644
index 0000000..6a513f6
--- /dev/null
+++ b/src/core/capabilities/CustomActionsCapability.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "CustomActionsCapability.h"
+
+Meta::CustomActionsCapability::CustomActionsCapability()
+    : Meta::Capability()
+{
+    //nothing to do
+}
+
+Meta::CustomActionsCapability::CustomActionsCapability( const QList<QAction*> &actions )
+    : Meta::Capability()
+    , m_actions( actions )
+{
+    //nothing to do
+}
+
+Meta::CustomActionsCapability::~CustomActionsCapability()
+{
+    //nothing to do.
+    //TODO are we responsible for deleting the actions?
+}
+
+QList<QAction *>
+Meta::CustomActionsCapability::customActions() const
+{
+    return m_actions;
+}
+
+#include "CustomActionsCapability.moc"
diff --git a/src/core/capabilities/CustomActionsCapability.h b/src/core/capabilities/CustomActionsCapability.h
new file mode 100644
index 0000000..fdaba23
--- /dev/null
+++ b/src/core/capabilities/CustomActionsCapability.h
@@ -0,0 +1,73 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_CUSTOMACTIONSCAPABILITY_H
+#define AMAROK_CUSTOMACTIONSCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+#include <QAction>
+#include <QList>
+
+namespace Meta
+{
+    /**
+     * This capability allows different meta types to display custom actions in the right click menu in the tree view
+     * or anywhere else where the actions are shown. This is useful for purchasing from stores, downloading from services
+     * banning a genre or whatever we can think of in the future
+     *
+     *         @author Nikolaj Hald Nielsen <nhn at kde.org>
+     */
+
+    class AMAROK_EXPORT CustomActionsCapability : public Meta::Capability
+    {
+        Q_OBJECT
+        public:
+            
+            /**
+             * Constructor
+             */
+            CustomActionsCapability();
+            
+            /**
+             * Constructor
+             * @param actions A list of actions to use.
+             */
+            CustomActionsCapability( const QList< QAction* > &actions );
+            /**
+             * Destructor
+             */
+            virtual ~CustomActionsCapability();
+
+            /**
+             * Get the custom actions for this capablility
+             * @return The list of custom actions
+             */
+            virtual QList<QAction *> customActions() const;
+
+            /**
+             * Get the capabilityInterfaceType of this capability
+             * @return The capabilityInterfaceType ( always Meta::Capability::CustomActions; )
+             */
+            static Type capabilityInterfaceType() { return Meta::Capability::CustomActions; }
+
+        protected:
+            QList< QAction* > m_actions;
+    };
+}
+
+#endif
diff --git a/src/core/capabilities/DecoratorCapability.cpp b/src/core/capabilities/DecoratorCapability.cpp
new file mode 100644
index 0000000..d1a864f
--- /dev/null
+++ b/src/core/capabilities/DecoratorCapability.cpp
@@ -0,0 +1,23 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Seb Ruiz <ruiz at kde.org>                                           *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "DecoratorCapability.h"
+
+Meta::DecoratorCapability::~DecoratorCapability()
+{
+}
+
+#include "DecoratorCapability.moc"
diff --git a/src/core/capabilities/DecoratorCapability.h b/src/core/capabilities/DecoratorCapability.h
new file mode 100644
index 0000000..2e6fd2b
--- /dev/null
+++ b/src/core/capabilities/DecoratorCapability.h
@@ -0,0 +1,43 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Seb Ruiz <ruiz at kde.org>                                           *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_DECORATORCAPABILITY_H
+#define AMAROK_DECORATORCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+#include "core/meta/Meta.h"
+
+
+#include <QAction>
+#include <QList>
+#include <QObject>
+
+namespace Meta
+{
+    class AMAROK_EXPORT DecoratorCapability : public Meta::Capability
+    {
+        Q_OBJECT
+
+        public:
+            virtual ~DecoratorCapability();
+
+            static Type capabilityInterfaceType() { return Meta::Capability::Decorator; }
+            virtual QList<QAction*> decoratorActions() = 0;
+    };
+}
+
+#endif
diff --git a/src/core/capabilities/EditCapability.cpp b/src/core/capabilities/EditCapability.cpp
new file mode 100644
index 0000000..c8b4df4
--- /dev/null
+++ b/src/core/capabilities/EditCapability.cpp
@@ -0,0 +1,24 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "EditCapability.h"
+
+Meta::EditCapability::~EditCapability()
+{
+    //nothing to do
+}
+
+#include "EditCapability.moc"
diff --git a/src/core/capabilities/EditCapability.h b/src/core/capabilities/EditCapability.h
new file mode 100644
index 0000000..1e4c030
--- /dev/null
+++ b/src/core/capabilities/EditCapability.h
@@ -0,0 +1,68 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_EDITCAPABILITY_H
+#define AMAROK_EDITCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+namespace Meta
+{
+    class AMAROK_EXPORT EditCapability : public Meta::Capability
+    {
+        Q_OBJECT
+        public:
+            virtual ~EditCapability();
+
+            static Type capabilityInterfaceType() { return Meta::Capability::Editable; }
+
+            /** Returns true if the tags of this track are currently editable */
+            virtual bool isEditable() const = 0;
+            /** Update the album of this track. */
+            virtual void setAlbum( const QString &newAlbum ) = 0;
+            //TODO: add overloaded methods which take a AlbumPtr if necessary
+            /** Change the artist of this track */
+            virtual void setArtist( const QString &newArtist ) = 0;
+
+            virtual void setComposer( const QString &newComposer ) = 0;
+
+            virtual void setGenre( const QString &newGenre ) = 0;
+
+            virtual void setYear( const QString &newYear ) = 0;
+
+            virtual void setTitle( const QString &newTitle ) = 0;
+
+            virtual void setComment( const QString &newComment ) = 0;
+
+            virtual void setTrackNumber( int newTrackNumber ) = 0;
+
+            virtual void setDiscNumber( int newDiscNumber ) = 0;
+
+            virtual void setBpm( const float newBpm ) = 0;
+
+            /** The track object should not store changed meta data immediately but cache the
+            changes until endMetaDataUpdate() or abortMetaDataUpdate() is called */
+            virtual void beginMetaDataUpdate() = 0;
+            /** All meta data has been updated and the object should commit the changed */
+            virtual void endMetaDataUpdate() = 0;
+            /** Abort the meta data update without committing the changes */
+            virtual void abortMetaDataUpdate() = 0;
+
+    };
+}
+
+#endif
diff --git a/src/core/capabilities/EditablePlaylistCapability.cpp b/src/core/capabilities/EditablePlaylistCapability.cpp
new file mode 100644
index 0000000..d36df3e
--- /dev/null
+++ b/src/core/capabilities/EditablePlaylistCapability.cpp
@@ -0,0 +1,26 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "EditablePlaylistCapability.h"
+
+namespace Meta {
+
+EditablePlaylistCapability::~EditablePlaylistCapability()
+{
+}
+
+
+}
diff --git a/src/core/capabilities/EditablePlaylistCapability.h b/src/core/capabilities/EditablePlaylistCapability.h
new file mode 100644
index 0000000..78a778d
--- /dev/null
+++ b/src/core/capabilities/EditablePlaylistCapability.h
@@ -0,0 +1,72 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef METAEDITABLEPLAYLISTCAPABILITY_H
+#define METAEDITABLEPLAYLISTCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+#include "core/meta/Meta.h"
+
+#include <QDateTime>
+
+class QString;
+class KUrl;
+
+namespace Meta {
+
+/**
+	@author Bart Cerneels <bart.cerneels at kde.org>
+*/
+class AMAROK_EXPORT EditablePlaylistCapability : public Capability
+{
+    Q_OBJECT
+
+    public:
+
+        virtual ~EditablePlaylistCapability();
+
+        static Type capabilityInterfaceType() { return Meta::Capability::EditablePlaylist; }
+
+        /** Returns true if the tags of this track are currently editable */
+        virtual bool isEditable() const = 0;
+
+        virtual void setTitle( const QString &title ) { Q_UNUSED( title ); };
+        virtual void setCreator( const QString &creator ) { Q_UNUSED( creator ); };
+        virtual void setAnnotation( const QString &annotation ) { Q_UNUSED( annotation ); };
+        virtual void setInfo( const KUrl &info ) { Q_UNUSED( info ); };
+        virtual void setLocation( const KUrl &location ) { Q_UNUSED( location); };
+        virtual void setIdentifier( const QString &identifier ) { Q_UNUSED( identifier); };
+        virtual void setImage( const KUrl &image ) { Q_UNUSED( image ); };
+        virtual void setDate( const QDateTime &date ) { Q_UNUSED( date); };
+        virtual void setLicense( const KUrl &license ) { Q_UNUSED( license ); };
+        virtual void setAttribution( const KUrl &attribution, bool append = true ) { Q_UNUSED( attribution); Q_UNUSED(append); };
+        virtual void setLink( const KUrl &link ) { Q_UNUSED( link ); };
+        virtual void setTrackList( TrackList trackList, bool append = false ) { Q_UNUSED( trackList ); Q_UNUSED( append ); };
+
+        /** The playlist object should not store changed meta data immediately but cache the
+        changes until endMetaDataUpdate() or abortMetaDataUpdate() is called */
+        virtual void beginMetaDataUpdate() = 0;
+        /** All meta data has been updated and the object should commit the changed */
+        virtual void endMetaDataUpdate() = 0;
+        /** Abort the meta data update without committing the changes */
+        virtual void abortMetaDataUpdate() = 0;
+
+};
+
+}
+
+#endif
diff --git a/src/core/capabilities/FindInSourceCapability.cpp b/src/core/capabilities/FindInSourceCapability.cpp
new file mode 100644
index 0000000..b8f9b68
--- /dev/null
+++ b/src/core/capabilities/FindInSourceCapability.cpp
@@ -0,0 +1,24 @@
+/****************************************************************************************
+ * Copyright (c) 2010 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "FindInSourceCapability.h"
+
+using namespace Meta;
+
+FindInSourceCapability::~FindInSourceCapability()
+{
+}
+
diff --git a/src/core/capabilities/FindInSourceCapability.h b/src/core/capabilities/FindInSourceCapability.h
new file mode 100644
index 0000000..fdaf90b
--- /dev/null
+++ b/src/core/capabilities/FindInSourceCapability.h
@@ -0,0 +1,48 @@
+/****************************************************************************************
+ * Copyright (c) 2010 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef FINDINSOURCECAPABILITY_H
+#define FINDINSOURCECAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+namespace Meta {
+
+/**
+This capability exposes a method that shows this track (or the closest possible parent, such as album) in the source where it was added from.
+
+    @author Nikolaj Hald Nielsen <nhn at kde.org>
+*/
+
+class AMAROK_EXPORT FindInSourceCapability : public Meta::Capability
+{
+    Q_OBJECT
+public: 
+    virtual ~FindInSourceCapability();
+
+    virtual void findInSource() = 0;
+
+    /**
+     * Get the capabilityInterfaceType of this capability
+     * @return The capabilityInterfaceType ( always Meta::Capability::FindInSource; )
+     */
+    static Type capabilityInterfaceType() { return Meta::Capability::FindInSource; }
+};
+
+};
+
+#endif // FINDINSOURCECAPABILITY_H
diff --git a/src/core/capabilities/FingerprintCapability.cpp b/src/core/capabilities/FingerprintCapability.cpp
new file mode 100644
index 0000000..e69de29
diff --git a/src/core/capabilities/LastFmCapability.cpp b/src/core/capabilities/LastFmCapability.cpp
new file mode 100644
index 0000000..f6b7b3e
--- /dev/null
+++ b/src/core/capabilities/LastFmCapability.cpp
@@ -0,0 +1,24 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "LastFmCapability.h"
+
+Meta::LastFmCapability::~LastFmCapability()
+{
+    //nothing to do
+}
+
+#include "LastFmCapability.moc"
diff --git a/src/core/capabilities/LastFmCapability.h b/src/core/capabilities/LastFmCapability.h
new file mode 100644
index 0000000..0f3f432
--- /dev/null
+++ b/src/core/capabilities/LastFmCapability.h
@@ -0,0 +1,39 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_LASTFMCAPABILITY_H
+#define AMAROK_LASTFMCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+namespace Meta
+{
+    class AMAROK_EXPORT LastFmCapability : public Meta::Capability
+    {
+        Q_OBJECT
+        public:
+            virtual ~LastFmCapability();
+
+            virtual void love() = 0;
+            virtual void ban() = 0;
+            virtual void skip() = 0;
+
+            static Type capabilityInterfaceType() { return Meta::Capability::LastFm; }
+    };
+}
+
+#endif
diff --git a/src/core/capabilities/MultiPlayableCapability.cpp b/src/core/capabilities/MultiPlayableCapability.cpp
new file mode 100644
index 0000000..c9deb58
--- /dev/null
+++ b/src/core/capabilities/MultiPlayableCapability.cpp
@@ -0,0 +1,24 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Shane King <kde at dontletsstart.com>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "MultiPlayableCapability.h"
+
+Meta::MultiPlayableCapability::~MultiPlayableCapability()
+{
+    //nothing to do
+}
+
+#include "MultiPlayableCapability.moc"
diff --git a/src/core/capabilities/MultiPlayableCapability.h b/src/core/capabilities/MultiPlayableCapability.h
new file mode 100644
index 0000000..fdaad47
--- /dev/null
+++ b/src/core/capabilities/MultiPlayableCapability.h
@@ -0,0 +1,43 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Shane King <kde at dontletsstart.com>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_MULTIPLAYABLECAPABILITY_H
+#define AMAROK_MULTIPLAYABLECAPABILITY_H
+
+#include "core/capabilities/Capability.h"
+
+#include <KUrl>
+
+namespace Meta
+{
+    class AMAROK_EXPORT MultiPlayableCapability : public Capability
+    {
+        Q_OBJECT
+
+    public:
+        virtual ~MultiPlayableCapability();
+
+        static Type capabilityInterfaceType() { return Meta::Capability::MultiPlayable; }
+
+        virtual void fetchFirst() = 0;
+        virtual void fetchNext() = 0;
+
+    signals:
+        void playableUrlFetched( const KUrl &url );
+    };
+}
+
+#endif // AMAROK_MULTIPLAYABLECAPABILITY_H
diff --git a/src/core/capabilities/MultiSourceCapability.cpp b/src/core/capabilities/MultiSourceCapability.cpp
new file mode 100644
index 0000000..1706eaf
--- /dev/null
+++ b/src/core/capabilities/MultiSourceCapability.cpp
@@ -0,0 +1,33 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "MultiSourceCapability.h"
+
+namespace Meta {
+
+MultiSourceCapability::MultiSourceCapability()
+ : Capability()
+{
+}
+
+
+MultiSourceCapability::~MultiSourceCapability()
+{
+}
+
+}
+
+#include "MultiSourceCapability.moc"
diff --git a/src/core/capabilities/MultiSourceCapability.h b/src/core/capabilities/MultiSourceCapability.h
new file mode 100644
index 0000000..cfee176
--- /dev/null
+++ b/src/core/capabilities/MultiSourceCapability.h
@@ -0,0 +1,54 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#ifndef METAMULTISOURCECAPABILITY_H
+#define METAMULTISOURCECAPABILITY_H
+
+#include "core/capabilities/Capability.h"
+
+#include <KUrl>
+
+namespace Meta {
+
+/**
+A capability for tracks that can have several different source urls, such as multiple fallback streams for a radio station. If one source url fails or finishes, the track will automatically use the next one. It is also possbile to get a list of all urls that can be presented to the user so he can choose.
+
+    @author Nikolaj Hald Nielsen <nhn at kde.org>
+*/
+class MultiSourceCapability : public Capability
+{
+    Q_OBJECT
+public:
+    MultiSourceCapability();
+
+    ~MultiSourceCapability();
+
+    static Type capabilityInterfaceType() { return Meta::Capability::MultiSource; }
+
+    virtual KUrl first() = 0;
+    virtual KUrl next() = 0;
+    virtual int current() = 0;
+    virtual QStringList sources() = 0;
+    virtual void setSource( int source ) = 0;
+    
+signals:
+    void urlChanged( const KUrl &url );
+
+};
+
+}
+
+#endif
diff --git a/src/core/capabilities/OrganiseCapability.cpp b/src/core/capabilities/OrganiseCapability.cpp
new file mode 100644
index 0000000..e710ac0
--- /dev/null
+++ b/src/core/capabilities/OrganiseCapability.cpp
@@ -0,0 +1,22 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "OrganiseCapability.h"
+
+Meta::OrganiseCapability::~OrganiseCapability()
+{
+    //nothing to do
+}
diff --git a/src/core/capabilities/OrganiseCapability.h b/src/core/capabilities/OrganiseCapability.h
new file mode 100644
index 0000000..b4fa65d
--- /dev/null
+++ b/src/core/capabilities/OrganiseCapability.h
@@ -0,0 +1,41 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_ORGANISECAPABILITY_H
+#define AMAROK_ORGANISECAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+namespace Meta
+{
+    class AMAROK_EXPORT OrganiseCapability : public Meta::Capability
+    {
+        Q_OBJECT
+        public:
+            virtual ~OrganiseCapability();
+
+            static Type capabilityInterfaceType() { return Meta::Capability::Organisable; }
+
+            /**
+             * delete this track from the collection
+             */
+            virtual void deleteTrack() = 0;
+            //virtual void organiseTrack() = 0;
+    };
+}
+
+#endif
diff --git a/src/core/capabilities/ReadLabelCapability.cpp b/src/core/capabilities/ReadLabelCapability.cpp
new file mode 100644
index 0000000..2d6fe30
--- /dev/null
+++ b/src/core/capabilities/ReadLabelCapability.cpp
@@ -0,0 +1,20 @@
+/*
+    Copyright (C) 2009 Dan Meltzer <parallelgrapefruit at gmail.com>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "ReadLabelCapability.h"
+
diff --git a/src/core/capabilities/ReadLabelCapability.h b/src/core/capabilities/ReadLabelCapability.h
new file mode 100644
index 0000000..6317d13
--- /dev/null
+++ b/src/core/capabilities/ReadLabelCapability.h
@@ -0,0 +1,46 @@
+/*
+    Copyright (C) 2009 Dan Meltzer <parallelgrapefruit at gmail.com>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef READLABELCAPABILITY_H
+#define READLABELCAPABILITY_H
+
+#include "core/capabilities/Capability.h"
+#include "core/meta/Meta.h"
+#include "amarok_export.h"
+
+namespace Meta
+{
+
+class AMAROK_EXPORT ReadLabelCapability : public Meta::Capability
+{
+    Q_OBJECT
+    public:
+        static Type capabilityInterfaceType() { return Meta::Capability::ReadLabel; }
+
+        //Implementors
+        virtual void fetchLabels() = 0;
+        virtual void fetchGlobalLabels() = 0;
+        virtual QStringList labels() = 0;
+
+    signals:
+        void labelsFetched( QStringList );
+
+};
+
+}
+#endif // READLABELCAPABILITY_H
diff --git a/src/core/capabilities/SourceInfoCapability.cpp b/src/core/capabilities/SourceInfoCapability.cpp
new file mode 100644
index 0000000..9884976
--- /dev/null
+++ b/src/core/capabilities/SourceInfoCapability.cpp
@@ -0,0 +1,30 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#include "SourceInfoCapability.h"
+
+Meta::SourceInfoCapability::SourceInfoCapability()
+    : Meta::Capability()
+{
+}
+
+
+Meta::SourceInfoCapability::~SourceInfoCapability()
+{
+}
+
+
+
diff --git a/src/core/capabilities/SourceInfoCapability.h b/src/core/capabilities/SourceInfoCapability.h
new file mode 100644
index 0000000..5707306
--- /dev/null
+++ b/src/core/capabilities/SourceInfoCapability.h
@@ -0,0 +1,77 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#ifndef SOURCEINFOCAPABILITY_H
+#define SOURCEINFOCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+class QPixmap;
+
+namespace Meta
+{
+
+    /**
+    This capability allows getting additional information about the source of a meta item. For now, it is intended for allowing the playlist to display a little emblem to let users know if a track is a Magnatune preview track, a lastfm stream or so on...
+
+        @author Nikolaj Hald Nielsen <nhn at kde.org>
+    */
+    class AMAROK_EXPORT SourceInfoCapability : public Meta::Capability{
+    public:
+        Q_OBJECT
+        public:
+            /**
+             * Constructor
+             */
+            SourceInfoCapability();
+            /**
+             * Destructor
+             */
+            virtual ~SourceInfoCapability();
+
+            /**
+             * Get the human readable name of the source, for instance "Magnatune.com"
+             * @return The name of the source
+             */
+            virtual QString sourceName() = 0;
+            /**
+             * Get a brief human readable description or the source
+             * @return The source description
+             */
+            virtual QString sourceDescription() = 0;
+            /**
+             * Get a small 16x16 pixle emblem that represents the source.
+             * @return The source emblem
+             */
+            virtual QPixmap emblem() = 0;
+
+            /**
+             * Get a path to a scalable (svg) version of the source emblem.
+             */
+            virtual QString scalableEmblem() = 0;
+
+            /**
+             * Get the capabilityInterfaceType of this capability
+             * @return The capabilityInterfaceType ( always Meta::Capability::SourceInfo; )
+             */
+            static Type capabilityInterfaceType() { return Meta::Capability::SourceInfo; }
+
+    };
+
+}
+
+#endif
diff --git a/src/core/capabilities/StatisticsCapability.cpp b/src/core/capabilities/StatisticsCapability.cpp
new file mode 100644
index 0000000..36db9e1
--- /dev/null
+++ b/src/core/capabilities/StatisticsCapability.cpp
@@ -0,0 +1,24 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Seb Ruiz <ruiz at kde.org>                                           *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "StatisticsCapability.h"
+
+Meta::StatisticsCapability::~StatisticsCapability()
+{
+    //nothing to do
+}
+
+#include "StatisticsCapability.moc"
diff --git a/src/core/capabilities/StatisticsCapability.h b/src/core/capabilities/StatisticsCapability.h
new file mode 100644
index 0000000..1347b87
--- /dev/null
+++ b/src/core/capabilities/StatisticsCapability.h
@@ -0,0 +1,49 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Seb Ruiz <ruiz at kde.org>                                           *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_STATISTICSCAPABILITY_H
+#define AMAROK_STATISTICSCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+namespace Meta
+{
+    class AMAROK_EXPORT StatisticsCapability : public Meta::Capability
+    {
+        Q_OBJECT
+        public:
+            virtual ~StatisticsCapability();
+
+            static Type capabilityInterfaceType() { return Meta::Capability::Importable; }
+
+            virtual void setScore( const int score ) = 0;
+            virtual void setRating( const int rating ) = 0;
+            virtual void setFirstPlayed( const uint time ) = 0;
+            virtual void setLastPlayed( const uint time ) = 0;
+            virtual void setPlayCount( const int playcount ) = 0;
+
+            /** The track object should not store changed meta data immediately but cache the
+            changes until endStatisticsUpdate() or abortStatisticsUpdate() is called */
+            virtual void beginStatisticsUpdate() = 0;
+            /** All meta data has been updated and the object should commit the changed */
+            virtual void endStatisticsUpdate() = 0;
+            /** Abort the meta data update without committing the changes */
+            virtual void abortStatisticsUpdate() = 0;
+    };
+}
+
+#endif
diff --git a/src/core/capabilities/StreamInfoCapability.cpp b/src/core/capabilities/StreamInfoCapability.cpp
new file mode 100644
index 0000000..ed8fb76
--- /dev/null
+++ b/src/core/capabilities/StreamInfoCapability.cpp
@@ -0,0 +1,19 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Dan Meltzer <parallelgrapefruit at gmail.com>                        *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+ //Stupid cmake.
+#include "StreamInfoCapability.h"
+#include "StreamInfoCapability.moc"
diff --git a/src/core/capabilities/StreamInfoCapability.h b/src/core/capabilities/StreamInfoCapability.h
new file mode 100644
index 0000000..a4048a1
--- /dev/null
+++ b/src/core/capabilities/StreamInfoCapability.h
@@ -0,0 +1,60 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Dan Meltzer <parallelgrapefruit at gmail.com>                        *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#ifndef STREAMINFOCAPABILITY_H
+#define STREAMINFOCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+#include <QString>
+namespace Meta
+{
+
+    /**
+     * This capability is designed to provide additional information
+     * about streaming metadata. For meta types that provide multiple
+     * tracks within the same stream (lastfm, shoutcast, etc )
+     * this capability is designed to return stream metadata,
+     * where the properties in the Meta::Track class refers to the track
+     * being played within the stream.
+
+        @author Dan Meltzer <parallelgrapefruit at gmail.com>
+    */
+    class AMAROK_EXPORT StreamInfoCapability : public Meta::Capability
+    {
+        Q_OBJECT
+        public:
+            StreamInfoCapability() {};
+            virtual ~StreamInfoCapability() {};
+
+            /**
+             * The human readable name of this stream
+             * @return A string representing the name of this stream.
+             */
+            virtual QString streamName() const = 0;
+            /**
+             * The source this stream belongs to.
+             * @return The name of the owning source.
+             */
+            virtual QString streamSource() const { return QString(); }
+            static Type capabilityInterfaceType() { return Meta::Capability::StreamInfo; }
+
+    };
+
+}
+
+#endif
diff --git a/src/core/capabilities/TimecodeLoadCapability.cpp b/src/core/capabilities/TimecodeLoadCapability.cpp
new file mode 100644
index 0000000..178c910
--- /dev/null
+++ b/src/core/capabilities/TimecodeLoadCapability.cpp
@@ -0,0 +1,24 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Casey Link <unnamedrambler at gmail.com>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "TimecodeLoadCapability.h"
+
+namespace Meta
+{
+TimecodeLoadCapability::~TimecodeLoadCapability()
+{}
+}
+
diff --git a/src/core/capabilities/TimecodeLoadCapability.h b/src/core/capabilities/TimecodeLoadCapability.h
new file mode 100644
index 0000000..47032a3
--- /dev/null
+++ b/src/core/capabilities/TimecodeLoadCapability.h
@@ -0,0 +1,66 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Casey Link <unnamedrambler at gmail.com>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef TIMECODELOADCAPABILITY_H
+#define TIMECODELOADCAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/Capability.h"
+#include "amarokurls/AmarokUrl.h"
+
+#include <KSharedPtr>
+
+#include <QList>
+
+namespace Meta {
+
+typedef QList<AmarokUrlPtr> BookmarkList;
+typedef KSharedPtr<AmarokUrl> AmarokUrlPtr;
+/**
+* This capability determines whether a track has timecodes
+* that can be loaded from it, and supplies them if it can.
+* @author Casey Link
+*/
+class AMAROK_EXPORT TimecodeLoadCapability : public Capability
+{
+    Q_OBJECT
+public:
+    virtual ~TimecodeLoadCapability();
+
+    /**
+     * @return true if the track has timecodes, false if not
+     */
+    virtual bool hasTimecodes() = 0 ;
+
+    /**
+     * @return a QList of AmarokUrlPtrs representing the track's timecodes. Might return an empty list.
+     */
+    virtual BookmarkList loadTimecodes()  = 0;
+
+    /**
+    * Get the capabilityInterfaceType of this capability
+    * @return The capabilityInterfaceType ( always Meta::Capability::LoadTimecode; )
+    */
+    static Type capabilityInterfaceType()
+    {
+        return Meta::Capability::LoadTimecode;
+    }
+};
+
+}
+
+#endif // TIMECODELOADCAPABILITY_H
diff --git a/src/core/capabilities/TimecodeWriteCapability.cpp b/src/core/capabilities/TimecodeWriteCapability.cpp
new file mode 100644
index 0000000..93eb2bc
--- /dev/null
+++ b/src/core/capabilities/TimecodeWriteCapability.cpp
@@ -0,0 +1,117 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Casey Link <unnamedrambler at gmail.com>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "TimecodeWriteCapability.h"
+
+#include "amarokurls/AmarokUrl.h"
+#include "amarokurls/AmarokUrlHandler.h"
+#include "amarokurls/PlayUrlGenerator.h"
+#include "amarokurls/BookmarkModel.h"
+#include "Debug.h"
+#include "ProgressWidget.h"
+#include "EngineController.h"
+#include "TimecodeLoadCapability.h"
+
+namespace Meta
+{
+
+TimecodeWriteCapability::~TimecodeWriteCapability()
+{}
+
+bool TimecodeWriteCapability::writeTimecode( qint64 miliseconds, Meta::TrackPtr track )
+{
+    DEBUG_BLOCK
+    AmarokUrl url = PlayUrlGenerator::instance()->createTrackBookmark( track, miliseconds );
+
+    // lets see if we are bookmarking the currently playing track, if so
+    // we need to update the slider with another icon
+    Meta::TrackPtr currtrack = The::engineController()->currentTrack();
+    if( currtrack  == track )
+    {
+        debug() << " current track";
+        debug() << "adding at seconds: " << miliseconds;
+        The::amarokUrlHandler()->paintNewTimecode( url.name(), miliseconds );
+
+    }
+
+    url.saveToDb();
+    BookmarkModel::instance()->reloadFromDb(); //Update bookmark manager view.
+    return true;
+}
+
+bool Meta::TimecodeWriteCapability::writeAutoTimecode( qint64 miliseconds, Meta::TrackPtr track )
+{
+    DEBUG_BLOCK
+
+    //first up, find and delete any previously added auto timecodes for this track
+
+    debug() << "deleting old auto timecodes";
+    if( track->hasCapabilityInterface( Meta::Capability::LoadTimecode ) )
+    {
+        TimecodeLoadCapability *tcl = track->create<TimecodeLoadCapability>();
+        BookmarkList list = tcl->loadTimecodes();
+        foreach( AmarokUrlPtr oldUrl, list )
+        {
+            if( oldUrl->command() == "play"  ) {
+                if( oldUrl->customValue() == "auto timecode" ) {
+                    debug() << "deleting: " << oldUrl->name();
+                    oldUrl->removeFromDb();
+                }
+            }
+        }
+    }
+
+    //create url
+    AmarokUrl url = PlayUrlGenerator::instance()->createTrackBookmark( track, miliseconds );
+
+    // lets see if we are bookmarking the currently playing track, if so
+    // we need to update the slider with another icon
+
+    Meta::TrackPtr currtrack = The::engineController()->currentTrack();
+    if( currtrack == track )
+    {
+        debug() << " current track";
+        QMap<QString, QString> args = url.args();
+        if ( args.keys().contains( "pos" ) )
+        {
+            int pos = args.value( "pos" ).toInt();
+            The::amarokUrlHandler()->paintNewTimecode( url.name(), pos * 1000 );
+        }
+    }
+
+    //change the name a little bit
+    url.setCustomValue( "auto timecode" );
+
+    QString date = QDateTime::currentDateTime().toString( "dd.MM.yyyy" );
+    url.setName( i18n( "%1 - Stopped %2", track->prettyName(), date ) );
+
+    debug() << "creating new auto timecode: " << url.name();
+
+    //put in custom group to ensure that we do not clutter the list of bookmarks.
+    BookmarkGroupPtr parentPtr = BookmarkGroupPtr( new BookmarkGroup( i18n( "Playback Ended Markers" ), "auto_markers" ) );
+    url.reparent( parentPtr );
+
+    //save it
+    url.saveToDb();
+    BookmarkModel::instance()->reloadFromDb(); //Update bookmark manager view.
+    return true;
+}
+
+}
+
+
+
+
diff --git a/src/core/capabilities/TimecodeWriteCapability.h b/src/core/capabilities/TimecodeWriteCapability.h
new file mode 100644
index 0000000..255db81
--- /dev/null
+++ b/src/core/capabilities/TimecodeWriteCapability.h
@@ -0,0 +1,68 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Casey Link <unnamedrambler at gmail.com>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef TIMECODEWRITECAPABILITY_H
+#define TIMECODEWRITECAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/Capability.h"
+
+namespace Meta
+{
+/**
+ * This capability determines whether a track can have a timecode
+ * written to it.
+ * @author Casey Link
+ */
+class AMAROK_EXPORT TimecodeWriteCapability : public Capability
+{
+    Q_OBJECT
+public:
+
+    virtual ~TimecodeWriteCapability();
+
+    /**
+     * Stores a timecode for the track
+     * @param seconds the position in seconds at which the timecide should be stored.
+     * @return  true if the write was successful, false if not.
+     */
+    virtual bool writeTimecode ( qint64 miliseconds ) = 0;
+
+    /**
+     * Stores an auto timecode for the track and deletes any previously added auto timecodes
+     * @param seconds the position in seconds at which the timecide should be stored.
+     * @return  true if the write was successful, false if not.
+     */
+    virtual bool writeAutoTimecode ( qint64 miliseconds ) = 0;
+
+    /**
+    * Get the capabilityInterfaceType of this capability
+    * @return The capabilityInterfaceType ( always Meta::Capability::WriteTimecode; )
+    */
+    static Type capabilityInterfaceType()
+    {
+        return Meta::Capability::WriteTimecode;
+    }
+
+protected:
+
+    bool writeTimecode( qint64 miliseconds, Meta::TrackPtr track );
+    bool writeAutoTimecode( qint64 miliseconds, Meta::TrackPtr track );
+};
+
+#endif // TIMECODEWRITECAPABILITY_H
+}
diff --git a/src/core/capabilities/UpdateCapability.cpp b/src/core/capabilities/UpdateCapability.cpp
new file mode 100644
index 0000000..066fc53
--- /dev/null
+++ b/src/core/capabilities/UpdateCapability.cpp
@@ -0,0 +1,23 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "UpdateCapability.h"
+
+Meta::UpdateCapability::~UpdateCapability()
+{
+}
+
+#include "UpdateCapability.moc"
diff --git a/src/core/capabilities/UpdateCapability.h b/src/core/capabilities/UpdateCapability.h
new file mode 100644
index 0000000..fb9e97b
--- /dev/null
+++ b/src/core/capabilities/UpdateCapability.h
@@ -0,0 +1,46 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_UPDATECAPABILITY_H
+#define AMAROK_UPDATECAPABILITY_H
+
+#include "amarok_export.h"
+#include "core/capabilities/Capability.h"
+
+namespace Meta
+{
+    /**
+      * Do not use this capability. Ever. If you really need to emit Collection::updated()
+      * from outside the collection (which is wrong) use Collection::collectionUpdated(),
+      * e.g. track->collection()->collectionUpdated().
+      *
+      * The proper solution is to add code to the collection that allows it figure out on its
+      * own whether it has been changed.
+      */
+    class AMAROK_EXPORT UpdateCapability : public Meta::Capability
+    {
+        Q_OBJECT
+        public:
+            virtual ~UpdateCapability();
+
+            static Type capabilityInterfaceType() { return Meta::Capability::Updatable; }
+        // simply should emit track's collection's updated signal
+            virtual void collectionUpdated() const = 0;
+
+    };
+}
+
+#endif
diff --git a/src/core/capabilities/WriteLabelCapability.cpp b/src/core/capabilities/WriteLabelCapability.cpp
new file mode 100644
index 0000000..3c65c98
--- /dev/null
+++ b/src/core/capabilities/WriteLabelCapability.cpp
@@ -0,0 +1,20 @@
+/*
+    Copyright (C) 2009 Dan Meltzer <parallelgrapefruit at gmail.com>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "WriteLabelCapability.h"
+
diff --git a/src/core/capabilities/WriteLabelCapability.h b/src/core/capabilities/WriteLabelCapability.h
new file mode 100644
index 0000000..e481a5b
--- /dev/null
+++ b/src/core/capabilities/WriteLabelCapability.h
@@ -0,0 +1,41 @@
+/*
+    Copyright (C) 2009 Dan Meltzer <parallelgrapefruit at gmail.com>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef WRITELABELCAPABILITY_H
+#define WRITELABELCAPABILITY_H
+
+#include "core/capabilities/Capability.h"
+#include "core/meta/Meta.h"
+#include "amarok_export.h"
+
+namespace Meta
+{
+
+class AMAROK_EXPORT WriteLabelCapability : public Meta::Capability
+{
+    Q_OBJECT
+    public:
+        static Type capabilityInterfaceType() { return Meta::Capability::WriteLabel; }
+
+        //Implementors
+        virtual void setLabels( const QStringList &removedLabels, const QStringList &labels ) = 0;
+
+};
+
+}
+#endif // READLABELCAPABILITY_H
diff --git a/src/core/meta/Meta.cpp b/src/core/meta/Meta.cpp
new file mode 100644
index 0000000..2c05811
--- /dev/null
+++ b/src/core/meta/Meta.cpp
@@ -0,0 +1,540 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ * Copyright (c) 2007 Ian Monroe <ian at monroe.nu>                                        *
+ * Copyright (c) 2008 Mark Kretschmann <kretschmann at kde.org>                            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "core/meta/Meta.h"
+
+#include "Amarok.h"
+#include "amarokconfig.h"
+#include "collection/Collection.h"
+#include "Debug.h"
+#include "collection/QueryMaker.h"
+#include "SvgHandler.h"
+
+#include <QDir>
+#include <QImage>
+
+#include <KStandardDirs>
+
+//Meta::Observer
+
+Meta::Observer::~Observer()
+{
+    // Unsubscribe all stray Meta subscriptions:
+
+    foreach( TrackPtr ptr, m_trackSubscriptions )
+        if( ptr )
+            ptr->unsubscribe( this );
+    foreach( ArtistPtr ptr, m_artistSubscriptions )
+        if( ptr )
+            ptr->unsubscribe( this );
+    foreach( AlbumPtr ptr, m_albumSubscriptions )
+        if( ptr )
+            ptr->unsubscribe( this );
+    foreach( GenrePtr ptr, m_genreSubscriptions )
+        if( ptr )
+            ptr->unsubscribe( this );
+    foreach( ComposerPtr ptr, m_composerSubscriptions )
+        if( ptr )
+            ptr->unsubscribe( this );
+    foreach( YearPtr ptr, m_yearSubscriptions )
+        if( ptr )
+            ptr->unsubscribe( this );
+}
+
+void
+Meta::Observer::subscribeTo( TrackPtr ptr )
+{
+    if( ptr ) {
+        ptr->subscribe( this );
+        m_trackSubscriptions.insert( ptr );
+    }
+}
+
+void
+Meta::Observer::unsubscribeFrom( TrackPtr ptr )
+{
+    if( ptr ) {
+        ptr->unsubscribe( this );
+        m_trackSubscriptions.remove( ptr );
+    }
+}
+
+void
+Meta::Observer::subscribeTo( ArtistPtr ptr )
+{
+    if( ptr ) {
+        ptr->subscribe( this );
+        m_artistSubscriptions.insert( ptr );
+    }
+}
+
+void
+Meta::Observer::unsubscribeFrom( ArtistPtr ptr )
+{
+    if( ptr ) {
+        ptr->unsubscribe( this );
+        m_artistSubscriptions.remove( ptr );
+    }
+}
+
+void
+Meta::Observer::subscribeTo( AlbumPtr ptr )
+{
+    if( ptr ) {
+        ptr->subscribe( this );
+        m_albumSubscriptions.insert( ptr );
+    }
+}
+
+void
+Meta::Observer::unsubscribeFrom( AlbumPtr ptr )
+{
+    if( ptr ) {
+        ptr->unsubscribe( this );
+        m_albumSubscriptions.remove( ptr );
+    }
+}
+
+void
+Meta::Observer::subscribeTo( ComposerPtr ptr )
+{
+    if( ptr ) {
+        ptr->subscribe( this );
+        m_composerSubscriptions.insert( ptr );
+    }
+}
+
+void
+Meta::Observer::unsubscribeFrom( ComposerPtr ptr )
+{
+    if( ptr ) {
+        ptr->unsubscribe( this );
+        m_composerSubscriptions.remove( ptr );
+    }
+}
+
+void
+Meta::Observer::subscribeTo( GenrePtr ptr )
+{
+    if( ptr ) {
+        ptr->subscribe( this );
+        m_genreSubscriptions.insert( ptr );
+    }
+}
+
+void
+Meta::Observer::unsubscribeFrom( GenrePtr ptr )
+{
+    if( ptr ) {
+        ptr->unsubscribe( this );
+        m_genreSubscriptions.remove( ptr );
+    }
+}
+
+void
+Meta::Observer::subscribeTo( YearPtr ptr )
+{
+    if( ptr ) {
+        ptr->subscribe( this );
+        m_yearSubscriptions.insert( ptr );
+    }
+}
+
+void
+Meta::Observer::unsubscribeFrom( YearPtr ptr )
+{
+    if( ptr ) {
+        ptr->unsubscribe( this );
+        m_yearSubscriptions.remove( ptr );
+    }
+}
+
+void
+Meta::Observer::metadataChanged( TrackPtr track )
+{
+    Q_UNUSED( track );
+}
+
+void
+Meta::Observer::metadataChanged( ArtistPtr artist )
+{
+    Q_UNUSED( artist );
+}
+
+void
+Meta::Observer::metadataChanged( AlbumPtr album )
+{
+    Q_UNUSED( album );
+}
+
+void
+Meta::Observer::metadataChanged( ComposerPtr composer )
+{
+    Q_UNUSED( composer );
+}
+
+void
+Meta::Observer::metadataChanged( GenrePtr genre )
+{
+    Q_UNUSED( genre );
+}
+
+void
+Meta::Observer::metadataChanged( YearPtr year )
+{
+    Q_UNUSED( year );
+}
+
+//Meta::MetaCapability
+
+bool
+Meta::MetaCapability::hasCapabilityInterface( Meta::Capability::Type type ) const
+{
+    Q_UNUSED( type );
+    return false;
+}
+
+Meta::Capability*
+Meta::MetaCapability::createCapabilityInterface( Meta::Capability::Type type )
+{
+    Q_UNUSED( type );
+    return 0;
+}
+
+//Meta::MetaBase
+
+void
+Meta::MetaBase::subscribe( Observer *observer )
+{
+    if( observer )
+        m_observers.insert( observer );
+}
+
+void
+Meta::MetaBase::unsubscribe( Observer *observer )
+{
+    m_observers.remove( observer );
+}
+
+//Meta::Track
+
+QString
+Meta::Track::prettyName() const
+{
+    if( !name().isEmpty() )
+        return name();
+    return prettyUrl();
+}
+
+bool
+Meta::Track::inCollection() const
+{
+    return false;
+}
+
+Amarok::Collection*
+Meta::Track::collection() const
+{
+    return 0;
+}
+
+QString
+Meta::Track::cachedLyrics() const
+{
+    return QString();
+}
+
+void
+Meta::Track::setCachedLyrics( const QString &lyrics )
+{
+    Q_UNUSED( lyrics )
+}
+
+void
+Meta::Track::addMatchTo( QueryMaker *qm )
+{
+    qm->addMatch( TrackPtr( this ) );
+}
+
+QDateTime
+Meta::Track::createDate() const
+{
+    return QDateTime();
+}
+qreal
+Meta::Track::replayGain( Meta::Track::ReplayGainMode mode ) const
+{
+    Q_UNUSED( mode )
+    return 0.0;
+}
+
+qreal
+Meta::Track::replayPeakGain( Meta::Track::ReplayGainMode mode ) const
+{
+    Q_UNUSED( mode )
+    return 0.0;
+}
+
+void
+Meta::Track::prepareToPlay()
+{
+}
+
+void
+Meta::Track::finishedPlaying( double /*playedFraction*/ )
+{
+}
+
+void
+Meta::Track::notifyObservers() const
+{
+    foreach( Observer *observer, m_observers )
+    {
+        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
+            observer->metadataChanged( Meta::TrackPtr( const_cast<Meta::Track*>(this) ) );
+    }
+}
+
+uint
+Meta::Track::firstPlayed() const
+{
+    return 0;
+}
+
+bool
+Meta::Track::operator==( const Meta::Track &track ) const
+{
+    return dynamic_cast<const void*>( this ) == dynamic_cast<const void*>( &track );
+}
+
+bool
+Meta::Track::lessThan( const Meta::TrackPtr& left, const Meta::TrackPtr& right )
+{
+    if( !left || !right ) // These should never be 0, but it can apparently happen (http://bugs.kde.org/show_bug.cgi?id=181187)
+        return false;
+
+    if( left->album() && right->album() )
+        if( left->album()->name() == right->album()->name() )
+        {
+            if( left->discNumber() < right->discNumber() )
+                return true;
+            else if( left->discNumber() > right->discNumber() )
+                return false;
+
+            if( left->trackNumber() < right->trackNumber() )
+                return true;
+            if( left->trackNumber() > right->trackNumber() )
+                return false;
+        }
+
+    if( left->artist() && right->artist() )
+    {
+        int compare = QString::localeAwareCompare( left->artist()->prettyName(), right->artist()->prettyName() );
+        if ( compare < 0 )
+            return true;
+        else if ( compare > 0 )
+            return false;
+    }
+
+    if( left->album() && right->album() )
+    {
+        int compare = QString::localeAwareCompare( left->album()->prettyName(), right->album()->prettyName() );
+        if ( compare < 0 )
+            return true;
+        else if ( compare > 0 )
+            return false;
+    }
+
+    return QString::localeAwareCompare( left->prettyName(), right->prettyName() ) < 0;
+}
+
+//Meta::Artist
+
+void
+Meta::Artist::addMatchTo( QueryMaker *qm )
+{
+    qm->addMatch( ArtistPtr( this ) );
+}
+
+void
+Meta::Artist::notifyObservers() const
+{
+    foreach( Observer *observer, m_observers )
+    {
+        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
+            observer->metadataChanged( Meta::ArtistPtr( const_cast<Meta::Artist*>(this) ) );
+    }
+}
+
+bool
+Meta::Artist::operator==( const Meta::Artist &artist ) const
+{
+    return dynamic_cast<const void*>( this ) == dynamic_cast<const  void*>( &artist );
+}
+
+QString
+Meta::Artist::sortableName() const
+{
+    if ( m_sortableName.isEmpty() && !name().isEmpty() ) {
+        if ( name().startsWith( "the ", Qt::CaseInsensitive ) ) {
+            QString begin = name().left( 3 );
+            m_sortableName = QString( "%1, %2" ).arg( name(), begin );
+            m_sortableName = m_sortableName.mid( 4 );
+        }
+        else
+            m_sortableName = name();
+    }
+    return m_sortableName;
+}
+
+//Meta::Album
+
+void
+Meta::Album::addMatchTo( QueryMaker *qm )
+{
+    qm->addMatch( AlbumPtr( this ) );
+}
+
+void
+Meta::Album::notifyObservers() const
+{
+    foreach( Observer *observer, m_observers )
+    {
+        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
+            observer->metadataChanged( Meta::AlbumPtr( const_cast<Meta::Album*>(this) ));
+    }
+}
+
+QPixmap
+Meta::Album::image( int size )
+{
+    /*
+     * This is the base class's image() function, which returns "nocover" by default.
+     * Retrieval of the cover for the actual album is done by subclasses.
+     */
+    const QDir &cacheCoverDir = QDir( Amarok::saveLocation( "albumcovers/cache/" ) );
+    if( size <= 1 )
+        size = 100;
+    const QString &noCoverKey = QString::number( size ) + "@nocover.png";
+
+    QPixmap pixmap;
+    if( cacheCoverDir.exists( noCoverKey ) )
+    {
+        pixmap.load( cacheCoverDir.filePath( noCoverKey ) );
+    }
+    else
+    {
+        const QPixmap orgPixmap( KStandardDirs::locate( "data", "amarok/images/nocover.png" ) );
+        pixmap = orgPixmap.scaled( size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
+        pixmap.save( cacheCoverDir.filePath( noCoverKey ), "PNG" );
+    }
+    return pixmap;
+}
+
+
+QPixmap
+Meta::Album::imageWithBorder( int size, int borderWidth )
+{
+    const int imageSize = size - ( borderWidth * 2 );
+    const QString loc   = imageLocation( imageSize ).url();
+    const QString key   = !loc.isEmpty() ? loc : name();
+    const QPixmap cover = image( imageSize );
+    return The::svgHandler()->addBordersToPixmap( cover, borderWidth, key );
+}
+
+
+bool
+Meta::Album::operator==( const Meta::Album &album ) const
+{
+    return dynamic_cast<const void*>( this ) == dynamic_cast<const void*>( &album );
+}
+
+//Meta::Genre
+
+void
+Meta::Genre::addMatchTo( QueryMaker *qm )
+{
+    qm->addMatch( GenrePtr( this ) );
+}
+
+void
+Meta::Genre::notifyObservers() const
+{
+    foreach( Observer *observer, m_observers )
+    {
+        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
+        {
+            observer->metadataChanged( Meta::GenrePtr( const_cast<Meta::Genre*>(this) ) );
+        }
+    }
+}
+
+bool
+Meta::Genre::operator==( const Meta::Genre &genre ) const
+{
+    return dynamic_cast<const void*>( this ) == dynamic_cast<const void*>( &genre );
+}
+
+//Meta::Composer
+
+void
+Meta::Composer::addMatchTo( QueryMaker *qm )
+{
+    qm->addMatch( ComposerPtr( this ) );
+}
+
+void
+Meta::Composer::notifyObservers() const
+{
+    foreach( Observer *observer, m_observers )
+    {
+        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
+            observer->metadataChanged( Meta::ComposerPtr( const_cast<Meta::Composer*>(this) ) );
+    }
+}
+
+bool
+Meta::Composer::operator==( const Meta::Composer &composer ) const
+{
+    return dynamic_cast<const void*>( this ) == dynamic_cast<const  void*>( &composer );
+}
+
+//Meta::Year
+
+void
+Meta::Year::addMatchTo( QueryMaker *qm )
+{
+    qm->addMatch( YearPtr( this ) );
+}
+
+void
+Meta::Year::notifyObservers() const
+{
+    foreach( Observer *observer, m_observers )
+    {
+        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
+            observer->metadataChanged( Meta::YearPtr( const_cast<Meta::Year *>(this) ) );
+    }
+}
+
+bool
+Meta::Year::operator==( const Meta::Year &year ) const
+{
+    return dynamic_cast<const void*>( this ) == dynamic_cast<const  void*>( &year );
+}
+
diff --git a/src/core/meta/Meta.h b/src/core/meta/Meta.h
new file mode 100644
index 0000000..62fee9f
--- /dev/null
+++ b/src/core/meta/Meta.h
@@ -0,0 +1,441 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ * Copyright (c) 2008 Mark Kretschmann <kretschmann at kde.org>                            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_META_H
+#define AMAROK_META_H
+
+#include "amarok_export.h"
+
+#include "core/capabilities/Capability.h"
+
+#include <QDateTime>
+#include <QList>
+#include <QMetaType>
+#include <QPixmap>
+#include <QSet>
+#include <QSharedData>
+#include <QString>
+
+#include <ksharedptr.h>
+#include <kurl.h>
+
+class QueryMaker;
+
+namespace Amarok
+{
+    class Collection;
+}
+
+namespace Meta
+{
+    class MetaBase;
+    class Track;
+    class Artist;
+    class Album;
+    class Genre;
+    class Composer;
+    class Year;
+
+    typedef KSharedPtr<MetaBase> DataPtr;
+    typedef QList<DataPtr> DataList;
+    typedef KSharedPtr<Track> TrackPtr;
+    typedef QList<TrackPtr> TrackList;
+    typedef KSharedPtr<Artist> ArtistPtr;
+    typedef QList<ArtistPtr> ArtistList;
+    typedef KSharedPtr<Album> AlbumPtr;
+    typedef QList<AlbumPtr> AlbumList;
+    typedef KSharedPtr<Composer> ComposerPtr;
+    typedef QList<ComposerPtr> ComposerList;
+    typedef KSharedPtr<Genre> GenrePtr;
+    typedef QList<GenrePtr> GenreList;
+    typedef KSharedPtr<Year> YearPtr;
+    typedef QList<YearPtr> YearList;
+
+    class AMAROK_EXPORT Observer
+    {
+        public:
+            void subscribeTo( TrackPtr );
+            void unsubscribeFrom( TrackPtr );
+            void subscribeTo( ArtistPtr );
+            void unsubscribeFrom( ArtistPtr );
+            void subscribeTo( AlbumPtr );
+            void unsubscribeFrom( AlbumPtr );
+            void subscribeTo( ComposerPtr );
+            void unsubscribeFrom( ComposerPtr );
+            void subscribeTo( GenrePtr );
+            void unsubscribeFrom( GenrePtr );
+            void subscribeTo( YearPtr );
+            void unsubscribeFrom( YearPtr );
+
+            /** This method is called when the metadata of a track has changed.
+                The called class may not cache the pointer */
+            virtual void metadataChanged( TrackPtr track );
+            virtual void metadataChanged( ArtistPtr artist );
+            virtual void metadataChanged( AlbumPtr album );
+            virtual void metadataChanged( GenrePtr genre );
+            virtual void metadataChanged( ComposerPtr composer );
+            virtual void metadataChanged( YearPtr year );
+            virtual ~Observer();
+
+        private:
+            QSet<TrackPtr> m_trackSubscriptions;
+            QSet<ArtistPtr> m_artistSubscriptions;
+            QSet<AlbumPtr> m_albumSubscriptions;
+            QSet<ComposerPtr> m_composerSubscriptions;
+            QSet<GenrePtr> m_genreSubscriptions;
+            QSet<YearPtr> m_yearSubscriptions;
+    };
+
+    class AMAROK_EXPORT MetaCapability
+    {
+    public:
+        virtual ~MetaCapability() {}
+
+        virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
+
+        virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
+
+        /**
+             * Retrieves a specialized interface which represents a capability of this
+             * MetaBase object.
+             *
+             * @returns a pointer to the capability interface if it exists, 0 otherwise
+             */
+        template <class CapIface> CapIface *create()
+        {
+            Meta::Capability::Type type = CapIface::capabilityInterfaceType();
+            Meta::Capability *iface = createCapabilityInterface( type );
+            return qobject_cast<CapIface *>( iface );
+        }
+
+        /**
+             * Tests if a MetaBase object provides a given capability interface.
+             *
+             * @returns true if the interface is available, false otherwise
+             */
+        template <class CapIface> bool is() const
+        {
+            return hasCapabilityInterface( CapIface::capabilityInterfaceType() );
+        }
+    };
+
+    class AMAROK_EXPORT MetaBase : public QSharedData, public MetaCapability
+    {
+        friend class Observer;
+
+        Q_PROPERTY( QString name READ name )
+        Q_PROPERTY( QString prettyName READ prettyName )
+        Q_PROPERTY( QString fullPrettyName READ fullPrettyName )
+        Q_PROPERTY( QString sortableName READ sortableName )
+
+        public:
+            MetaBase() {}
+            virtual ~MetaBase() {}
+            virtual QString name() const = 0;
+
+            virtual QString prettyName() const = 0;
+            virtual QString fullPrettyName() const { return prettyName(); }
+            virtual QString sortableName() const { return prettyName(); }
+
+            /**used for showing a fixed name in the tree view. Needed for items that change
+             * their name occasionally such as some streams. These should overwrite this
+             */
+            virtual QString fixedName() const { return prettyName(); }
+
+            virtual void addMatchTo( QueryMaker *qm ) = 0;
+
+
+
+        protected:
+            virtual void subscribe( Observer *observer );
+            virtual void unsubscribe( Observer *observer );
+
+            virtual void notifyObservers() const = 0;
+
+            QSet<Meta::Observer*> m_observers;
+
+        private: // no copy allowed, since it's not safe with observer list
+            Q_DISABLE_COPY(MetaBase)
+    };
+
+    class AMAROK_EXPORT Track : public MetaBase
+    {
+        public:
+
+            /**
+             * The Replay Gain mode.
+             */
+            enum ReplayGainMode
+            {
+                /** All tracks should be equally loud.  Also known as Radio mode. */
+                TrackReplayGain,
+                /** All albums should be equally loud.  Also known as Audiophile mode. */
+                AlbumReplayGain
+            };
+
+            virtual ~Track() {}
+            /** used to display the trackname, should never be empty, returns prettyUrl() by default if name() is empty */
+            virtual QString prettyName() const = 0;
+            /** an url which can be played by the engine backends */
+            virtual KUrl playableUrl() const = 0;
+            /** an url for display purposes */
+            virtual QString prettyUrl() const = 0;
+            /** an url which is unique for this track. Use this if you need a key for the track */
+            virtual QString uidUrl() const = 0;
+
+            /** Returns whether playableUrl() will return a playable Url */
+            virtual bool isPlayable() const = 0;
+            /** Returns the album this track belongs to */
+            virtual AlbumPtr album() const = 0;
+            /** Returns the artist of this track */
+            virtual ArtistPtr artist() const = 0;
+            /** Returns the composer of this track */
+            virtual ComposerPtr composer() const = 0;
+            /** Returns the genre of this track */
+            virtual GenrePtr genre() const = 0;
+            /** Returns the year of this track */
+            virtual YearPtr year() const = 0;
+            /** Returns the BPM of this track */
+            virtual float bpm() const = 0;
+            /** Returns the comment of this track */
+            virtual QString comment() const = 0;
+            /** Returns the score of this track */
+            virtual double score() const = 0;
+            virtual void setScore( double newScore ) = 0;
+            /** Returns the rating of this track */
+            virtual int rating() const = 0;
+            virtual void setRating( int newRating ) = 0;
+            /** Returns the length of this track in milliseconds, or 0 if unknown */
+            virtual qint64 length() const = 0;
+            /** Returns the filesize of this track in bytes */
+            virtual int filesize() const = 0;
+            /** Returns the sample rate of this track */
+            virtual int sampleRate() const = 0;
+            /** Returns the bitrate o this track */
+            virtual int bitrate() const = 0;
+            /** Returns the time when the track was added to the collection,
+                or an invalid QDateTime instance if the time is not known */
+            virtual QDateTime createDate() const;
+            /** Returns the track number of this track */
+            virtual int trackNumber() const = 0;
+            /** Returns the discnumber of this track */
+            virtual int discNumber() const = 0;
+            /** Returns the time the song was last played, or 0 if it has not been played yet */
+            virtual uint lastPlayed() const = 0;
+            /** Returns the time the song was first played, or 0 if it has not been played yet */
+            virtual uint firstPlayed() const;
+            /** Returns the number of times the track was played (what about unknown?)*/
+            virtual int playCount() const = 0;
+            /**
+             * Returns the gain adjustment for a given replay gain mode.
+             *
+             * Should return @c 0 if no replay gain value is known.
+             *
+             * Should return the track replay gain if the album gain is requested but
+             * is not available.
+             */
+            virtual qreal replayGain( ReplayGainMode mode ) const;
+            /** Returns the peak (after gain adjustment) for a given replay gain mode */
+            virtual qreal replayPeakGain( ReplayGainMode mode ) const;
+
+            /** Returns the type of this track, e.g. "ogg", "mp3", "stream" */
+            virtual QString type() const = 0;
+
+            /** tell the track to perform any prerequisite
+             * operations before playing */
+            virtual void prepareToPlay();
+
+            /** tell the track object that amarok finished playing it.
+                The argument is the percentage of the track which was played, in the range 0 to 1*/
+            virtual void finishedPlaying( double playedFraction );
+
+            virtual void addMatchTo( QueryMaker* qm );
+
+            /** returns true if the track is part of a collection false otherwise */
+            virtual bool inCollection() const;
+            /**
+                returns the collection that the track is part of, or 0 iff
+                inCollection() returns false */
+            virtual Amarok::Collection* collection() const;
+
+            /** get the cached lyrics for the track. returns an empty string if
+                no cached lyrics are available */
+            virtual QString cachedLyrics() const;
+            /**
+                set the cached lyrics for the track
+            */
+            virtual void setCachedLyrics( const QString &lyrics );
+
+            virtual bool operator==( const Track &track ) const;
+
+            static bool lessThan( const TrackPtr& left, const TrackPtr& right );
+
+        protected:
+            virtual void notifyObservers() const;
+
+    };
+
+    class AMAROK_EXPORT Artist : public MetaBase
+    {
+        Q_PROPERTY( TrackList tracks READ tracks )
+        Q_PROPERTY( AlbumList albums READ albums )
+        public:
+
+            virtual ~Artist() {}
+            /** returns all tracks by this artist */
+            virtual TrackList tracks() = 0;
+
+            /** returns all albums by this artist */
+            virtual AlbumList albums() = 0;
+
+            virtual void addMatchTo( QueryMaker* qm );
+
+            virtual bool operator==( const Meta::Artist &artist ) const;
+
+            virtual QString sortableName() const;
+
+        protected:
+            virtual void notifyObservers() const;
+
+        private:
+            mutable QString m_sortableName;
+    };
+
+    class AMAROK_EXPORT Album : public MetaBase
+    {
+        Q_PROPERTY( bool compilation READ isCompilation )
+        Q_PROPERTY( bool hasAlbumArtist READ hasAlbumArtist )
+        Q_PROPERTY( ArtistPtr albumArtist READ albumArtist )
+        Q_PROPERTY( TrackList tracks READ tracks )
+        Q_PROPERTY( bool hasImage READ hasImage )
+        Q_PROPERTY( QPixmap image READ image WRITE setImage )
+        Q_PROPERTY( bool supressImageAutoFetch READ suppressImageAutoFetch WRITE setSuppressImageAutoFetch )
+
+        public:
+            Album() {}
+            virtual ~Album() {}
+            virtual bool isCompilation() const = 0;
+
+            /** Returns true if this album has an album artist */
+            virtual bool hasAlbumArtist() const = 0;
+            /** Returns a pointer to the album's artist */
+            virtual ArtistPtr albumArtist() const = 0;
+            /** returns all tracks on this album */
+            virtual TrackList tracks() = 0;
+
+            /**
+             * A note about image sizes:
+             *  when size is <= 1, return the full size image
+             */
+            /** returns true if the album has a cover set */
+            virtual bool hasImage( int size = 1 ) const { Q_UNUSED( size ); return false; }
+            /** returns the "nocover" image; proper cover image getter is
+             * implemented in subclasses  */
+            virtual QPixmap image( int size = 1 );
+            /** returns the image location on disk */
+            virtual KUrl imageLocation( int size = 1 ) { Q_UNUSED( size ); return KUrl(); }
+            /** returns the cover of the album with a nice border around it*/
+            virtual QPixmap imageWithBorder( int size = 1, int borderWidth = 5 );
+            /** Returns true if it is possible to update the cover of the album */
+            virtual bool canUpdateImage() const { return false; }
+            /** updates the cover of the album */
+            virtual void setImage( const QPixmap &pixmap ) { Q_UNUSED( pixmap ); } //TODO: choose parameter
+            /** removes the album art */
+            virtual void removeImage() { }
+            /** don't automatically fetch artwork */
+            virtual void setSuppressImageAutoFetch( const bool suppress ) { Q_UNUSED( suppress ); }
+            /** should automatic artwork retrieval be suppressed? */
+            virtual bool suppressImageAutoFetch() const { return false; }
+
+            virtual void addMatchTo( QueryMaker* qm );
+
+            virtual bool operator==( const Meta::Album &album ) const;
+
+        protected:
+            virtual void notifyObservers() const;
+    };
+
+    class AMAROK_EXPORT Composer : public MetaBase
+    {
+        Q_PROPERTY( TrackList tracks READ tracks )
+        public:
+
+            virtual ~Composer() {}
+            /** returns all tracks by this composer */
+            virtual TrackList tracks() = 0;
+
+            virtual void addMatchTo( QueryMaker* qm );
+
+            virtual bool operator==( const Meta::Composer &composer ) const;
+
+        protected:
+            virtual void notifyObservers() const;
+    };
+
+    class AMAROK_EXPORT Genre : public MetaBase
+    {
+        Q_PROPERTY( TrackList tracks READ tracks )
+        public:
+
+            virtual ~Genre() {}
+            /** returns all tracks which belong to the genre */
+            virtual TrackList tracks() = 0;
+
+            virtual void addMatchTo( QueryMaker* qm );
+
+            virtual bool operator==( const Meta::Genre &genre ) const;
+
+        protected:
+            virtual void notifyObservers() const;
+    };
+
+    class AMAROK_EXPORT Year : public MetaBase
+    {
+        Q_PROPERTY( TrackList tracks READ tracks )
+        public:
+
+            virtual ~Year() {}
+            /** returns all tracks which are tagged with this year */
+            virtual TrackList tracks() = 0;
+
+            virtual void addMatchTo( QueryMaker* qm );
+
+            virtual bool operator==( const Meta::Year &year ) const;
+
+        protected:
+            virtual void notifyObservers() const;
+    };
+}
+
+Q_DECLARE_METATYPE( Meta::DataPtr )
+Q_DECLARE_METATYPE( Meta::DataList )
+Q_DECLARE_METATYPE( Meta::TrackPtr )
+Q_DECLARE_METATYPE( Meta::TrackList )
+Q_DECLARE_METATYPE( Meta::ArtistPtr )
+Q_DECLARE_METATYPE( Meta::ArtistList )
+Q_DECLARE_METATYPE( Meta::AlbumPtr )
+Q_DECLARE_METATYPE( Meta::AlbumList )
+Q_DECLARE_METATYPE( Meta::ComposerPtr )
+Q_DECLARE_METATYPE( Meta::ComposerList )
+Q_DECLARE_METATYPE( Meta::GenrePtr )
+Q_DECLARE_METATYPE( Meta::GenreList )
+Q_DECLARE_METATYPE( Meta::YearPtr )
+Q_DECLARE_METATYPE( Meta::YearList )
+
+
+
+#endif /* AMAROK_META_H */
diff --git a/src/core/meta/impl/cdda/AudioCdTrackProvider.cpp b/src/core/meta/impl/cdda/AudioCdTrackProvider.cpp
new file mode 100644
index 0000000..702e324
--- /dev/null
+++ b/src/core/meta/impl/cdda/AudioCdTrackProvider.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "CDDAManager.h"
+#include "CDDAManager_p.h"
+
+CDDAManager::CDDAManager( QObject *parent )
+    : QObject( parent )
+    , d( new Private() )
+{
+}
+
+CDDAManager::~CDDAManager()
+{
+    delete d;
+}
+
+QStringList
+CDDAManager::audioCdUdis() const
+{
+    return QStringList();
+}
+
+QString
+CDDAManager::audioCdName( const QString &udi ) const
+{
+    return QString();
+}
+
+void
+CDDAManager::playAudioCd( const QString &udi ) const
+{
+}
+
+#include "CDDAManager.moc"
+
diff --git a/src/core/meta/impl/cdda/AudioCdTrackProvider.h b/src/core/meta/impl/cdda/AudioCdTrackProvider.h
new file mode 100644
index 0000000..6db2568
--- /dev/null
+++ b/src/core/meta/impl/cdda/AudioCdTrackProvider.h
@@ -0,0 +1,46 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AUDIOCDTRACKPROVIDER_H
+#define AUDIOCDTRACKPROVIDER_H
+
+#include "meta.h"
+
+#include <QObject>
+#include <QStringList>
+
+/**
+ * This manager handles audio cds. Audio CDs require special treatment because
+ * we are not operating on files, instead we tell the engine to play the cd directly.
+ * Therefore CollectionManager::trackForUrl cannot be used.
+ */
+class CDDAManager : public QObject
+{
+    Q_OBJECT
+    public:
+        CDDAManager( QObject *parent );
+        ~CDDAManager();
+
+        QStringList audioCdUdis() const;
+        QString audioCdName( const QString &udi ) const;
+        void playAudioCd( const QString &udi ) const;
+
+    private:
+        class Private;
+        Private * const d;
+};
+
+#endif
diff --git a/src/core/meta/impl/cdda/AudioCdTrackProvider_p.cpp b/src/core/meta/impl/cdda/AudioCdTrackProvider_p.cpp
new file mode 100644
index 0000000..cede185
--- /dev/null
+++ b/src/core/meta/impl/cdda/AudioCdTrackProvider_p.cpp
@@ -0,0 +1,123 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "AudioCdTrackProvider_p.h"
+
+#include "Debug.h"
+
+#include <solid/block.h>
+#include <solid/device.h>
+#include <solid/deviceinterface.h>
+#include <solid/devicenotifier.h>
+#include <solid/storagevolume.h>
+
+#include <kcompactdisc.h>
+
+#include <QList>
+
+AudioCdTrackProvider::Private::Private()
+    : QObejct()
+{
+    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceAdded( const QString ) ), SLOT( deviceAdded( const QString ) ) );
+    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceRemoved( const QString ) ), SLOT( deviceRemoved( const QString ) ) );
+    QList<Solid::Device> devices = Solid::Device::listFromType( Solid::DeviceInterface::OpticalDisc );
+    foreach( const Solid::Device &device, devices )
+    {
+        Solid::OpticalDisc *od = device.as<Solid::OpticalDisc>();
+        if( od->availableContent() != Solid::OpticalDisc::Audio )
+        {
+            continue;
+        }
+        if( device.is<Solid::StorageVolume>() )
+        {
+            Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
+            if( sv->isIgnored() )
+            {
+                continue;
+            }
+        }
+        if( device.is<Solid::Block>() )
+        {
+            //does this actually work on windows???
+            Solid::Block *sb = devie.as>Solid::Block>();
+            m_cddaDevices.insert( device.udi(), sb->device() );
+        }
+    }
+}
+
+AudioCdTrackProvider::Private::~Private()
+{
+}
+
+void
+AudioCdTrackProvider::Private::deviceAdded( const QString &udi )
+{
+    Solid::Device device( udi );
+    if( !device.is<Solid::OpticalDisc>() )
+    {
+        return;
+    }
+    if( device.is<Solid::StorageVolume>() )
+    {
+        Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
+        if( sv->isIgnored() )
+        {
+            return;
+        }
+    }
+    if( device.is<Solid::Block>() )
+    {
+            //does this actually work on windows???
+        Solid::Block *sb = devie.as>Solid::Block>();
+        m_cddaDevices.insert( device.udi(), sb->device() );
+        KCompactDisc cd;
+        cd.setDevice( sb->device() );
+        QList<unsigned> signature = cd.discSignature();
+        if( signature.isEmpty() )
+        {
+            warning() << "Could not get CDDB disc signature for " << sb->device();
+            return;
+        }
+    }
+}
+
+void
+AudioCdTrackProvider::Private::deviceRemoved( const QString &udi )
+{
+    m_cddaDevices.remove( udi );
+}
+
+bool
+AudioCdTrackProvider::Private::isPathOnCd( const QString &path ) const
+{
+    const QStringList paths = m_cdMountPaths.values();
+    foreach( const QString &mountPoint, paths )
+    {
+        //path can be entered by the user, therefore we cannot make any assumptions about the case
+        //of the path on windows -> d:/ and D:/ are equivalent
+#ifdef Q_WS_WIN
+        if( path.startsWith( mountPoint, Qt::CaseInsensitive ) );
+#else
+        if( path.startsWith( mountPoint ) )
+#endif
+        {
+            return true;
+        }
+    }
+    return false;
+}
+
+#include "AudioCdTrackProvider_p.moc"
diff --git a/src/core/meta/impl/cdda/AudioCdTrackProvider_p.h b/src/core/meta/impl/cdda/AudioCdTrackProvider_p.h
new file mode 100644
index 0000000..17ce27e
--- /dev/null
+++ b/src/core/meta/impl/cdda/AudioCdTrackProvider_p.h
@@ -0,0 +1,42 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_AUDIOCDTRACKPROVIDER_P_H
+#define AMAROK_AUDIOCDTRACKPROVIDER_P_H
+
+#include <QMap>
+#include <QObject>
+#include <QString>
+
+class AudioCdTrackProvider::Private : public QObject
+{
+    Q_OBJECT
+    public:
+        Private();
+        ~Private();
+
+        bool isPathOnCd( const QString &path ) const;
+        
+
+    public slots:
+        void deviceAdded( const QString &udi );
+        void deviceRemoved( const QString &udi );
+
+    private:
+        QMap<QString, QString> m_cddaDevices;
+};
+
+#endif
diff --git a/src/core/meta/impl/cue/Cue.cpp b/src/core/meta/impl/cue/Cue.cpp
new file mode 100644
index 0000000..cff49a7
--- /dev/null
+++ b/src/core/meta/impl/cue/Cue.cpp
@@ -0,0 +1,278 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Casey Link <unnamedrambler at gmail.com>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "Cue.h"
+#include "Cue_p.h"
+#include "Cue_p.moc"
+
+#include "Debug.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/TimecodeLoadCapability.h"
+#include "amarokurls/PlayUrlRunner.h"
+#include "amarokurls/PlayUrlGenerator.h"
+#include "amarokurls/BookmarkMetaActions.h"
+
+#include <KEncodingProber>
+
+#include <QAction>
+#include <QDir>
+#include <QFile>
+#include <QMapIterator>
+#include <QPointer>
+#include <QTextCodec>
+
+using namespace MetaCue;
+
+namespace MetaCue {
+
+class TimecodeLoadCapabilityImpl : public Meta::TimecodeLoadCapability
+{
+    public:
+        TimecodeLoadCapabilityImpl( Track *track )
+        : Meta::TimecodeLoadCapability()
+        , m_track( track )
+        {}
+
+        virtual bool hasTimecodes()
+        {
+            if ( loadTimecodes().size() > 0 )
+                return true;
+            return false;
+        }
+
+        virtual BookmarkList loadTimecodes()
+        {
+            DEBUG_BLOCK
+
+            CueFileItemMap map = m_track->cueItems();
+            debug() << " cue has " << map.size() << " entries";
+            QMapIterator<long, CueFileItem> it( map );
+            BookmarkList list;
+
+            while ( it.hasNext() )
+            {
+                it.next();
+                debug() << " seconds : " << it.key();
+
+                AmarokUrl aUrl;
+                rUrl = PlayUrlGenerator::instance()->createTrackBookmark( Meta::TrackPtr( m_track.data() ), it.key(), it.value().getTitle() );
+                AmarokUrlPtr url( new AmarokUrl( aUrl.url() ) );
+                url->setName( aUrl.name() ); // TODO AmarokUrl should really have a copy constructor
+
+                list << url;
+            }
+
+            return list;
+        }
+
+    private:
+        KSharedPtr<Track> m_track;
+};
+}
+Track::Track ( const KUrl &url, const KUrl &cuefile )
+    : MetaFile::Track ( url )
+    , EngineObserver ( The::engineController() )
+    , m_cuefile ( cuefile )
+    , m_lastSeekPos ( -1 )
+    , m_cueitems()
+    , d ( new Track::Private ( this ) )
+{
+    DEBUG_BLOCK
+
+    d->url = url;
+    d->artistPtr = Meta::ArtistPtr ( new CueArtist ( QPointer<Track::Private> ( d ) ) );
+    d->albumPtr = Meta::AlbumPtr ( new CueAlbum ( QPointer<Track::Private> ( d ) ) );
+
+    setTitle ( MetaFile::Track::name() );
+    setArtist ( MetaFile::Track::artist()->name() );
+    setAlbum ( MetaFile::Track::album()->name() );
+    setTrackNumber ( MetaFile::Track::trackNumber() );
+
+    m_cueitems = CueFileSupport::loadCueFile( this );
+}
+
+Track::~Track()
+{
+    delete d;
+}
+
+CueFileItemMap Track::cueItems() const
+{
+    return m_cueitems;
+}
+
+void Track::subscribe ( Meta::Observer *observer )
+{
+    DEBUG_BLOCK
+    debug() << "Adding observer: " << observer;
+    m_observers.insert ( observer );
+}
+
+void Track::unsubscribe ( Meta::Observer *observer )
+{
+    DEBUG_BLOCK
+    debug() << "Removing observer: " << observer;
+    m_observers.remove ( observer );
+}
+
+void Track::notify() const
+{
+    foreach ( Meta::Observer *observer, m_observers )
+    {
+//         debug() << "Notifying observer: " << observer;
+        observer->metadataChanged ( Meta::TrackPtr ( Meta::TrackPtr ( const_cast<MetaCue::Track*> ( d->track ) ) ) );
+    }
+}
+
+void Track::engineTrackPositionChanged( qint64 position, bool userSeek )
+{
+    Meta::TrackPtr currentTrack = The::engineController()->currentTrack();
+    if ( !currentTrack || currentTrack->playableUrl().url() != MetaFile::Track::playableUrl().url() )
+        return;
+//     debug() << "userSeek: " << userSeek << " pos: " << position << " lastseekPos: " << m_lastSeekPos;
+    if ( userSeek || position > m_lastSeekPos )
+    {
+        CueFileItemMap::Iterator it = m_cueitems.end();
+        while ( it != m_cueitems.begin() )
+        {
+            --it;
+//             debug() << "Checking " << position << " against pos " << it.key()/1000 << " title " << (*it).getTitle() << endl;
+            if ( it.key() <= position )
+            {
+//                 debug() << "\tcurr: " << currentTrack->artist()->name() << " " << currentTrack->album()->name() << " " <<  currentTrack->name() << " "<< currentTrack->trackNumber();
+//                 debug() << "\titer: " << (*it).getArtist() << " " << (*it).getAlbum() << " " << (*it).getTitle()<< " " << (*it).getTrackNumber();
+                bool artistCheck = currentTrack->artist() && currentTrack->artist()->name() != ( *it ).getArtist();
+                bool albumCheck = currentTrack->album() && currentTrack->album()->name() != ( *it ).getAlbum();
+                bool titleCheck = ( *it ).getTitle() != currentTrack->name();
+                bool trackNumCheck = ( *it ).getTrackNumber() != currentTrack->trackNumber();
+                if ( artistCheck || albumCheck || titleCheck || trackNumCheck )
+                {
+                    setTitle ( ( *it ).getTitle() );
+                    setArtist ( ( *it ).getArtist() );
+                    setAlbum ( ( *it ).getAlbum() );
+                    setTrackNumber ( ( *it ).getTrackNumber() );
+
+                    long length = ( *it ).getLength();
+                    if ( length == -1 ) // need to calculate
+                    {
+                        ++it;
+                        long nextKey = it == m_cueitems.end() ? currentTrack->length() : it.key();
+                        --it;
+                        length = qMax ( nextKey - it.key(), 0L );
+                    }
+                    //emit newCuePoint( position, it.key() / 1000, ( it.key() + length ) / 1000 );
+                    notify();
+                }
+                break;
+            }
+        }
+    }
+
+    m_lastSeekPos = position;
+}
+
+
+QString
+Track::name() const
+{
+    return d->title;
+}
+
+QString
+Track::prettyName() const
+{
+    return name();
+}
+
+QString
+Track::fullPrettyName() const
+{
+    return name();
+}
+
+QString
+Track::sortableName() const
+{
+    return name();
+}
+
+Meta::AlbumPtr
+Track::album() const
+{
+    return d->albumPtr;
+}
+
+Meta::ArtistPtr
+Track::artist() const
+{
+    return d->artistPtr;
+}
+
+
+void
+Track::setAlbum ( const QString &newAlbum )
+{
+    d->album = newAlbum;
+}
+
+void
+Track::setArtist ( const QString& newArtist )
+{
+    d->artist = newArtist;
+}
+
+void
+Track::setTitle ( const QString &newTitle )
+{
+    d->title = newTitle;
+}
+
+int
+Track::trackNumber() const
+{
+    return d->tracknumber;
+}
+
+void
+Track::setTrackNumber ( int newTrackNumber )
+{
+    d->tracknumber = newTrackNumber;
+}
+
+qint64
+Track::length() const
+{
+    return d->length;
+}
+
+bool
+Track::hasCapabilityInterface( Meta::Capability::Type type ) const
+{
+    return type == Meta::Capability::LoadTimecode;
+}
+
+Meta::Capability*
+Track::createCapabilityInterface( Meta::Capability::Type type )
+{
+    switch( type )
+    {
+        case Meta::Capability::LoadTimecode:
+            return new MetaCue::TimecodeLoadCapabilityImpl( this );
+        default:
+            return 0;
+    }
+}
+
diff --git a/src/core/meta/impl/cue/Cue.h b/src/core/meta/impl/cue/Cue.h
new file mode 100644
index 0000000..e44498e
--- /dev/null
+++ b/src/core/meta/impl/cue/Cue.h
@@ -0,0 +1,93 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Casey Link <unnamedrambler at gmail.com>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_META_CUE_H
+#define AMAROK_META_CUE_H
+
+#include "../file/File.h"
+#include "CueFileSupport.h"
+#include "EngineController.h"
+#include "EngineObserver.h"
+
+#include <QMap>
+#include <QSet>
+
+/*
+Method for locating cue files:
+
+if ( track.url.isLocalFile() )
+{
+    QString path    = track.url().path();
+    QString cueFile = path.left( path.findRev('.') ) + ".cue";
+
+    // other stuff
+}*/
+
+namespace MetaCue
+{
+
+class AMAROK_EXPORT Track : public MetaFile::Track, public EngineObserver
+{
+    public:
+        class Private;
+
+        Track ( const KUrl &url, const KUrl &cuefile );
+        virtual ~Track();
+
+        virtual CueFileItemMap cueItems() const;
+
+        virtual void engineTrackPositionChanged ( qint64 /*position*/, bool /*userSeek*/ );
+
+        virtual void subscribe ( Meta::Observer *observer );
+        virtual void unsubscribe ( Meta::Observer *observer );
+
+        //methods inherited from Meta::MetaBase
+        virtual QString name() const;
+        virtual QString prettyName() const;
+        virtual QString fullPrettyName() const;
+        virtual QString sortableName() const;
+
+        virtual int trackNumber() const;
+        virtual qint64 length() const;
+
+        virtual Meta::AlbumPtr album() const;
+        virtual Meta::ArtistPtr artist() const;
+
+
+        virtual void setAlbum ( const QString &newAlbum );
+        virtual void setArtist ( const QString &newArtist );
+        virtual void setTitle ( const QString &newTitle );
+        virtual void setTrackNumber ( int newTrackNumber );
+
+        virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
+        virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
+
+    private:
+        typedef KSharedPtr<Track> TrackPtr;
+
+        void notify() const;
+
+        KUrl m_cuefile;
+        int m_lastSeekPos; // in seconds
+        CueFileItemMap m_cueitems;
+        QSet<Meta::Observer*> m_observers;
+
+        Private * const d;
+};
+
+}
+
+#endif  // end include guard
diff --git a/src/core/meta/impl/cue/CueFileSupport.cpp b/src/core/meta/impl/cue/CueFileSupport.cpp
new file mode 100644
index 0000000..defd2ab
--- /dev/null
+++ b/src/core/meta/impl/cue/CueFileSupport.cpp
@@ -0,0 +1,444 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.com>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Pulic License for more details.              *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+
+#include "CueFileSupport.h"
+
+#include "Debug.h"
+#include "timecode/TimecodeMeta.h"
+
+#include <KEncodingProber>
+
+#include <QDir>
+#include <QFile>
+#include <QTextCodec>
+
+using namespace MetaCue;
+
+/**
+* Parses a cue sheet file into CueFileItems and inserts them in a QMap
+* @return a map of CueFileItems. If the cue file was not successfully loaded
+*         the map is empty.
+* @author (C) 2005 by Martin Ehmke <ehmke at gmx.de>
+*/
+
+CueFileItemMap CueFileSupport::loadCueFile( Meta::TrackPtr track )
+{
+
+    //attempt to find cue file, return empty map if not found or invalid
+    KUrl cuefile = locateCueSheet( track->playableUrl() );
+    if( cuefile.isEmpty() )
+    {
+        debug() << "No cue file found for track " << track->playableUrl();
+        return CueFileItemMap();
+    }
+
+    return loadCueFile( cuefile, track->length() );
+}
+
+
+CueFileItemMap CueFileSupport::loadCueFile( const KUrl &cuefile, qint64 mediaLength  )
+{
+
+    DEBUG_BLOCK
+
+    CueFileItemMap cueItems;
+    
+    debug() << "CUEFILE: " << cuefile.pathOrUrl();
+    if ( QFile::exists ( cuefile.pathOrUrl() ) )
+    {
+        debug() << "  EXISTS!";
+        QFile file ( cuefile.pathOrUrl() );
+        int track = 0;
+        QString defaultArtist;
+        QString defaultAlbum;
+        QString artist;
+        QString title;
+        long length = 0;
+        long prevIndex = -1;
+        bool index00Present = false;
+        long index = -1;
+
+        int mode = BEGIN;
+        if ( file.open ( QIODevice::ReadOnly ) )
+        {
+            QTextStream stream ( &file );
+            QString line;
+            KEncodingProber prober;
+
+            KEncodingProber::ProberState result = prober.feed( file.readAll() );
+            file.seek( 0 );
+
+            if( result != KEncodingProber::NotMe )
+                stream.setCodec( QTextCodec::codecForName( prober.encoding() ) );
+
+            debug() << "Encoding: " << prober.encoding();
+
+            while ( !stream.atEnd() )
+            {
+                line = stream.readLine().simplified();
+
+                if ( line.startsWith ( "title", Qt::CaseInsensitive ) )
+                {
+                    title = line.mid ( 6 ).remove ( '"' );
+                    if ( mode == BEGIN )
+                    {
+                        defaultAlbum = title;
+                        title.clear();
+                        debug() << "Album: " << defaultAlbum;
+                    }
+                    else
+                        debug() << "Title: " << title;
+                }
+
+                else if ( line.startsWith ( "performer", Qt::CaseInsensitive ) )
+                {
+                    artist = line.mid ( 10 ).remove ( '"' );
+                    if ( mode == BEGIN )
+                    {
+                        defaultArtist = artist;
+                        artist.clear();
+                        debug() << "Album Artist: " << defaultArtist;
+                    }
+                    else
+                        debug() << "Artist: " << artist;
+                }
+
+                else if ( line.startsWith ( "track", Qt::CaseInsensitive ) )
+                {
+                    if ( mode == TRACK_FOUND )
+                    {
+                        // not valid, because we have to have an index for the previous track
+                        file.close();
+                        debug() << "Mode is TRACK_FOUND, abort.";
+                        return CueFileItemMap();
+                    }
+                    if ( mode == INDEX_FOUND )
+                    {
+                        if ( artist.isNull() )
+                            artist = defaultArtist;
+
+                        debug() << "Inserting item: " << title << " - " << artist << " on " << defaultAlbum << " (" << track << ")";
+                        // add previous entry to map
+                        cueItems.insert ( index, CueFileItem ( title, artist, defaultAlbum, track, index ) );
+                        prevIndex = index;
+                        title.clear();
+                        artist.clear();
+                        track  = 0;
+                    }
+                    track = line.section ( ' ',1,1 ).toInt();
+                    debug() << "Track: " << track;
+                    mode = TRACK_FOUND;
+                }
+                else if ( line.startsWith ( "index", Qt::CaseInsensitive ) )
+                {
+                    if ( mode == TRACK_FOUND )
+                    {
+                        int indexNo = line.section ( ' ',1,1 ).toInt();
+
+                        if ( indexNo == 1 )
+                        {
+                            QStringList time = line.section ( ' ', -1, -1 ).split ( ':' );
+
+                            index = time[0].toLong() *60*1000 + time[1].toLong() *1000 + time[2].toLong() *1000/75; //75 frames per second
+
+                            if ( prevIndex != -1 && !index00Present ) // set the prev track's length if there is INDEX01 present, but no INDEX00
+                            {
+                                length = index - prevIndex;
+                                debug() << "Setting length of track " << cueItems[prevIndex].getTitle() << " to " << length << " msecs.";
+                                cueItems[prevIndex].setLength ( length );
+                            }
+
+                            index00Present = false;
+                            mode = INDEX_FOUND;
+                            length = 0;
+                        }
+
+                        else if ( indexNo == 0 ) // gap, use to calc prev track length
+                        {
+                            QStringList time = line.section ( ' ', -1, -1 ).split ( ':' );
+
+                            length = time[0].toLong() * 60 * 1000 + time[1].toLong() * 1000 + time[2].toLong() *1000/75; //75 frames per second
+
+                            if ( prevIndex != -1 )
+                            {
+                                length -= prevIndex; //this[prevIndex].getIndex();
+                                debug() << "Setting length of track " << cueItems[prevIndex].getTitle() << " to " << length << " msecs.";
+                                cueItems[prevIndex].setLength ( length );
+                                index00Present = true;
+                            }
+                            else
+                                length =  0;
+                        }
+                        else
+                        {
+                            debug() << "Skipping unsupported INDEX " << indexNo;
+                        }
+                    }
+                    else
+                    {
+                        // not valid, because we don't have an associated track
+                        file.close();
+                        debug() << "Mode is not TRACK_FOUND but encountered INDEX, abort.";
+                        return CueFileItemMap();
+                    }
+                    debug() << "index: " << index;
+                }
+            }
+
+            if ( artist.isNull() )
+                artist = defaultArtist;
+
+            debug() << "Inserting item: " << title << " - " << artist << " on " << defaultAlbum << " (" << track << ")";
+            // add previous entry to map
+            cueItems.insert ( index, CueFileItem ( title, artist, defaultAlbum, track, index ) );
+            file.close();
+        }
+
+        /**
+        *  Because there is no way to set the length for the last track in a normal way,
+        *  we have to do some magic here. Having the total length of the media file given
+        *  we can set the lenth for the last track after all the cue file was loaded into array.
+        */
+
+        cueItems[index].setLength ( mediaLength - index );
+        debug() << "Setting length of track " << cueItems[index].getTitle() << " to " << mediaLength - index << " msecs.";
+
+        return cueItems;
+    }
+    return CueFileItemMap();
+}
+
+KUrl CueFileSupport::locateCueSheet ( const KUrl &trackurl )
+{
+    if ( !trackurl.isValid() || !trackurl.isLocalFile() )
+        return KUrl();
+    // look for the cue file that matches the media file
+    QString path    = trackurl.path();
+    QString cueFile = path.left ( path.lastIndexOf ( '.' ) ) + ".cue";
+
+    if ( validateCueSheet ( cueFile ) )
+    {
+        debug() << "[CUEFILE]: " << cueFile << " - Shoot blindly, found and loaded. ";
+        return KUrl ( cueFile );
+    }
+    debug() << "[CUEFILE]: " << cueFile << " - Shoot blindly and missed, searching for other cue files.";
+
+    bool foundCueFile = false;
+    QDir dir ( trackurl.directory() );
+    QStringList filters;
+    filters << "*.cue" << "*.CUE";
+    dir.setNameFilters ( filters );
+
+    QStringList cueFilesList = dir.entryList();
+
+    if ( !cueFilesList.empty() )
+        for ( QStringList::Iterator it = cueFilesList.begin(); it != cueFilesList.end() && !foundCueFile; ++it )
+        {
+            QFile file ( dir.filePath ( *it ) );
+            if ( file.open ( QIODevice::ReadOnly ) )
+            {
+                debug() << "[CUEFILE]: " << *it << " - Opened, looking for the matching FILE stanza." << endl;
+                QTextStream stream ( &file );
+                QString line;
+
+                while ( !stream.atEnd() && !foundCueFile )
+                {
+                    line = stream.readLine().simplified();
+
+                    if ( line.startsWith ( "file", Qt::CaseInsensitive ) )
+                    {
+                        line = line.mid ( 5 ).remove ( '"' );
+
+                        if ( line.contains ( trackurl.fileName(), Qt::CaseInsensitive ) )
+                        {
+                            cueFile = dir.filePath ( *it );
+
+                            if ( validateCueSheet ( cueFile ) )
+                            {
+                                debug() << "[CUEFILE]: " << cueFile << " - Looked inside cue files, found and loaded proper one" << endl;
+                                foundCueFile = true;
+                            }
+                        }
+                    }
+                }
+
+                file.close();
+            }
+        }
+
+    if ( foundCueFile )
+        return KUrl ( cueFile );
+    debug() << "[CUEFILE]: - Didn't find any matching cue file." << endl;
+    return KUrl();
+}
+
+bool CueFileSupport::validateCueSheet ( const QString& cuefile )
+{
+    if ( !QFile::exists ( cuefile ) )
+        return false;
+
+    QFile file ( cuefile );
+    int track = 0;
+    QString defaultArtist;
+    QString defaultAlbum;
+    QString artist;
+    QString title;
+    long length = 0;
+    long prevIndex = -1;
+    bool index00Present = false;
+    long index = -1;
+
+    int mode = BEGIN;
+    if ( file.open ( QIODevice::ReadOnly ) )
+    {
+        QTextStream stream ( &file );
+        QString line;
+
+        while ( !stream.atEnd() )
+        {
+            line = stream.readLine().simplified();
+
+            if ( line.startsWith ( "title", Qt::CaseInsensitive ) )
+            {
+                title = line.mid ( 6 ).remove ( '"' );
+                if ( mode == BEGIN )
+                {
+                    defaultAlbum = title;
+                    title.clear();
+                    debug() << "Album: " << defaultAlbum;
+                }
+                else
+                    debug() << "Title: " << title;
+            }
+
+            else if ( line.startsWith ( "performer", Qt::CaseInsensitive ) )
+            {
+                artist = line.mid ( 10 ).remove ( '"' );
+                if ( mode == BEGIN )
+                {
+                    defaultArtist = artist;
+                    artist.clear();
+                    debug() << "Album Artist: " << defaultArtist;
+                }
+                else
+                    debug() << "Artist: " << artist;
+            }
+
+            else if ( line.startsWith ( "track", Qt::CaseInsensitive ) )
+            {
+                if ( mode == TRACK_FOUND )
+                {
+                    // not valid, because we have to have an index for the previous track
+                    file.close();
+                    debug() << "Mode is TRACK_FOUND, abort.";
+                    return false;
+                }
+                if ( mode == INDEX_FOUND )
+                {
+                    if ( artist.isNull() )
+                        artist = defaultArtist;
+
+                    prevIndex = index;
+                    title.clear();
+                    artist.clear();
+                    track  = 0;
+                }
+                track = line.section ( ' ',1,1 ).toInt();
+                debug() << "Track: " << track;
+                mode = TRACK_FOUND;
+            }
+            else if ( line.startsWith ( "index", Qt::CaseInsensitive ) )
+            {
+                if ( mode == TRACK_FOUND )
+                {
+                    int indexNo = line.section ( ' ',1,1 ).toInt();
+
+                    if ( indexNo == 1 )
+                    {
+                        QStringList time = line.section ( ' ', -1, -1 ).split ( ':' );
+
+                        index = time[0].toLong() *60*1000 + time[1].toLong() *1000 + time[2].toLong() *1000/75; //75 frames per second
+
+                        if ( prevIndex != -1 && !index00Present ) // set the prev track's length if there is INDEX01 present, but no INDEX00
+                        {
+                            length = index - prevIndex;
+                        }
+
+                        index00Present = false;
+                        mode = INDEX_FOUND;
+                        length = 0;
+                    }
+
+                    else if ( indexNo == 0 ) // gap, use to calc prev track length
+                    {
+                        QStringList time = line.section ( ' ', -1, -1 ).split ( ':' );
+
+                        length = time[0].toLong() *60*1000 + time[1].toLong() *1000 + time[2].toLong() *1000/75; //75 frames per second
+
+                        if ( prevIndex != -1 )
+                        {
+                            length -= prevIndex; //this[prevIndex].getIndex();
+                            index00Present = true;
+                        }
+                        else
+                            length =  0;
+                    }
+                    else
+                    {
+                        debug() << "Skipping unsupported INDEX " << indexNo;
+                    }
+                }
+                else
+                {
+                    // not valid, because we don't have an associated track
+                    file.close();
+                    debug() << "Mode is not TRACK_FOUND but encountered INDEX, abort.";
+                    return false;
+                }
+                debug() << "index: " << index;
+            }
+        }
+
+        if ( artist.isNull() )
+            artist = defaultArtist;
+
+        file.close();
+    }
+    return true;
+}
+
+
+Meta::TrackList
+CueFileSupport::generateTimeCodeTracks( Meta::TrackPtr baseTrack, CueFileItemMap itemMap )
+{
+    Meta::TrackList trackList;
+
+    foreach( CueFileItem item, itemMap )
+    {
+        Meta::TimecodeTrack * track = new Meta::TimecodeTrack( item.getTitle(), baseTrack->playableUrl().url(), item.getIndex(), item.getIndex() + item.getLength() );
+        track->beginMetaDataUpdate();
+        track->setArtist( item.getArtist() );
+        track->setAlbum( item.getAlbum() );
+        track->setTrackNumber( item.getTrackNumber() );
+        track->endMetaDataUpdate();
+
+        trackList << Meta::TrackPtr( track );
+    }
+
+    return trackList;
+    
+}
diff --git a/src/core/meta/impl/cue/CueFileSupport.h b/src/core/meta/impl/cue/CueFileSupport.h
new file mode 100644
index 0000000..e3bd4bc
--- /dev/null
+++ b/src/core/meta/impl/cue/CueFileSupport.h
@@ -0,0 +1,131 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.com>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Pulic License for more details.              *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+
+#ifndef CUEFILESUPPORT_H
+#define CUEFILESUPPORT_H
+
+#include "core/meta/Meta.h"
+
+#include <KUrl>
+
+#include <QFile>
+#include <QSet>
+#include <QString>
+
+namespace MetaCue
+{
+
+class CueFileItem
+{
+public:
+    CueFileItem ( const QString& title, const QString& artist, const QString& album, const int trackNumber, const long index )
+            : m_title ( title )
+            , m_artist ( artist )
+            , m_album ( album )
+            , m_trackNumber ( trackNumber )
+            , m_index ( index )
+            , m_length ( -1 )
+    {}
+
+    CueFileItem()
+            : m_title( )
+            , m_artist( )
+            , m_album( )
+            , m_trackNumber ( -1 )
+            , m_index ( -1 )
+            , m_length ( -1 )
+    {}
+    void setLength ( const long length )
+    {
+        m_length = length;
+    }
+    const QString getTitle () const
+    {
+        return m_title;
+    }
+    const QString getArtist () const
+    {
+        return m_artist;
+    }
+    const QString getAlbum () const
+    {
+        return m_album;
+    }
+    int getTrackNumber () const
+    {
+        return m_trackNumber;
+    }
+    long getIndex () const
+    {
+        return m_index;
+    }
+    long getLength () const
+    {
+        return m_length;
+    }
+
+private:
+    QString m_title;
+    QString m_artist;
+    QString m_album;
+    int     m_trackNumber;
+    long    m_index;
+    long    m_length;
+
+    //QSet<Meta::Observer*> observers;
+    KUrl m_url;
+};
+
+typedef QMap<long, CueFileItem> CueFileItemMap;
+
+
+class CueFileSupport
+{
+
+    public:
+
+    enum Markers
+    {
+        BEGIN = 0,
+        TRACK_FOUND, // track found, index not yet found
+        INDEX_FOUND
+    };
+        
+     static CueFileItemMap loadCueFile( Meta::TrackPtr track );
+
+     static CueFileItemMap loadCueFile( const KUrl &cuefile, qint64 mediaLength );
+        
+     /**
+     * Used to locate a cue sheet for a local track.
+     * @return A KUrl containing the url for the cue sheet
+     *         if a valid one was located
+     */
+    static KUrl locateCueSheet ( const KUrl &trackurl );
+
+    /**
+     * Attempts to load and parse a cue sheet.
+     * @return true if the cue sheet is valid
+     *         false if the cue sheet is invalid
+     */
+    static bool validateCueSheet ( const QString& cuefile );
+
+    static Meta::TrackList generateTimeCodeTracks( Meta::TrackPtr baseTrack, CueFileItemMap itemMap );
+};
+
+}
+
+#endif // CUEFILESUPPORT_H
diff --git a/src/core/meta/impl/cue/Cue_p.h b/src/core/meta/impl/cue/Cue_p.h
new file mode 100644
index 0000000..07c1ca4
--- /dev/null
+++ b/src/core/meta/impl/cue/Cue_p.h
@@ -0,0 +1,158 @@
+/****************************************************************************************
+ * Copyright (c) 2007-2008 Maximilian Kossick <maximilian.kossick at googlemail.com>       *
+ * Copyright (c) 2008 Mark Kretschmann <kretschmann at kde.org>                            *
+ * Copyright (c) 2008 Casey Link <unnamedrambler at gmail.com>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_CUE_P_H
+#define AMAROK_CUE_P_H
+
+#include "Debug.h"
+#include "EngineController.h"
+#include "EngineObserver.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaConstants.h"
+
+#include <QList>
+#include <QObject>
+
+using namespace MetaCue;
+
+class MetaCue::Track::Private : public QObject//, public EngineObserver
+{
+    Q_OBJECT
+public:
+    Private ( Track *t )
+    //      : EngineObserver( The::engineController() )
+            : title()
+            , artist()
+            , album()
+            , tracknumber( 0 )
+            , length( 0 )
+            , track ( t )
+    {}
+
+    QSet<Meta::Observer*> observers;
+    KUrl url;
+    QString title;
+    QString artist;
+    QString album;
+    int tracknumber;
+    qint64 length;
+
+    Meta::ArtistPtr artistPtr;
+    Meta::AlbumPtr albumPtr;
+    Meta::GenrePtr genrePtr;
+    Meta::ComposerPtr composerPtr;
+    Meta::YearPtr yearPtr;
+
+//    private:
+    Track *track;
+};
+
+
+// internal helper classes
+
+class CueArtist : public Meta::Artist
+{
+public:
+    CueArtist ( MetaCue::Track::Private *dptr )
+            : Meta::Artist()
+            , d ( dptr )
+    {}
+
+    Meta::TrackList tracks()
+    {
+        return Meta::TrackList();
+    }
+
+    Meta::AlbumList albums()
+    {
+        return Meta::AlbumList();
+    }
+
+    QString name() const
+    {
+        if ( d )
+            return d->artist;
+        return QString();
+    }
+
+    QString prettyName() const
+    {
+        return name();
+    }
+
+    bool operator==( const Meta::Artist &other ) const {
+        return name() == other.name();
+    }
+
+    MetaCue::Track::Private * const d;
+};
+
+class CueAlbum : public Meta::Album
+{
+public:
+    CueAlbum ( MetaCue::Track::Private *dptr )
+            : Meta::Album()
+            , d ( dptr )
+    {}
+
+    bool isCompilation() const
+    {
+        return false;
+    }
+
+    bool hasAlbumArtist() const
+    {
+        return false;
+    }
+
+    Meta::ArtistPtr albumArtist() const
+    {
+        return Meta::ArtistPtr();
+    }
+
+    Meta::TrackList tracks()
+    {
+        return Meta::TrackList();
+    }
+
+    QString name() const
+    {
+        if ( d )
+            return d->album;
+        return QString();
+    }
+
+    QString prettyName() const
+    {
+        return name();
+    }
+
+    QPixmap image ( int size )
+    {
+        return Meta::Album::image ( size );
+    }
+
+    bool operator==( const Meta::Album &other ) const {
+        return name() == other.name();
+    }
+
+    MetaCue::Track::Private * const d;
+};
+
+
+#endif
diff --git a/src/core/meta/impl/default/DefaultMetaTypes.h b/src/core/meta/impl/default/DefaultMetaTypes.h
new file mode 100644
index 0000000..0a59c8f
--- /dev/null
+++ b/src/core/meta/impl/default/DefaultMetaTypes.h
@@ -0,0 +1,121 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) version 3 or        *
+ * any later version accepted by the membership of KDE e.V. (or its successor approved  *
+ * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of  *
+ * version 3 of the license.                                                            *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef DEFAULTMETATYPES_H
+#define DEFAULTMETATYPES_H
+
+#include "amarok_export.h"
+#include "Debug.h"
+#include "core/meta/Meta.h"
+
+#include <KLocale>
+
+
+namespace Meta
+{
+
+class AMAROK_EXPORT DefaultArtist : public Meta::Artist
+{
+    public:
+
+        DefaultArtist() {};
+        virtual ~DefaultArtist() {};
+
+        virtual QString name() const { return i18nc( "The value is not known", "Unknown" ); }
+        virtual QString prettyName() const { return name(); };
+
+        virtual TrackList tracks() { return TrackList(); }
+        virtual AlbumList albums() { return AlbumList(); }
+
+};
+
+class AMAROK_EXPORT DefaultAlbum : public Meta::Album
+{
+    public:
+
+        DefaultAlbum()
+            : Meta::Album()
+            , m_albumArtist( new DefaultArtist() ) {}
+        virtual ~DefaultAlbum() {};
+
+        virtual bool hasAlbumArtist() const { return true; }
+        virtual ArtistPtr albumArtist() const { return m_albumArtist; }
+
+        virtual bool isCompilation() const { return false; }
+
+        virtual QString name() const { return i18nc( "The Value is not known", "Unknown" ); }
+        virtual QString prettyName() const { return name(); };
+
+        virtual TrackList tracks() { return TrackList(); }
+
+    private:
+        Meta::ArtistPtr m_albumArtist;
+
+};
+
+
+class AMAROK_EXPORT DefaultComposer : public Meta::Composer
+{
+    public:
+
+        DefaultComposer() {};
+        virtual ~DefaultComposer() {};
+        
+        virtual QString name() const { return i18nc( "The value is not known", "Unknown" ); }
+        virtual QString prettyName() const { return name(); };
+
+        virtual TrackList tracks() { return TrackList(); }
+
+    private:
+
+        static ComposerPtr s_instance;
+
+};
+
+class AMAROK_EXPORT DefaultGenre : public Meta::Genre
+{
+    public:
+
+        DefaultGenre() {};
+        virtual ~DefaultGenre() {};
+        
+        virtual QString name() const { return i18nc( "The value is not known", "Unknown" ); }
+        virtual QString prettyName() const { return name(); };
+
+        virtual TrackList tracks() { return TrackList(); }
+
+};
+class AMAROK_EXPORT DefaultYear : public Meta::Year
+{
+    public:
+
+        DefaultYear() {};
+        virtual ~DefaultYear() {};
+        
+        virtual QString name() const { return "0"; }
+        virtual QString prettyName() const { return name(); };
+
+        virtual TrackList tracks() { return TrackList(); }
+
+};
+
+}
+
+#endif
+
+
diff --git a/src/core/meta/impl/file/File.cpp b/src/core/meta/impl/file/File.cpp
new file mode 100644
index 0000000..6abcb0f
--- /dev/null
+++ b/src/core/meta/impl/file/File.cpp
@@ -0,0 +1,705 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ * Copyright (c) 2008 Seb Ruiz <ruiz at kde.org>                                           *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "File.h"
+#include "File_p.h"
+
+#include "Amarok.h"
+#include "amarokurls/BookmarkMetaActions.h"
+#include "browsers/filebrowser/FileBrowser.h"
+#include <config-amarok.h>
+#include "MainWindow.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/capabilities/EditCapability.h"
+#include "core/capabilities/FindInSourceCapability.h"
+#include "core/capabilities/StatisticsCapability.h"
+#include "core/capabilities/TimecodeWriteCapability.h"
+#include "core/capabilities/TimecodeLoadCapability.h"
+#include "core/statistics/providers/url/PermanentUrlStatisticsProvider.h"
+#include "core/meta/support/MetaUtility.h"
+#include "amarokurls/PlayUrlRunner.h"
+
+#include <QAction>
+#include <QList>
+#include <QPointer>
+#include <QString>
+
+#ifdef HAVE_LIBLASTFM
+  #include "LastfmReadLabelCapability.h"
+#endif
+using namespace MetaFile;
+
+class EditCapabilityImpl : public Meta::EditCapability
+{
+    Q_OBJECT
+    public:
+        EditCapabilityImpl( MetaFile::Track *track )
+            : Meta::EditCapability()
+            , m_track( track )
+        {}
+
+        virtual bool isEditable() const { return m_track->isEditable(); }
+        virtual void setAlbum( const QString &newAlbum ) { m_track->setAlbum( newAlbum ); }
+        virtual void setArtist( const QString &newArtist ) { m_track->setArtist( newArtist ); }
+        virtual void setComposer( const QString &newComposer ) { m_track->setComposer( newComposer ); }
+        virtual void setGenre( const QString &newGenre ) { m_track->setGenre( newGenre ); }
+        virtual void setYear( const QString &newYear ) { m_track->setYear( newYear ); }
+        virtual void setBpm( const float newBpm ) { m_track->setBpm( newBpm ); }
+        virtual void setTitle( const QString &newTitle ) { m_track->setTitle( newTitle ); }
+        virtual void setComment( const QString &newComment ) { m_track->setComment( newComment ); }
+        virtual void setTrackNumber( int newTrackNumber ) { m_track->setTrackNumber( newTrackNumber ); }
+        virtual void setDiscNumber( int newDiscNumber ) { m_track->setDiscNumber( newDiscNumber ); }
+        virtual void beginMetaDataUpdate() { m_track->beginMetaDataUpdate(); }
+        virtual void endMetaDataUpdate() { m_track->endMetaDataUpdate(); }
+        virtual void abortMetaDataUpdate() { m_track->abortMetaDataUpdate(); }
+
+    private:
+        KSharedPtr<MetaFile::Track> m_track;
+};
+
+class StatisticsCapabilityImpl : public Meta::StatisticsCapability
+{
+    public:
+        StatisticsCapabilityImpl( MetaFile::Track *track )
+            : Meta::StatisticsCapability()
+            , m_track( track )
+        {}
+
+        virtual void setScore( const int score ) { m_track->setScore( score ); }
+        virtual void setRating( const int rating ) { m_track->setRating( rating ); }
+        virtual void setFirstPlayed( const uint time ) { m_track->setFirstPlayed( time ); }
+        virtual void setLastPlayed( const uint time ) { m_track->setLastPlayed( time ); }
+        virtual void setPlayCount( const int playcount ) { m_track->setPlayCount( playcount ); }
+        virtual void beginStatisticsUpdate() {};
+        virtual void endStatisticsUpdate() {};
+        virtual void abortStatisticsUpdate() {};
+
+    private:
+        KSharedPtr<MetaFile::Track> m_track;
+};
+
+class TimecodeWriteCapabilityImpl : public Meta::TimecodeWriteCapability
+{
+    public:
+        TimecodeWriteCapabilityImpl( MetaFile::Track *track )
+            : Meta::TimecodeWriteCapability()
+            , m_track( track )
+        {}
+
+    virtual bool writeTimecode ( qint64 miliseconds )
+    {
+        DEBUG_BLOCK
+        return Meta::TimecodeWriteCapability::writeTimecode( miliseconds, Meta::TrackPtr( m_track.data() ) );
+    }
+
+    virtual bool writeAutoTimecode ( qint64 miliseconds )
+    {
+        DEBUG_BLOCK
+        return Meta::TimecodeWriteCapability::writeAutoTimecode( miliseconds, Meta::TrackPtr( m_track.data() ) );
+    }
+
+    private:
+        KSharedPtr<MetaFile::Track> m_track;
+};
+
+class TimecodeLoadCapabilityImpl : public Meta::TimecodeLoadCapability
+{
+    public:
+        TimecodeLoadCapabilityImpl( MetaFile::Track *track )
+        : Meta::TimecodeLoadCapability()
+        , m_track( track )
+        {}
+
+        virtual bool hasTimecodes()
+        {
+            if ( loadTimecodes().size() > 0 )
+                return true;
+            return false;
+        }
+
+        virtual BookmarkList loadTimecodes()
+        {
+            BookmarkList list = PlayUrlRunner::bookmarksFromUrl( m_track->playableUrl() );
+            return list;
+        }
+
+    private:
+        KSharedPtr<MetaFile::Track> m_track;
+};
+
+
+class FindInSourceCapabilityImpl : public Meta::FindInSourceCapability
+{
+public:
+    FindInSourceCapabilityImpl( MetaFile::Track *track )
+        : Meta::FindInSourceCapability()
+        , m_track( track )
+        {}
+        
+    virtual void findInSource()
+    {
+        //first show the filebrowser
+        AmarokUrl url;
+        url.setCommand( "navigate" );
+        url.setPath( "files" );
+        url.run();
+
+        //then navigate to the correct directory
+        BrowserCategory * fileCategory = The::mainWindow()->browserWidget()->list()->activeCategoryRecursive();
+        if( fileCategory )
+        {
+            FileBrowser * fileBrowser = dynamic_cast<FileBrowser *>( fileCategory );
+            if( fileBrowser )
+            {
+                //get the path of the parent directory of the file
+                KUrl playableUrl = m_track->playableUrl();
+                fileBrowser->setDir( playableUrl.directory() );       
+            }
+        }
+    }
+
+private:
+    KSharedPtr<MetaFile::Track> m_track;
+};
+
+
+Track::Track( const KUrl &url )
+    : Meta::Track()
+    , d( new Track::Private( this ) )
+{
+    d->url = url;
+    d->provider = new PermanentUrlStatisticsProvider( url.url() );
+    d->readMetaData();
+    d->album = Meta::AlbumPtr( new MetaFile::FileAlbum( QPointer<MetaFile::Track::Private>( d ) ) );
+    d->artist = Meta::ArtistPtr( new MetaFile::FileArtist( QPointer<MetaFile::Track::Private>( d ) ) );
+    d->genre = Meta::GenrePtr( new MetaFile::FileGenre( QPointer<MetaFile::Track::Private>( d ) ) );
+    d->composer = Meta::ComposerPtr( new MetaFile::FileComposer( QPointer<MetaFile::Track::Private>( d ) ) );
+    d->year = Meta::YearPtr( new MetaFile::FileYear( QPointer<MetaFile::Track::Private>( d ) ) );
+}
+
+Track::~Track()
+{
+    delete d->provider;
+    delete d;
+}
+
+QString
+Track::name() const
+{
+    if( d )
+    {
+        const QString trackName = d->m_data.title;
+        return trackName;
+    }
+    return "This is a bug!";
+}
+
+QString
+Track::prettyName() const
+{
+    return name();
+}
+
+QString
+Track::fullPrettyName() const
+{
+    return name();
+}
+
+QString
+Track::sortableName() const
+{
+    return name();
+}
+
+
+KUrl
+Track::playableUrl() const
+{
+    return d->url;
+}
+
+QString
+Track::prettyUrl() const
+{
+    if(d->url.isLocalFile())
+    {
+        return d->url.toLocalFile();
+    }
+    else
+    {
+        return d->url.path();
+    }
+}
+
+QString
+Track::uidUrl() const
+{
+    return d->url.url();
+}
+
+bool
+Track::isPlayable() const
+{
+    //simple implementation, check Internet connectivity or ping server?
+    return true;
+}
+
+bool
+Track::isEditable() const
+{
+    DEBUG_BLOCK
+
+    //note this probably needs more work on *nix
+    QFile::Permissions p;
+    if(d->url.isLocalFile())
+    {
+        p = QFile::permissions( d->url.toLocalFile() );
+    }
+    else
+    {
+        p = QFile::permissions( d->url.path() );
+    }
+    const bool editable = ( p & QFile::WriteUser ) || ( p & QFile::WriteGroup ) || ( p & QFile::WriteOther );
+
+    debug() << d->url.path() << " editable: " << editable;
+    return editable;
+}
+
+Meta::AlbumPtr
+Track::album() const
+{
+    return d->album;
+}
+
+Meta::ArtistPtr
+Track::artist() const
+{
+    return d->artist;
+}
+
+Meta::GenrePtr
+Track::genre() const
+{
+    return d->genre;
+}
+
+Meta::ComposerPtr
+Track::composer() const
+{
+    return d->composer;
+}
+
+Meta::YearPtr
+Track::year() const
+{
+    return d->year;
+}
+
+void
+Track::setAlbum( const QString &newAlbum )
+{
+    DEBUG_BLOCK
+    d->changes.insert( Meta::Field::ALBUM, QVariant( newAlbum ) );
+    debug() << "CHANGES HERE: " << d->changes;
+    if( !d->batchUpdate )
+    {
+        d->m_data.album = newAlbum;
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+void
+Track::setArtist( const QString& newArtist )
+{
+    d->changes.insert( Meta::Field::ARTIST, QVariant( newArtist ) );
+    if( !d->batchUpdate )
+    {
+        d->m_data.artist = newArtist;
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+void
+Track::setGenre( const QString& newGenre )
+{
+    d->changes.insert( Meta::Field::GENRE, QVariant( newGenre ) );
+    if( !d->batchUpdate )
+    {
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+void
+Track::setComposer( const QString& newComposer )
+{
+    d->changes.insert( Meta::Field::COMPOSER, QVariant( newComposer ) );
+    if( !d->batchUpdate )
+    {
+        d->m_data.composer = newComposer;
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+void
+Track::setYear( const QString& newYear )
+{
+    d->changes.insert( Meta::Field::YEAR, QVariant( newYear ) );
+    if( !d->batchUpdate )
+    {
+        d->m_data.year = newYear.toInt();
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+void
+Track::setTitle( const QString &newTitle )
+{
+    d->changes.insert( Meta::Field::TITLE, QVariant( newTitle ) );
+    if( !d->batchUpdate )
+    {
+        d->m_data.title = newTitle;
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+void
+Track::setBpm( const float newBpm )
+{
+    d->changes.insert( Meta::Field::BPM, QVariant( newBpm ) );
+    if( !d->batchUpdate )
+    {
+        d->m_data.bpm = newBpm;
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+float
+Track::bpm() const
+{
+    const float bpm = d->m_data.bpm;
+    return bpm;
+}
+
+QString
+Track::comment() const
+{
+    const QString commentName = d->m_data.comment;
+    if( !commentName.isEmpty() )
+        return commentName;
+    return QString();
+}
+
+void
+Track::setComment( const QString& newComment )
+{
+    d->changes.insert( Meta::Field::COMMENT, QVariant( newComment ) );
+    if( !d->batchUpdate )
+    {
+        d->m_data.comment = newComment;
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+double
+Track::score() const
+{
+
+    if( d->provider )
+        return d->provider->score();
+    else
+        return 0.0;
+}
+
+void
+Track::setScore( double newScore )
+{
+    if( d->provider )
+        d->provider->setScore( newScore );
+}
+
+int
+Track::rating() const
+{
+    if( d->provider )
+        return d->provider->rating();
+    else
+        return 0;
+}
+
+void
+Track::setRating( int newRating )
+{
+    if( d->provider )
+        d->provider->setRating( newRating );
+}
+
+int
+Track::trackNumber() const
+{
+    return d->m_data.trackNumber;
+}
+
+void
+Track::setTrackNumber( int newTrackNumber )
+{
+    d->changes.insert( Meta::Field::TRACKNUMBER, QVariant( newTrackNumber ) );
+    if( !d->batchUpdate )
+    {
+        d->m_data.trackNumber = newTrackNumber;
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+int
+Track::discNumber() const
+{
+    return d->m_data.discNumber;
+}
+
+void
+Track::setDiscNumber( int newDiscNumber )
+{
+    d->changes.insert( Meta::Field::DISCNUMBER, QVariant ( newDiscNumber ) );
+    if( !d->batchUpdate )
+    {
+        d->m_data.discNumber = newDiscNumber;
+        d->writeMetaData();
+        notifyObservers();
+    }
+}
+
+qint64
+Track::length() const
+{
+    qint64 length = d->m_data.length;
+    if( length == -2 /*Undetermined*/ )
+        length = 0;
+    return length;
+}
+
+int
+Track::filesize() const
+{
+    return d->m_data.fileSize;
+}
+
+int
+Track::sampleRate() const
+{
+    int sampleRate = d->m_data.sampleRate;
+    if( sampleRate == -2 /*Undetermined*/ )
+        sampleRate = 0;
+    return sampleRate;
+}
+
+int
+Track::bitrate() const
+{
+   int bitrate = d->m_data.bitRate;
+   if( bitrate == -2 /*Undetermined*/ )
+       bitrate = 0;
+   return bitrate;
+}
+
+QDateTime
+Track::createDate() const
+{
+    return d->m_data.created;
+}
+
+uint
+Track::lastPlayed() const
+{
+    if( d->provider )
+        return d->provider->lastPlayed().toTime_t();
+    else
+        return 0;
+}
+
+void
+Track::setLastPlayed( uint newTime )
+{
+    if( d->provider )
+        d->provider->setLastPlayed( QDateTime::fromTime_t( newTime ) );
+}
+
+uint
+Track::firstPlayed() const
+{
+    if( d->provider )
+        return d->provider->firstPlayed().toTime_t();
+    else
+        return 0;
+}
+
+void
+Track::setFirstPlayed( uint newTime )
+{
+    if( d->provider )
+        d->provider->setFirstPlayed( QDateTime::fromTime_t( newTime ) );
+}
+
+int
+Track::playCount() const
+{
+    if( d->provider )
+        return d->provider->playCount();
+    else
+        return 0;
+}
+
+void
+Track::setPlayCount( int newCount )
+{
+    if( d->provider )
+        d->provider->setPlayCount( newCount );
+}
+
+qreal
+Track::replayGain( Meta::Track::ReplayGainMode mode ) const
+{
+    if ( mode == Meta::Track::AlbumReplayGain )
+        return d->m_data.trackGain;
+    return d->m_data.albumGain;
+}
+
+qreal
+Track::replayPeakGain( Meta::Track::ReplayGainMode mode ) const
+{
+    if ( mode == Meta::Track::AlbumReplayGain )
+        return d->m_data.trackPeak;
+    return d->m_data.albumPeak;
+}
+
+QString
+Track::type() const
+{
+    return Amarok::extension( d->url.fileName() );
+}
+
+void
+Track::beginMetaDataUpdate()
+{
+    d->batchUpdate = true;
+}
+
+void
+Track::endMetaDataUpdate()
+{
+ DEBUG_LINE_INFO
+    debug() << "CHANGES HERE: " << d->changes;
+    d->writeMetaData();
+    d->batchUpdate = false;
+    notifyObservers();
+}
+
+void
+Track::abortMetaDataUpdate()
+{
+    d->changes.clear();
+    d->batchUpdate = false;
+}
+
+void
+Track::finishedPlaying( double playedFraction )
+{
+    if( d->provider )
+        d->provider->played( playedFraction );
+}
+
+bool
+Track::inCollection() const
+{
+    return false;
+}
+
+Amarok::Collection*
+Track::collection() const
+{
+    return 0;
+}
+
+bool
+Track::hasCapabilityInterface( Meta::Capability::Type type ) const
+{
+    bool readlabel = false;
+#ifdef HAVE_LIBLASTFM
+    readlabel = true;
+#endif
+    return type == Meta::Capability::Editable ||
+           type == Meta::Capability::Importable ||
+           type == Meta::Capability::CurrentTrackActions ||
+           type == Meta::Capability::WriteTimecode ||
+           type == Meta::Capability::LoadTimecode ||
+           ( type == Meta::Capability::ReadLabel && readlabel ) ||
+           type == Meta::Capability::FindInSource;
+}
+
+Meta::Capability*
+Track::createCapabilityInterface( Meta::Capability::Type type )
+{
+    switch( type )
+    {
+        case Meta::Capability::Editable:
+            return new EditCapabilityImpl( this );
+
+        case Meta::Capability::Importable:
+            return new StatisticsCapabilityImpl( this );
+
+        case Meta::Capability::CurrentTrackActions:
+            {
+                QList< QAction * > actions;
+                QAction* flag = new BookmarkCurrentTrackPositionAction( 0 );
+                actions << flag;
+                debug() << "returning bookmarkcurrenttrack action";
+                return new Meta::CurrentTrackActionsCapability( actions );
+            }
+
+        case Meta::Capability::WriteTimecode:
+            return new TimecodeWriteCapabilityImpl( this );
+
+        case Meta::Capability::LoadTimecode:
+            return new TimecodeLoadCapabilityImpl( this );
+
+        case Meta::Capability::FindInSource:
+            return new FindInSourceCapabilityImpl( this );
+
+#if HAVE_LIBLASTFM
+       case Meta::Capability::ReadLabel:
+           if( !d->readLabelCapability )
+               d->readLabelCapability = new Meta::LastfmReadLabelCapability( this );
+#endif
+
+        default: // fall-through
+
+
+        return 0;
+    }
+}
+
+#include "File.moc"
diff --git a/src/core/meta/impl/file/File.h b/src/core/meta/impl/file/File.h
new file mode 100644
index 0000000..f94ea1d
--- /dev/null
+++ b/src/core/meta/impl/file/File.h
@@ -0,0 +1,117 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_META_FILE_H
+#define AMAROK_META_FILE_H
+
+#include "core/meta/Meta.h"
+
+
+namespace MetaFile
+{
+    class Track;
+
+    typedef KSharedPtr<Track> TrackPtr;
+
+    class AMAROK_EXPORT Track : public Meta::Track
+    {
+        public:
+            Track( const KUrl &url );
+            virtual ~Track();
+
+        //methods inherited from Meta::MetaBase
+            virtual QString name() const;
+            virtual QString prettyName() const;
+            virtual QString fullPrettyName() const;
+            virtual QString sortableName() const;
+
+        //methods inherited from Meta::Track
+            virtual KUrl playableUrl() const;
+            virtual QString prettyUrl() const;
+            virtual QString uidUrl() const;
+
+            virtual bool isPlayable() const;
+            virtual bool isEditable() const;
+
+            virtual Meta::AlbumPtr album() const;
+            virtual Meta::ArtistPtr artist() const;
+            virtual Meta::GenrePtr genre() const;
+            virtual Meta::ComposerPtr composer() const;
+            virtual Meta::YearPtr year() const;
+
+            virtual void setAlbum( const QString &newAlbum );
+            virtual void setArtist( const QString &newArtist );
+            virtual void setGenre( const QString &newGenre );
+            virtual void setComposer( const QString &newComposer );
+            virtual void setYear( const QString &newYear );
+
+            virtual void setTitle( const QString &newTitle );
+
+            virtual void setBpm( const float newBpm );
+            virtual float bpm() const;
+
+            virtual QString comment() const;
+            virtual void setComment( const QString &newComment );
+
+            virtual double score() const;
+            virtual void setScore( double newScore );
+
+            virtual int rating() const;
+            virtual void setRating( int newRating );
+
+            virtual int trackNumber() const;
+            virtual void setTrackNumber( int newTrackNumber );
+
+            virtual int discNumber() const;
+            virtual void setDiscNumber( int newDiscNumber );
+
+            virtual qint64 length() const;
+            virtual int filesize() const;
+            virtual int sampleRate() const;
+            virtual int bitrate() const;
+            virtual QDateTime createDate() const;
+            virtual uint lastPlayed() const;
+            virtual void setLastPlayed( uint newTime );
+            virtual uint firstPlayed() const;
+            virtual void setFirstPlayed( uint newTime );
+            virtual int playCount() const;
+            virtual void setPlayCount( int newCount );
+
+            virtual qreal replayGain( ReplayGainMode mode ) const;
+            virtual qreal replayPeakGain( ReplayGainMode mode ) const;
+
+            virtual QString type() const;
+
+            virtual void beginMetaDataUpdate();
+            virtual void endMetaDataUpdate();
+            virtual void abortMetaDataUpdate();
+
+            virtual void finishedPlaying( double playedFraction );
+
+            virtual bool inCollection() const;
+            virtual Amarok::Collection *collection() const;
+
+            virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
+            virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
+
+            class Private;
+
+        private:
+            Private * const d;
+    };
+}
+
+#endif
diff --git a/src/core/meta/impl/file/File_p.h b/src/core/meta/impl/file/File_p.h
new file mode 100644
index 0000000..b72a8cf
--- /dev/null
+++ b/src/core/meta/impl/file/File_p.h
@@ -0,0 +1,535 @@
+/****************************************************************************************
+ * Copyright (c) 2007-2009 Maximilian Kossick <maximilian.kossick at googlemail.com>       *
+ * Copyright (c) 2008 Peter ZHOU <peterzhoulei at gmail.com>                               *
+ * Copyright (c) 2008 Seb Ruiz <ruiz at kde.org>                                           *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_META_FILE_P_H
+#define AMAROK_META_FILE_P_H
+
+#include "amarokconfig.h"
+#include "Debug.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/meta/impl/file/TagLibUtils.h"
+#include "shared/MetaReplayGain.h"
+#include "core/statistics/StatisticsProvider.h"
+
+#include <QDateTime>
+#include <QFile>
+#include <QFileInfo>
+#include <QObject>
+#include <QPointer>
+#include <QSet>
+#include <QString>
+#include <QTextCodec>
+
+#include <KEncodingProber>
+#include <KLocale>
+
+// Taglib Includes
+#include <fileref.h>
+#include <tag.h>
+#include <flacfile.h>
+#include <id3v1tag.h>
+#include <id3v2tag.h>
+#include <mpcfile.h>
+#include <mpegfile.h>
+#include <oggfile.h>
+#include <oggflacfile.h>
+#include <tlist.h>
+#include <tstring.h>
+#include <vorbisfile.h>
+#include <mp4file.h>
+
+namespace Meta
+{
+    class LastfmReadLabelCapability;
+}
+
+namespace MetaFile
+{
+
+//d-pointer implementation
+
+struct MetaData
+{
+    MetaData()
+        : discNumber( 0 )
+        , trackNumber( 0 )
+        , length( 0 )
+        , fileSize( 0 )
+        , sampleRate( 0 )
+        , bitRate( 0 )
+        , year( 0 )
+        , bpm( 0.0 )
+        , trackGain( 0.0 )
+        , trackPeak( 0.0 )
+        , albumGain( 0.0 )
+        , albumPeak( 0.0 )
+    { }
+    QString title;
+    QString artist;
+    QString album;
+    QString comment;
+    QString composer;
+    QString genre;
+    QDateTime created;
+    int discNumber;
+    int trackNumber;
+    qint64 length;
+    int fileSize;
+    int sampleRate;
+    int bitRate;
+    int year;
+    float bpm;
+    qreal trackGain;
+    qreal trackPeak;
+    qreal albumGain;
+    qreal albumPeak;
+
+};
+
+class Track::Private : public QObject
+{
+public:
+    Private( Track *t )
+        : QObject()
+        , url()
+        , batchUpdate( false )
+        , album()
+        , artist()
+        , provider( 0 )
+        , track( t )
+    {}
+
+public:
+    KUrl url;
+    bool batchUpdate;
+    Meta::AlbumPtr album;
+    Meta::ArtistPtr artist;
+    Meta::GenrePtr genre;
+    Meta::ComposerPtr composer;
+    Meta::YearPtr year;
+    Meta::StatisticsProvider *provider;
+    QPointer<Meta::LastfmReadLabelCapability> readLabelCapability;
+
+    void readMetaData();
+    QVariantMap changes;
+
+    void writeMetaData() { DEBUG_BLOCK Meta::Field::writeFields( getFileRef(), changes ); changes.clear(); readMetaData(); }
+    MetaData m_data;
+
+private:
+    TagLib::FileRef getFileRef();
+    Track *track;
+};
+
+TagLib::FileRef
+Track::Private::getFileRef()
+{
+#ifdef COMPLEX_TAGLIB_FILENAME
+    const wchar_t * encodedName;
+    if(url.isLocalFile())
+    {
+        encodedName = reinterpret_cast<const wchar_t *>(url.toLocalFile().utf16());
+    }
+    else
+    {
+        encodedName = reinterpret_cast<const wchar_t *>(url.path().utf16());
+    }
+#else
+    QByteArray fileName;
+    if(url.isLocalFile())
+    {
+        fileName = QFile::encodeName( url.toLocalFile() );
+    }
+    else
+    {
+        fileName = QFile::encodeName( url.path() );
+    }
+    const char * encodedName = fileName.constData(); // valid as long as fileName exists
+#endif
+    return TagLib::FileRef( encodedName, true, TagLib::AudioProperties::Fast );
+}
+
+void Track::Private::readMetaData()
+{
+    QFileInfo fi( url.isLocalFile() ? url.toLocalFile() : url.path() );
+    m_data.created = fi.created();
+
+#define strip( x ) TStringToQString( x ).trimmed()
+    TagLib::FileRef fileRef = getFileRef();
+
+    TagLib::Tag *tag = 0;
+    if( !fileRef.isNull() )
+        tag = fileRef.tag();
+
+    if( tag )
+    {
+        m_data.title = strip( tag->title() );
+        m_data.artist = strip( tag->artist() );
+        m_data.album = strip( tag->album() );
+        m_data.comment = strip( tag->comment() );
+        m_data.genre = strip( tag->genre() );
+        m_data.trackNumber = tag->track();
+        m_data.year = tag->year();
+    }
+    if( !fileRef.isNull() )
+    {
+        if( fileRef.audioProperties() )
+        {
+            m_data.bitRate = fileRef.audioProperties()->bitrate();
+            m_data.sampleRate = fileRef.audioProperties()->sampleRate();
+            m_data.length = fileRef.audioProperties()->length() * 1000;
+        }
+
+        Meta::ReplayGainTagMap map = Meta::readReplayGainTags( fileRef );
+        if ( map.contains( Meta::ReplayGain_Track_Gain ) )
+            m_data.trackGain = map[Meta::ReplayGain_Track_Gain];
+        if ( map.contains( Meta::ReplayGain_Track_Peak ) )
+            m_data.trackPeak = map[Meta::ReplayGain_Track_Peak];
+        if ( map.contains( Meta::ReplayGain_Album_Gain ) )
+            m_data.albumGain = map[Meta::ReplayGain_Album_Gain];
+        else
+            m_data.albumGain = m_data.trackGain;
+        if ( map.contains( Meta::ReplayGain_Album_Peak ) )
+            m_data.albumPeak = map[Meta::ReplayGain_Album_Peak];
+        else
+            m_data.albumPeak = m_data.trackPeak;
+    }
+    //This is pretty messy...
+    QString disc;
+    m_data.bpm = -1.0;
+    if( TagLib::MPEG::File *file = dynamic_cast<TagLib::MPEG::File *>( fileRef.file() ) )
+    {
+        if( file->ID3v2Tag() )
+        {
+            const TagLib::ID3v2::FrameListMap flm = file->ID3v2Tag()->frameListMap();
+            if( !flm[ "TPOS" ].isEmpty() )
+                disc = strip( flm[ "TPOS" ].front()->toString() );
+
+            if( !flm[ "TCOM" ].isEmpty() )
+                m_data.composer = strip( flm[ "TCOM" ].front()->toString() );
+
+            if( !flm[ "TPE2" ].isEmpty() )
+                m_data.artist = strip( flm[ "TPE2" ].front()->toString() );
+
+            if( !flm[ "TBPM" ].isEmpty() )
+                m_data.bpm = TStringToQString( flm[ "TBPM" ].front()->toString() ).toFloat();
+
+
+
+        }
+        if( AmarokConfig::useCharsetDetector() && tag )
+        {
+            TagLib::String metaData = tag->title() + tag->artist() + tag->album() + tag->comment();
+            const char* buf = metaData.toCString();
+            size_t len = strlen( buf );
+            KEncodingProber prober;
+            KEncodingProber::ProberState result = prober.feed( buf, len );
+            QString track_encoding( prober.encoding() );
+            if ( result != KEncodingProber::NotMe )
+            {
+                /*  for further information please refer to:
+                    http://doc.trolltech.com/4.4/qtextcodec.html
+                    http://www.mozilla.org/projects/intl/chardet.html
+                */
+                if ( ( track_encoding.toUtf8() == "gb18030" ) || ( track_encoding.toUtf8() == "big5" )
+                    || ( track_encoding.toUtf8() == "euc-kr" ) || ( track_encoding.toUtf8() == "euc-jp" )
+                    || ( track_encoding.toUtf8() == "koi8-r" ) )
+                {
+                    debug () << "Final Codec Name:" << track_encoding.toUtf8();
+                    QTextCodec *codec = QTextCodec::codecForName( track_encoding.toUtf8() );
+                    QTextCodec* utf8codec = QTextCodec::codecForName( "UTF-8" );
+                    QTextCodec::setCodecForCStrings( utf8codec );
+                    if ( codec != 0 )
+                    {
+                        m_data.title = codec->toUnicode( m_data.title.toLatin1() );
+                        m_data.artist = codec->toUnicode( m_data.artist.toLatin1() );
+                        m_data.album = codec->toUnicode( m_data.album.toLatin1() );
+                        m_data.comment = codec->toUnicode( m_data.comment.toLatin1() );
+                        debug() << "track Info Decoded!";
+                    }
+                }
+                else
+                {
+                    debug() << "possible encoding: " << track_encoding.toUtf8();
+                    debug() << "encoding decoded as UTF-8";
+                }
+            }
+        }
+    }
+
+    else if( TagLib::Ogg::Vorbis::File *file = dynamic_cast< TagLib::Ogg::Vorbis::File *>( fileRef.file() ) )
+    {
+        if( file->tag() )
+        {
+            const TagLib::Ogg::FieldListMap flm = file->tag()->fieldListMap();
+            if( !flm[ "COMPOSER" ].isEmpty() )
+                m_data.composer = strip( flm[ "COMPOSER" ].front() );
+            if( !flm[ "DISCNUMBER" ].isEmpty() )
+                disc = strip( flm[ "DISCNUMBER" ].front() );
+            if( !flm[ "BPM" ].isEmpty() )
+                m_data.bpm = TStringToQString( flm[ "BPM" ].front() ).toFloat();
+        }
+    }
+
+    else if( TagLib::FLAC::File *file = dynamic_cast< TagLib::FLAC::File *>( fileRef.file() ) )
+    {
+        if( file->xiphComment() )
+        {
+            const TagLib::Ogg::FieldListMap flm = file->xiphComment()->fieldListMap();
+            if( !flm[ "COMPOSER" ].isEmpty() )
+                m_data.composer = strip( flm[ "COMPOSER" ].front() );
+            if( !flm[ "DISCNUMBER" ].isEmpty() )
+                disc = strip( flm[ "DISCNUMBER" ].front() );
+            if( !flm[ "BPM" ].isEmpty() )
+                m_data.bpm = TStringToQString( flm[ "BPM" ].front() ).toFloat();
+        }
+    }
+    else if( TagLib::MP4::File *file = dynamic_cast<TagLib::MP4::File *>( fileRef.file() ) )
+    {
+        TagLib::MP4::Tag *mp4tag = dynamic_cast< TagLib::MP4::Tag *>( file->tag() );
+        if( mp4tag )
+        {
+            if ( mp4tag->itemListMap().contains( "\xA9wrt" ) )
+                m_data.composer = strip( mp4tag->itemListMap()["\xA9wrt"].toStringList().front() );
+
+            if ( mp4tag->itemListMap().contains( "disk" ) )
+                disc = QString::number( mp4tag->itemListMap()["disk"].toIntPair().first );
+
+            if ( mp4tag->itemListMap().contains( "tmpo" ) )
+                m_data.bpm = mp4tag->itemListMap()["tmpo"].toIntPair().first;
+        }
+    }
+    if( !disc.isEmpty() )
+    {
+        int i = disc.indexOf( '/' );
+        if( i != -1 )
+            m_data.discNumber = disc.left( i ).toInt();
+        else
+            m_data.discNumber = disc.toInt();
+    }
+#undef strip
+    if(url.isLocalFile())
+    {
+        m_data.fileSize = QFile( url.toLocalFile() ).size();
+    }
+    else
+    {
+        m_data.fileSize = QFile( url.path() ).size();
+    }
+
+    //as a last ditch effort, use the filename as the title if nothing else has been found
+    if ( m_data.title.isEmpty() )
+    {
+        m_data.title = url.fileName();
+    }
+
+    debug() << "Read metadata from file for: " + m_data.title;
+}
+
+// internal helper classes
+
+class FileArtist : public Meta::Artist
+{
+public:
+    FileArtist( MetaFile::Track::Private *dptr )
+        : Meta::Artist()
+        , d( dptr )
+    {}
+
+    Meta::TrackList tracks()
+    {
+        return Meta::TrackList();
+    }
+
+    Meta::AlbumList albums()
+    {
+        return Meta::AlbumList();
+    }
+
+    QString name() const
+    {
+        const QString artist = d->m_data.artist;
+        return artist;
+    }
+
+    QString prettyName() const
+    {
+        return name();
+    }
+
+    bool operator==( const Meta::Artist &other ) const {
+        return name() == other.name();
+    }
+
+    QPointer<MetaFile::Track::Private> const d;
+};
+
+class FileAlbum : public Meta::Album
+{
+public:
+    FileAlbum( MetaFile::Track::Private *dptr )
+        : Meta::Album()
+        , d( dptr )
+    {}
+
+    bool isCompilation() const
+    {
+        return false;
+    }
+
+    bool hasAlbumArtist() const
+    {
+        return false;
+    }
+
+    Meta::ArtistPtr albumArtist() const
+    {
+        return Meta::ArtistPtr();
+    }
+
+    Meta::TrackList tracks()
+    {
+        return Meta::TrackList();
+    }
+
+    QString name() const
+    {
+        if( d )
+        {
+            const QString albumName = d->m_data.album;
+            return albumName;
+        }
+        else
+            return QString();
+    }
+
+    QString prettyName() const
+    {
+        return name();
+    }
+
+    QPixmap image( int size )
+    {
+        return Meta::Album::image( size );
+    }
+
+    bool operator==( const Meta::Album &other ) const {
+        return name() == other.name();
+    }
+
+    QPointer<MetaFile::Track::Private> const d;
+};
+
+class FileGenre : public Meta::Genre
+{
+public:
+    FileGenre( MetaFile::Track::Private *dptr )
+        : Meta::Genre()
+        , d( dptr )
+    {}
+
+    Meta::TrackList tracks()
+    {
+        return Meta::TrackList();
+    }
+
+    QString name() const
+    {
+        const QString genreName = d->m_data.genre;
+        return genreName;
+    }
+
+    QString prettyName() const
+    {
+        return name();
+    }
+
+    bool operator==( const Meta::Genre &other ) const {
+        return name() == other.name();
+    }
+
+    QPointer<MetaFile::Track::Private> const d;
+};
+
+class FileComposer : public Meta::Composer
+{
+public:
+    FileComposer( MetaFile::Track::Private *dptr )
+        : Meta::Composer()
+        , d( dptr )
+    {}
+
+    Meta::TrackList tracks()
+    {
+        return Meta::TrackList();
+    }
+
+    QString name() const
+    {
+        const QString composer = d->m_data.composer;
+        return composer;
+     }
+
+    QString prettyName() const
+    {
+        return name();
+    }
+
+    bool operator==( const Meta::Composer &other ) const {
+        return name() == other.name();
+    }
+
+    QPointer<MetaFile::Track::Private> const d;
+};
+
+class FileYear : public Meta::Year
+{
+public:
+    FileYear( MetaFile::Track::Private *dptr )
+        : Meta::Year()
+        , d( dptr )
+    {}
+
+    Meta::TrackList tracks()
+    {
+        return Meta::TrackList();
+    }
+
+    QString name() const
+    {
+        const QString year = QString::number( d->m_data.year );
+        return year;
+    }
+
+    QString prettyName() const
+    {
+        return name();
+    }
+
+    bool operator==( const Meta::Year &other ) const {
+        return name() == other.name();
+    }
+
+    QPointer<MetaFile::Track::Private> const d;
+};
+
+
+}
+
+#endif
diff --git a/src/core/meta/impl/file/TagLibUtils.cpp b/src/core/meta/impl/file/TagLibUtils.cpp
new file mode 100644
index 0000000..15b64a4
--- /dev/null
+++ b/src/core/meta/impl/file/TagLibUtils.cpp
@@ -0,0 +1,271 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "TagLibUtils.h"
+
+#include "core/meta/support/MetaConstants.h"
+
+#include <QFile>
+
+// Taglib
+#include <fileref.h>
+#include <tag.h>
+#include <tlist.h>
+#include <tmap.h>
+#include <tstring.h>
+#include <tstringlist.h>
+#include <flacfile.h>
+#include <id3v2tag.h>
+#include <mpegfile.h>
+#include <oggfile.h>
+#include <oggflacfile.h>
+#include <vorbisfile.h>
+#include <textidentificationframe.h>
+#include <xiphcomment.h>
+#include <mp4file.h>
+#include <mp4item.h>
+#include <mp4tag.h>
+#include <asftag.h>
+
+// Local version of taglib's QStringToTString macro. It is here, because taglib's one is
+// not Qt3Support clean (uses QString::utf8()). Once taglib will be clean of qt3support
+// it is safe to use QStringToTString again
+#define Qt4QStringToTString(s) TagLib::String(s.toUtf8().data(), TagLib::String::UTF8)
+
+void
+Meta::Field::writeFields( const QString &filename, const QVariantMap &changes )
+{
+    #ifdef COMPLEX_TAGLIB_FILENAME
+    const wchar_t* encodedName = reinterpret_cast<const wchar_t *>(filename.utf16());
+    #else
+    QByteArray fileName = QFile::encodeName( filename );
+    const char * encodedName = fileName.constData(); // valid as long as fileName exists
+    #endif
+
+    TagLib::FileRef f = TagLib::FileRef( encodedName, true, TagLib::AudioProperties::Fast );
+    return writeFields( f, changes );
+}
+
+void
+Meta::Field::writeFields( TagLib::FileRef fileref, const QVariantMap &changes )
+{
+    if( fileref.isNull() || changes.isEmpty() )
+        return;
+
+    TagLib::Tag *tag = fileref.tag();
+    if( !tag )
+        return;
+
+    // We should avoid rewriting files to disk if there haven't been any changes to the actual data tags
+    // This method could be called when there are only non-tag attributes to change, like score and rating
+    bool shouldSave = false;
+
+    if( changes.contains( Meta::Field::TITLE ) )
+    {
+        shouldSave = true;
+        const TagLib::String title = Qt4QStringToTString( changes.value( Meta::Field::TITLE ).toString() );
+        tag->setTitle( title );
+    }
+
+    if( changes.contains( Meta::Field::ALBUM ) )
+    {
+        shouldSave = true;
+        const TagLib::String album = Qt4QStringToTString( changes.value( Meta::Field::ALBUM ).toString() );
+        tag->setAlbum( album );
+    }
+
+    if( changes.contains( Meta::Field::ARTIST ) )
+    {
+        shouldSave = true;
+        const TagLib::String artist = Qt4QStringToTString( changes.value( Meta::Field::ARTIST ).toString() );
+        tag->setArtist( artist );
+    }
+
+    if( changes.contains( Meta::Field::COMMENT ) )
+    {
+        shouldSave = true;
+        const TagLib::String comment = Qt4QStringToTString( changes.value( Meta::Field::COMMENT ).toString() );
+        tag->setComment( comment );
+    }
+
+    if( changes.contains( Meta::Field::GENRE ) )
+    {
+        shouldSave = true;
+        const TagLib::String genre = Qt4QStringToTString( changes.value( Meta::Field::GENRE ).toString() );
+        tag->setGenre( genre );
+    }
+    if( changes.contains( Meta::Field::YEAR ) )
+    {
+        shouldSave = true;
+        const unsigned int year = changes.value( Meta::Field::YEAR ).toUInt();
+        tag->setYear( year );
+    }
+    if( changes.contains( Meta::Field::TRACKNUMBER ) )
+    {
+        shouldSave = true;
+        const unsigned int trackNumber = changes.value( Meta::Field::TRACKNUMBER ).toUInt();
+        tag->setTrack( trackNumber );
+    }
+    if ( TagLib::MPEG::File *file = dynamic_cast<TagLib::MPEG::File *>( fileref.file() ) )
+    {
+        if( changes.contains( Meta::Field::COMPOSER ) )
+        {
+            shouldSave = true;
+            if ( file->ID3v2Tag() )
+            {
+                file->ID3v2Tag()->removeFrames( "TCOM" );
+            }
+            QString composer = changes.value( Meta::Field::COMPOSER ).toString();
+            if ( !composer.isEmpty() )
+            {
+                TagLib::ID3v2::TextIdentificationFrame* frame =
+                        new TagLib::ID3v2::TextIdentificationFrame( "TCOM" );
+                frame->setText( Qt4QStringToTString( composer ) );
+                file->ID3v2Tag(true)->addFrame( frame );
+            }
+        }
+        if( changes.contains( Meta::Field::DISCNUMBER ) )
+        {
+            shouldSave = true;
+            if( file->ID3v2Tag() )
+                file->ID3v2Tag()->removeFrames( "TPOS" );
+            const QString discNumber = changes.value( Meta::Field::DISCNUMBER ).toString();
+            if( !discNumber.isEmpty() )
+            {
+                TagLib::ID3v2::TextIdentificationFrame *frame =
+                        new TagLib::ID3v2::TextIdentificationFrame( "TPOS" );
+                frame->setText( Qt4QStringToTString( discNumber ) );
+                file->ID3v2Tag(true)->addFrame( frame );
+            }
+        }
+        if( changes.contains( Meta::Field::BPM ) )
+        {
+            shouldSave = true;
+            if( file->ID3v2Tag() )
+                file->ID3v2Tag()->removeFrames( "TBPM" );
+            if (changes.value( Meta::Field::BPM ).toDouble() > 0) {
+                const QString bpm = changes.value( Meta::Field::BPM ).toString();
+                TagLib::ID3v2::TextIdentificationFrame *frame =
+                        new TagLib::ID3v2::TextIdentificationFrame( "TBPM" );
+                frame->setText( Qt4QStringToTString( bpm ) );
+                file->ID3v2Tag(true)->addFrame( frame );
+            }
+        }
+    }
+    else if ( TagLib::Ogg::Vorbis::File *file = dynamic_cast<TagLib::Ogg::Vorbis::File *>( fileref.file() ) )
+    {
+        if( changes.contains( Meta::Field::COMPOSER ) )
+        {
+            shouldSave = true;
+            const TagLib::String composer = Qt4QStringToTString( changes.value( Meta::Field::COMPOSER ).toString() );
+            file->tag()->addField("COMPOSER", composer);
+        }
+        if( changes.contains( Meta::Field::DISCNUMBER ) )
+        {
+            shouldSave = true;
+            const TagLib::String disc = Qt4QStringToTString( changes.value( Meta::Field::DISCNUMBER ).toString() );
+            file->tag()->addField("DISCNUMBER", disc);
+        }
+        if( changes.contains( Meta::Field::BPM ) )
+        {
+            shouldSave = true;
+            if (changes.value( Meta::Field::BPM ).toDouble() > 0) {
+                const TagLib::String bpm = Qt4QStringToTString( changes.value( Meta::Field::BPM ).toString() );
+                file->tag()->addField("BPM", bpm);
+            } else {
+                file->tag()->removeField("BPM");
+            }
+        }
+    }
+    else if ( TagLib::Ogg::FLAC::File *file = dynamic_cast<TagLib::Ogg::FLAC::File *>( fileref.file() ) )
+    {
+        if( changes.contains( Meta::Field::COMPOSER ) )
+        {
+            shouldSave = true;
+            const TagLib::String composer = Qt4QStringToTString( changes.value( Meta::Field::COMPOSER ).toString() );
+            file->tag()->addField("COMPOSER", composer);
+        }
+        if( changes.contains( Meta::Field::DISCNUMBER ) )
+        {
+            shouldSave = true;
+            const TagLib::String disc = Qt4QStringToTString( changes.value( Meta::Field::DISCNUMBER ).toString() );
+            file->tag()->addField("DISCNUMBER", disc);
+        }
+        if( changes.contains( Meta::Field::BPM ) )
+        {
+            shouldSave = true;
+            if (changes.value( Meta::Field::BPM ).toDouble() > 0) {
+                const TagLib::String bpm = Qt4QStringToTString( changes.value( Meta::Field::BPM ).toString() );
+                file->tag()->addField("BPM", bpm);
+            } else {
+                file->tag()->removeField("BPM");
+            }
+        }
+    }
+    else if ( TagLib::FLAC::File *file = dynamic_cast<TagLib::FLAC::File *>( fileref.file() ) )
+    {
+        if( changes.contains( Meta::Field::COMPOSER ) )
+        {
+            shouldSave = true;
+            const TagLib::String composer = Qt4QStringToTString( changes.value( Meta::Field::COMPOSER ).toString() );
+            file->xiphComment()->addField("COMPOSER", composer);
+        }
+        if( changes.contains( Meta::Field::DISCNUMBER ) )
+        {
+            shouldSave = true;
+            const TagLib::String disc = Qt4QStringToTString( changes.value( Meta::Field::DISCNUMBER ).toString() );
+            file->xiphComment()->addField("DISCNUMBER", disc);
+        }
+        if( changes.contains( Meta::Field::BPM ) )
+        {
+            shouldSave = true;
+            if (changes.value( Meta::Field::BPM ).toDouble() > 0) {
+                const TagLib::String bpm = Qt4QStringToTString( changes.value( Meta::Field::BPM ).toString() );
+                file->xiphComment()->addField("BPM", bpm);
+            } else {
+                file->xiphComment()->removeField("BPM");
+            }
+        }
+    }
+    else if ( TagLib::MP4::File *file = dynamic_cast<TagLib::MP4::File *>( fileref.file() ) )
+    {
+        if( changes.contains( Meta::Field::COMPOSER ) )
+        {
+            shouldSave = true;
+            TagLib::MP4::Tag *mp4tag = dynamic_cast<TagLib::MP4::Tag *>( file->tag() );
+            const TagLib::String composer = Qt4QStringToTString( changes.value( Meta::Field::COMPOSER ).toString() );
+            mp4tag->itemListMap()["\xa9wrt"] = TagLib::StringList( composer );
+        }
+        if( changes.contains( Meta::Field::DISCNUMBER ) )
+        {
+            shouldSave = true;
+            TagLib::MP4::Tag *mp4tag = dynamic_cast<TagLib::MP4::Tag *>( file->tag() );
+            int discnumber = changes.value( Meta::Field::DISCNUMBER ).toInt();
+            mp4tag->itemListMap()["disk"] = TagLib::MP4::Item( discnumber, 0 );
+        }
+        if( changes.contains( Meta::Field::BPM ) )
+        {
+            shouldSave = true;
+            TagLib::MP4::Tag *mp4tag = dynamic_cast<TagLib::MP4::Tag *>( file->tag() );
+            int bpm = changes.value( Meta::Field::BPM ).toInt();
+            mp4tag->itemListMap()["bpm"] = TagLib::MP4::Item( bpm, 0 );
+        }
+    }
+    if( shouldSave )
+        fileref.save();
+}
+
+#undef Qt4QStringToTString
diff --git a/src/core/meta/impl/file/TagLibUtils.h b/src/core/meta/impl/file/TagLibUtils.h
new file mode 100644
index 0000000..96e1a60
--- /dev/null
+++ b/src/core/meta/impl/file/TagLibUtils.h
@@ -0,0 +1,41 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef TAGLIBUTILS_H
+#define TAGLIBUTILS_H
+
+#include "amarok_export.h"
+#include "core/meta/Meta.h"
+
+#include <QMap>
+#include <QString>
+#include <QVariant>
+
+namespace TagLib
+{
+    class FileRef;
+}
+
+namespace Meta
+{
+    namespace Field
+    {
+        AMAROK_EXPORT void writeFields( const QString &filename, const QVariantMap &changes );
+        AMAROK_EXPORT void writeFields( TagLib::FileRef fileref, const QVariantMap &changes );
+    }
+}
+
+#endif // TAGLIBUTILS_H
diff --git a/src/core/meta/impl/multi/MultiSourceCapabilityImpl.cpp b/src/core/meta/impl/multi/MultiSourceCapabilityImpl.cpp
new file mode 100644
index 0000000..940a163
--- /dev/null
+++ b/src/core/meta/impl/multi/MultiSourceCapabilityImpl.cpp
@@ -0,0 +1,38 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "MultiSourceCapabilityImpl.h"
+
+
+MultiSourceCapabilityImpl::MultiSourceCapabilityImpl(Meta::MultiTrack * track)
+    : Meta::MultiSourceCapability()
+    , m_track( track )
+{
+    //forward from track, as there might  be several instances of MultiSourceCapabilityImpl active for one track.
+    connect( m_track, SIGNAL( urlChanged( const KUrl &) ), this, SIGNAL( urlChanged( const KUrl &) ) );
+}
+
+void MultiSourceCapabilityImpl::setSource( int source )
+{
+    DEBUG_BLOCK
+    m_track->setSource( source );
+    const KUrl url = m_track->playableUrl();
+
+}
+
+
+
+#include "MultiSourceCapabilityImpl.moc"
diff --git a/src/core/meta/impl/multi/MultiSourceCapabilityImpl.h b/src/core/meta/impl/multi/MultiSourceCapabilityImpl.h
new file mode 100644
index 0000000..a5a7b94
--- /dev/null
+++ b/src/core/meta/impl/multi/MultiSourceCapabilityImpl.h
@@ -0,0 +1,47 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+
+#ifndef AMAROK_MULTISOURCECAPABILITYIMPL_P_H
+#define AMAROK_MULTISOURCECAPABILITYIMPL_P_H
+
+#include "core/capabilities/MultiSourceCapability.h"
+
+#include "Debug.h"
+#include "MultiTrack.h"
+
+
+class MultiSourceCapabilityImpl : public Meta::MultiSourceCapability
+{
+    Q_OBJECT
+public:
+    MultiSourceCapabilityImpl( Meta::MultiTrack * track );
+
+
+    virtual KUrl first() { return m_track->first(); }
+    virtual KUrl next() { return m_track->next(); }
+    virtual int current() { return m_track->current(); }
+    virtual QStringList sources() { return m_track->sources(); }
+    virtual void setSource( int source );
+
+private:
+    Meta::MultiTrack * m_track;
+
+};
+
+#endif
+
+
diff --git a/src/core/meta/impl/multi/MultiTrack.cpp b/src/core/meta/impl/multi/MultiTrack.cpp
new file mode 100644
index 0000000..9239086
--- /dev/null
+++ b/src/core/meta/impl/multi/MultiTrack.cpp
@@ -0,0 +1,132 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "MultiTrack.h"
+
+#include "Debug.h"
+#include "MultiSourceCapabilityImpl.h"
+
+namespace Meta {
+
+MultiTrack::MultiTrack( PlaylistPtr playlist )
+    : QObject()
+    , Track()
+    , m_playlist( playlist )
+    , m_index( 0 )
+{
+    DEBUG_BLOCK
+    debug() << "playlist size: " << m_playlist->tracks().count();
+    setSource( 0 );
+}
+
+
+MultiTrack::~MultiTrack()
+{
+}
+
+void Meta::MultiTrack::setSource( int source )
+{
+    if( source >= m_playlist->tracks().count() ) // avaid crash by doing nothing
+        return;
+
+    if( m_currentTrack )
+        unsubscribeFrom( m_currentTrack );
+
+    m_index = source;
+    m_currentTrack = m_playlist->tracks()[ m_index ];
+    subscribeTo( m_currentTrack );
+
+    notifyObservers();
+    emit urlChanged( playableUrl() );
+}
+
+
+KUrl Meta::MultiTrack::first()
+{
+    if( m_currentTrack )
+        unsubscribeFrom( m_currentTrack );
+    
+    m_index = 0;
+    if ( m_playlist->tracks().count() > m_index ) {
+        m_currentTrack = m_playlist->tracks()[ m_index ];
+        subscribeTo( m_currentTrack );
+        return m_currentTrack->playableUrl();
+    }
+
+    return KUrl();
+}
+
+KUrl Meta::MultiTrack::next()
+{
+    if( m_currentTrack )
+        unsubscribeFrom( m_currentTrack );
+    
+    m_index++;
+    
+    if ( m_playlist->tracks().count() > m_index ){
+        m_currentTrack = m_playlist->tracks()[ m_index ];
+        subscribeTo( m_currentTrack );
+        return m_currentTrack->playableUrl();
+    }
+
+    return KUrl();
+}
+
+
+int Meta::MultiTrack::current()
+{
+    return m_index;
+}
+
+QStringList Meta::MultiTrack::sources()
+{
+    QStringList trackNames;
+    foreach ( TrackPtr track, m_playlist->tracks() )
+    {
+        trackNames << track->prettyUrl();
+    }
+
+    return trackNames;
+}
+
+bool Meta::MultiTrack::hasCapabilityInterface(Meta::Capability::Type type) const
+{
+    return type == Meta::Capability::MultiSource;
+}
+
+Meta::Capability * Meta::MultiTrack::createCapabilityInterface(Meta::Capability::Type type)
+{
+    switch( type )
+    {
+        case Meta::Capability::MultiSource:
+            return new MultiSourceCapabilityImpl( this );
+        default:
+            return 0;
+    }
+}
+
+}
+
+void Meta::MultiTrack::metadataChanged( Meta::TrackPtr track )
+{
+    Q_UNUSED( track )
+    //forward changes from active tracks
+    notifyObservers();
+}
+
+
+#include "MultiTrack.moc"
+
diff --git a/src/core/meta/impl/multi/MultiTrack.h b/src/core/meta/impl/multi/MultiTrack.h
new file mode 100644
index 0000000..84de73c
--- /dev/null
+++ b/src/core/meta/impl/multi/MultiTrack.h
@@ -0,0 +1,99 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef METAMULTITRACK_H
+#define METAMULTITRACK_H
+
+#include "core/meta/Meta.h"
+#include "core/playlists/Playlist.h"
+#include "core/capabilities/MultiSourceCapability.h"
+
+namespace Meta {
+
+/**
+A track that wraps a playlist. This is useful, for instance, for adding radio streams with multiple fallback streams to the playlist as a single item
+
+    @author Nikolaj Hald Nielsen <nhn at kde.org>
+*/
+
+class MultiTrack : public QObject, public Track, public Meta::Observer
+{
+    Q_OBJECT
+public:
+    MultiTrack( PlaylistPtr playlist );
+    ~MultiTrack();
+
+    KUrl first();
+    KUrl next();
+
+    int current();
+    QStringList sources();
+    void setSource( int source );
+
+    virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
+    virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
+
+
+    //forward lots of stuff:
+
+    //TODO: sanity checks on m_currentTrack
+    virtual QString name() const { return m_currentTrack->name(); }
+    virtual QString prettyName() const { return m_currentTrack->prettyName(); }
+    virtual KUrl playableUrl() const { return m_currentTrack->playableUrl(); }
+    virtual QString prettyUrl() const { return m_currentTrack->prettyUrl(); }
+    virtual QString uidUrl() const { return m_currentTrack->uidUrl(); }
+
+    virtual AlbumPtr album() const { return m_currentTrack->album(); }
+    virtual ArtistPtr artist() const { return m_currentTrack->artist(); }
+    virtual ComposerPtr composer() const { return m_currentTrack->composer(); }
+    virtual GenrePtr genre() const { return m_currentTrack->genre(); }
+    virtual YearPtr year() const { return m_currentTrack->year(); }
+
+    virtual float bpm() const { return m_currentTrack->bpm(); }
+    virtual QString comment() const { return m_currentTrack->comment(); }
+    virtual double score() const { return m_currentTrack->score(); }
+    virtual void setScore( double newScore ) { m_currentTrack->setScore( newScore ); }
+    virtual int rating() const { return m_currentTrack->rating(); }
+    virtual void setRating( int newRating ) { m_currentTrack->setRating( newRating ); }
+    virtual qint64 length() const { return m_currentTrack->length(); }
+    virtual int filesize() const { return m_currentTrack->filesize(); }
+    virtual int sampleRate() const { return m_currentTrack->sampleRate(); }
+    virtual int bitrate() const { return m_currentTrack->bitrate(); }
+    virtual int trackNumber() const { return m_currentTrack->trackNumber(); }
+    virtual int discNumber() const { return m_currentTrack->discNumber(); }
+    virtual uint lastPlayed() const { return m_currentTrack->lastPlayed(); }
+    virtual int playCount() const { return m_currentTrack->playCount(); }
+
+    virtual bool isPlayable() const { return m_currentTrack->isPlayable(); }
+    virtual QString type() const { return m_currentTrack->type(); }
+
+    using Observer::metadataChanged;
+    virtual void metadataChanged( Meta::TrackPtr track );
+
+
+signals:
+    void urlChanged( const KUrl &url );
+
+private:
+    PlaylistPtr m_playlist;
+    TrackPtr m_currentTrack;
+    int m_index;
+
+};
+
+}
+
+#endif
diff --git a/src/core/meta/impl/proxy/MetaProxy.cpp b/src/core/meta/impl/proxy/MetaProxy.cpp
new file mode 100644
index 0000000..f85705e
--- /dev/null
+++ b/src/core/meta/impl/proxy/MetaProxy.cpp
@@ -0,0 +1,488 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "MetaProxy.h"
+#include "MetaProxy_p.h"
+#include "MetaProxy_p.moc"
+
+#include "core/capabilities/EditCapability.h"
+
+#include "CollectionManager.h"
+
+#include <QDateTime>
+#include <QObject>
+#include <QPointer>
+#include <QTimer>
+
+#include <KSharedPtr>
+
+using namespace MetaProxy;
+
+class ProxyArtist;
+class ProxyFmAlbum;
+class ProxyGenre;
+class ProxyComposer;
+class ProxyYear;
+
+class EditCapabilityProxy : public Meta::EditCapability
+{
+    public:
+        EditCapabilityProxy( MetaProxy::Track *track )
+            : Meta::EditCapability()
+            , m_track( track ) {}
+
+        virtual bool isEditable() const { return true; }
+        virtual void setTitle( const QString &title ) { m_track->setName( title ); }
+        virtual void setAlbum( const QString &newAlbum ) { m_track->setAlbum( newAlbum ); }
+        virtual void setArtist( const QString &newArtist ) { m_track->setArtist( newArtist ); }
+        virtual void setComposer( const QString &newComposer ) { m_track->setComposer( newComposer ); }
+        virtual void setGenre( const QString &newGenre ) { m_track->setGenre( newGenre ); }
+        virtual void setYear( const QString &newYear ) { m_track->setYear( newYear ); }
+        virtual void setBpm( const float newBpm ) { m_track->setBpm( newBpm ); }
+        virtual void setComment( const QString &newComment ) { Q_UNUSED( newComment ); /*m_track->setComment( newComment );*/ } // Do we want to support this?
+        virtual void setTrackNumber( int newTrackNumber ) { m_track->setTrackNumber( newTrackNumber ); }
+        virtual void setDiscNumber( int newDiscNumber ) { m_track->setDiscNumber( newDiscNumber ); }
+
+        virtual void beginMetaDataUpdate() {}  // Nothing to do, we cache everything
+        virtual void endMetaDataUpdate() {}
+        virtual void abortMetaDataUpdate() {}
+
+    private:
+        KSharedPtr<MetaProxy::Track> m_track;
+};
+
+MetaProxy::Track::Track( const KUrl &url )
+:Meta::Track()
+,d( new Private() )
+{
+	init( url, false );
+}
+
+MetaProxy::Track::Track( const KUrl &url, bool awaitLookupNotification )
+	:Meta::Track()
+	,d( new Private() )
+{
+	init( url, awaitLookupNotification );
+}
+
+void
+MetaProxy::Track::init( const KUrl &url, bool awaitLookupNotification )
+{
+	d->url = url;
+    d->proxy = this;
+    d->cachedLength = 0;
+
+	if( !awaitLookupNotification )
+		QObject::connect( CollectionManager::instance(), SIGNAL( trackProviderAdded( TrackProvider* ) ), d, SLOT( slotNewTrackProvider( TrackProvider* ) ) );
+
+    d->albumPtr = Meta::AlbumPtr( new ProxyAlbum( QPointer<Track::Private>( d ) ) );
+    d->artistPtr = Meta::ArtistPtr( new ProxyArtist( QPointer<Track::Private>( d ) ) );
+    d->genrePtr = Meta::GenrePtr( new ProxyGenre( QPointer<Track::Private>( d ) ) );
+    d->composerPtr = Meta::ComposerPtr( new ProxyComposer( QPointer<Track::Private>( d ) ) );
+    d->yearPtr = Meta::YearPtr( new ProxyYear( QPointer<Track::Private>( d ) ) );
+
+	if( !awaitLookupNotification )
+		QTimer::singleShot( 0, d, SLOT( slotCheckCollectionManager() ) );
+}
+
+MetaProxy::Track::~Track()
+{
+    delete d;
+}
+
+QString
+MetaProxy::Track::name() const
+{
+    if( d->realTrack ) {
+        QString name = d->realTrack->name();
+        return name;
+    }
+    return d->cachedName;
+}
+
+void
+MetaProxy::Track::setName( const QString &name )
+{
+    d->cachedName = name;
+}
+
+QString
+MetaProxy::Track::prettyName() const
+{
+    if( d->realTrack ) {
+        QString prettyName = d->realTrack->prettyName();
+        return prettyName;
+    }
+    return d->cachedName;   //TODO maybe change this?
+}
+
+QString
+MetaProxy::Track::fullPrettyName() const
+{
+    if( d->realTrack ) {
+        QString fullPrettyName = d->realTrack->fullPrettyName();
+        return fullPrettyName;
+    }
+    return d->cachedName;   //TODO maybe change this??
+}
+
+QString
+MetaProxy::Track::sortableName() const
+{
+    if( d->realTrack ) {
+        QString sortableName = d->realTrack->sortableName();
+        return sortableName;
+    }
+    return d->cachedName;   //TODO maybe change this??
+}
+
+KUrl
+MetaProxy::Track::playableUrl() const
+{
+    if( d->realTrack ) {
+        KUrl playableUrl = d->realTrack->playableUrl();
+        return playableUrl;
+    }
+    //return KUrl();
+    return d->url; // Maybe?
+}
+
+QString
+MetaProxy::Track::prettyUrl() const
+{
+    if( d->realTrack ) {
+        QString prettyUrl = d->realTrack->prettyUrl();
+        return prettyUrl;
+    }
+    return d->url.url();
+}
+
+QString
+MetaProxy::Track::uidUrl() const
+{
+    if( d->realTrack ) {
+        QString uidUrl = d->realTrack->uidUrl();
+        return uidUrl;
+    }
+    return d->url.url();
+}
+
+bool
+MetaProxy::Track::isPlayable() const
+{
+    if( d->realTrack ) {
+        bool isPlayable = d->realTrack->isPlayable();
+        return isPlayable;
+    }
+    return false;
+}
+
+Meta::AlbumPtr
+MetaProxy::Track::album() const
+{
+    return d->albumPtr;
+}
+
+void
+MetaProxy::Track::setAlbum( const QString &album )
+{
+    d->cachedAlbum = album;
+}
+
+Meta::ArtistPtr
+MetaProxy::Track::artist() const
+{
+    return d->artistPtr;
+}
+
+void
+MetaProxy::Track::setArtist( const QString &artist )
+{
+    d->cachedArtist = artist;
+}
+
+Meta::GenrePtr
+MetaProxy::Track::genre() const
+{
+    return d->genrePtr;
+}
+
+void
+MetaProxy::Track::setGenre( const QString &genre )
+{
+    d->cachedGenre = genre;
+}
+
+Meta::ComposerPtr
+MetaProxy::Track::composer() const
+{
+    return d->composerPtr;
+}
+
+void
+MetaProxy::Track::setComposer( const QString &composer )
+{
+    d->cachedComposer = composer;
+}
+Meta::YearPtr
+MetaProxy::Track::year() const
+{
+    return d->yearPtr;
+}
+
+void
+MetaProxy::Track::setYear( const QString &year )
+{
+    d->cachedYear = year;
+}
+
+float
+MetaProxy::Track::bpm() const
+{
+    if( d->realTrack )
+        return d->realTrack->bpm();
+    else
+        return d->cachedBpm;
+}
+
+void
+MetaProxy::Track::setBpm( const float bpm )
+{
+    d->cachedBpm = bpm;
+}
+
+QString
+MetaProxy::Track::comment() const
+{
+    if( d->realTrack )
+        return d->realTrack->comment();
+    else
+        return QString();       //do we cache the comment??
+}
+
+double
+MetaProxy::Track::score() const
+{
+    if( d->realTrack )
+        return d->realTrack->score();
+    return 0.0;     //do we cache the score
+}
+
+void
+MetaProxy::Track::setScore( double newScore )
+{
+    if( d->realTrack )
+        d->realTrack->setScore( newScore );
+}
+
+int
+MetaProxy::Track::rating() const
+{
+    if( d->realTrack )
+        return d->realTrack->rating();
+    return 0;
+}
+
+void
+MetaProxy::Track::setRating( int newRating )
+{
+    if( d->realTrack )
+        d->realTrack->setRating( newRating );
+}
+
+int
+MetaProxy::Track::trackNumber() const
+{
+    if( d->realTrack )
+        return d->realTrack->trackNumber();
+    return d->cachedTrackNumber;
+}
+
+void
+MetaProxy::Track::setTrackNumber( int number )
+{
+    d->cachedTrackNumber = number;
+}
+
+int
+MetaProxy::Track::discNumber() const
+{
+    if( d->realTrack )
+        return d->realTrack->discNumber();
+    return d->cachedDiscNumber;
+}
+
+void
+MetaProxy::Track::setDiscNumber( int discNumber )
+{
+    d->cachedDiscNumber = discNumber;
+}
+
+qint64
+MetaProxy::Track::length() const
+{
+    if( d->realTrack )
+        return d->realTrack->length();
+    return d->cachedLength;
+}
+
+int
+MetaProxy::Track::filesize() const
+{
+    if( d->realTrack )
+        return d->realTrack->filesize();
+    return 0;
+}
+
+int
+MetaProxy::Track::sampleRate() const
+{
+    if( d->realTrack )
+        return d->realTrack->sampleRate();
+    return 0;
+}
+
+int
+MetaProxy::Track::bitrate() const
+{
+    if( d->realTrack )
+        return d->realTrack->bitrate();
+    return 0;
+}
+
+QDateTime
+MetaProxy::Track::createDate() const
+{
+    if( d->realTrack )
+        return d->realTrack->createDate();
+    return QDateTime();
+}
+
+uint
+MetaProxy::Track::firstPlayed() const
+{
+    if( d->realTrack )
+        return d->realTrack->firstPlayed();
+    return 0;
+}
+
+uint
+MetaProxy::Track::lastPlayed() const
+{
+    if( d->realTrack )
+        return d->realTrack->lastPlayed();
+    return 0;
+}
+
+int
+MetaProxy::Track::playCount() const
+{
+    if( d->realTrack )
+        return d->realTrack->playCount();
+    return 0;
+}
+
+QString
+MetaProxy::Track::type() const
+{
+    if( d->realTrack )
+        return d->realTrack->type();
+    return QString();       //TODO cache type??
+}
+
+void
+MetaProxy::Track::finishedPlaying( double playedFraction )
+{
+    if( d->realTrack )
+        d->realTrack->finishedPlaying( playedFraction );
+}
+
+bool
+MetaProxy::Track::inCollection() const
+{
+    if( d->realTrack )
+        return d->realTrack->inCollection();
+    return false;
+}
+
+Amarok::Collection*
+MetaProxy::Track::collection() const
+{
+    if( d->realTrack )
+        return d->realTrack->collection();
+    else
+        return 0;
+}
+
+void
+MetaProxy::Track::subscribe( Meta::Observer *observer )
+{
+    if( observer && !d->observers.contains( observer ) )
+        d->observers.append( observer );
+}
+
+void
+MetaProxy::Track::unsubscribe( Meta::Observer *observer )
+{
+    if( observer )
+        d->observers.removeAll( observer );
+}
+
+void
+MetaProxy::Track::lookupTrack( Amarok::TrackProvider *provider )
+{
+	d->slotNewTrackProvider( provider );
+}
+
+void
+MetaProxy::Track::updateTrack( Meta::TrackPtr track )
+{
+    d->slotUpdateTrack( track );
+}
+
+bool
+MetaProxy::Track::hasCapabilityInterface( Meta::Capability::Type type ) const
+{
+    if( d->realTrack )
+        return d->realTrack->hasCapabilityInterface( type );
+    else
+        if( type == Meta::Capability::Editable )
+            return true;
+    return false;
+}
+
+Meta::Capability*
+MetaProxy::Track::createCapabilityInterface( Meta::Capability::Type type )
+{
+    if( d->realTrack )
+        return d->realTrack->createCapabilityInterface( type );
+    else
+        if( type == Meta::Capability::Editable )
+            return new EditCapabilityProxy( this );
+    return 0;
+}
+
+bool
+MetaProxy::Track::operator==( const Meta::Track &track ) const
+{
+    const MetaProxy::Track *proxy = dynamic_cast<const MetaProxy::Track*>( &track );
+    if( proxy && d->realTrack )
+        return d->realTrack == proxy->d->realTrack;
+    else if( proxy )
+        return d->url == proxy->d->url;
+
+    return d->realTrack && d->realTrack.data() == &track;
+}
diff --git a/src/core/meta/impl/proxy/MetaProxy.h b/src/core/meta/impl/proxy/MetaProxy.h
new file mode 100644
index 0000000..4fee57a
--- /dev/null
+++ b/src/core/meta/impl/proxy/MetaProxy.h
@@ -0,0 +1,130 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_METAPROXY_H
+#define AMAROK_METAPROXY_H
+
+#include "core/meta/Meta.h"
+#include "core/capabilities/Capability.h"
+
+#include <QObject>
+
+namespace Amarok
+{
+    class TrackProvider;
+}
+
+namespace MetaProxy
+{
+    class Track;
+    typedef KSharedPtr<Track> TrackPtr;
+    class AMAROK_EXPORT Track : public Meta::Track
+    {
+        public:
+            class Private;
+
+            Track( const KUrl &url );
+            virtual ~Track();
+
+        //methods inherited from Meta::MetaBase
+            virtual QString name() const;
+            virtual void setName( const QString &name );
+            virtual QString prettyName() const;
+            virtual QString fullPrettyName() const;
+            virtual QString sortableName() const;
+
+        //methods inherited from Meta::Track
+            virtual KUrl playableUrl() const;
+            virtual QString prettyUrl() const;
+            virtual QString uidUrl() const;
+
+            virtual bool isPlayable() const;
+
+            virtual Meta::AlbumPtr album() const;
+            virtual void setAlbum( const QString &album );
+            virtual Meta::ArtistPtr artist() const;
+            virtual void setArtist( const QString &artist );
+            virtual Meta::GenrePtr genre() const;
+            virtual void setGenre( const QString &genre );
+            virtual Meta::ComposerPtr composer() const;
+            virtual void setComposer( const QString &composer );
+            virtual Meta::YearPtr year() const;
+            virtual void setYear( const QString &year );
+
+            virtual float bpm() const;
+            virtual void setBpm( const float bpm );
+
+            virtual QString comment() const;
+
+            virtual double score() const;
+            virtual void setScore( double newScore );
+
+            virtual int rating() const;
+            virtual void setRating( int newRating );
+
+            virtual int trackNumber() const;
+            virtual void setTrackNumber( int number );
+            virtual int discNumber() const;
+            virtual void setDiscNumber( int discNumber );
+
+            virtual qint64 length() const;
+            virtual int filesize() const;
+            virtual int sampleRate() const;
+            virtual int bitrate() const;
+            virtual QDateTime createDate() const;
+
+            virtual uint firstPlayed() const;
+            virtual uint lastPlayed() const;
+            virtual int playCount() const;
+
+            virtual QString type() const;
+
+            virtual void finishedPlaying( double playedFraction );
+
+            virtual bool inCollection() const;
+            virtual Amarok::Collection *collection() const;
+
+            virtual void subscribe( Meta::Observer *observer );
+            virtual void unsubscribe( Meta::Observer *observer );
+
+            virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
+            virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
+
+            virtual bool operator==( const Meta::Track &track ) const;
+
+		/**
+		 * allows subclasses to create an instance of trackprovider which will only check the TrackProvider
+		 * passed to lookupTrack(TrackProvider*) for the real track.
+		 */
+		Track( const KUrl &url, bool awaitLookupNotification);
+		/**
+		 * MetaProxy will check the given trackprovider if it can provide the track for the proxy's url.
+		 */
+		void lookupTrack(Amarok::TrackProvider *provider);
+
+        /**
+         * MetaProxy will update the proxy with the track.
+         */
+        void updateTrack( Meta::TrackPtr track );
+
+        private:
+			void init( const KUrl &url, bool awaitLookupNotification );
+            Private * const d;
+    };
+
+}
+
+#endif
diff --git a/src/core/meta/impl/proxy/MetaProxy_p.h b/src/core/meta/impl/proxy/MetaProxy_p.h
new file mode 100644
index 0000000..d01be6d
--- /dev/null
+++ b/src/core/meta/impl/proxy/MetaProxy_p.h
@@ -0,0 +1,427 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_METAPROXY_P_H
+#define AMAROK_METAPROXY_P_H
+
+#include "Amarok.h"
+#include "amarokconfig.h"
+#include "Collection.h"
+#include "CollectionManager.h"
+#include "core/meta/Meta.h"
+
+#include <QImage>
+#include <QList>
+#include <QObject>
+#include <QPixmap>
+#include <QStringList>
+
+#include <kio/job.h>
+#include <kio/jobclasses.h>
+
+
+using namespace MetaProxy;
+
+class MetaProxy::Track::Private : public QObject, public Meta::Observer
+{
+    Q_OBJECT
+
+    public:
+        Track *proxy;
+        KUrl url;
+
+        Meta::TrackPtr realTrack;
+
+        QList<Meta::Observer*> observers;
+
+        QString cachedArtist;
+        QString cachedAlbum;
+        QString cachedName;
+        QString cachedGenre;
+        QString cachedComposer;
+        QString cachedYear;
+        qint64 cachedLength;
+        float  cachedBpm;
+        int cachedTrackNumber;
+        int cachedDiscNumber;
+
+        Meta::ArtistPtr artistPtr;
+        Meta::AlbumPtr albumPtr;
+        Meta::GenrePtr genrePtr;
+        Meta::ComposerPtr composerPtr;
+        Meta::YearPtr yearPtr;
+
+    public:
+        void notifyObservers()
+        {
+            if( proxy )
+            {
+                foreach( Meta::Observer *observer, observers )
+                {
+                    if( observer != this )
+                        observer->metadataChanged( Meta::TrackPtr( const_cast<MetaProxy::Track*>(proxy) ) );
+                }
+            }
+        }
+        using Observer::metadataChanged;
+        void metadataChanged( Meta::TrackPtr track )
+        {
+            Q_UNUSED( track )
+            notifyObservers();
+        }
+
+    public slots:
+        void slotNewTrackProvider( Amarok::TrackProvider *newTrackProvider )
+        {
+            if ( !newTrackProvider )
+            {
+                return;
+            }
+
+            if( newTrackProvider->possiblyContainsTrack( url ) )
+            {
+                Meta::TrackPtr track = newTrackProvider->trackForUrl( url );
+                if( track )
+                {
+                    subscribeTo( track );
+                    realTrack = track;
+                    notifyObservers();
+                    disconnect( CollectionManager::instance(), SIGNAL( trackProviderAdded( Amarok::TrackProvider* ) ), this, SLOT( slotNewTrackProvider( Amarok::TrackProvider* ) ) );
+                }
+            }
+        }
+
+        void slotUpdateTrack( Meta::TrackPtr track )
+        {
+            if( track )
+            {
+                subscribeTo( track );
+                realTrack = track;
+                notifyObservers();
+            }
+        }
+        void slotCheckCollectionManager()
+        {
+            Meta::TrackPtr track = CollectionManager::instance()->trackForUrl( url );
+            if( track )
+                realTrack = track;
+            notifyObservers();
+            disconnect( CollectionManager::instance(), SIGNAL( collectionAdded( Amarok::Collection* ) ), this, SLOT( slotNewCollection( Amarok::Collection* ) ) );
+        }
+};
+
+// internal helper classes
+
+class ProxyArtist : public Meta::Artist
+{
+public:
+    ProxyArtist( MetaProxy::Track::Private *dptr )
+        : Meta::Artist()
+        , d( dptr )
+    {}
+
+    Meta::TrackList tracks()
+    {
+        if( d && d->realTrack )
+            return d->realTrack->artist()->tracks();
+        else
+            return Meta::TrackList();
+    }
+
+    Meta::AlbumList albums()
+    {
+        if( d && d->realTrack )
+            return d->realTrack->artist()->albums();
+        else
+            return Meta::AlbumList();
+    }
+
+    QString name() const
+    {
+        if( d && d->realTrack )
+        {
+            if ( d->realTrack->artist() )
+                return d->realTrack->artist()->name();
+            return QString();
+        } else if( d )
+            return d->cachedArtist;
+        return QString();
+    }
+
+    QString prettyName() const
+    {
+        if( d && d->realTrack )
+            return d->realTrack->artist()->prettyName();
+        else if( d )
+            return d->cachedArtist;
+        return QString();
+    }
+
+    virtual bool operator==( const Meta::Artist &artist ) const
+    {
+        const ProxyArtist *proxy = dynamic_cast<const ProxyArtist*>( &artist );
+        if( proxy )
+        {
+            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->artist() && d->realTrack->artist() == proxy->d->realTrack->artist();
+        }
+        else
+        {
+            return d && d->realTrack && d->realTrack->artist() && d->realTrack->artist().data() == &artist;
+        }
+    }
+
+    MetaProxy::Track::Private * const d;
+};
+
+class ProxyAlbum : public Meta::Album
+{
+public:
+    ProxyAlbum( MetaProxy::Track::Private *dptr )
+        : Meta::Album()
+        , d( dptr )
+    {}
+
+    bool isCompilation() const
+    {
+        if( d && d->realTrack )
+            return d->realTrack->album()->isCompilation();
+        else
+            return false;
+    }
+
+    bool hasAlbumArtist() const
+    {
+        if( d && d->realTrack && d->realTrack->album() )
+            return d->realTrack->album()->hasAlbumArtist();
+        else
+            return false;
+    }
+
+    Meta::ArtistPtr albumArtist() const
+    {
+        if( d && d->realTrack && d->realTrack->album() )
+            return d->realTrack->album()->albumArtist();
+        else
+            return Meta::ArtistPtr();
+    }
+
+    Meta::TrackList tracks()
+    {
+        if( d && d->realTrack )
+            return d->realTrack->album()->tracks();
+        else
+            return Meta::TrackList();
+    }
+
+    QString name() const
+    {
+        if( d && d->realTrack )
+        {
+            if ( d->realTrack->album() )
+                return d->realTrack->album()->name();
+            return QString();
+        }
+        else if ( d )
+              return d->cachedAlbum;
+        else
+            return QString();
+    }
+
+    QString prettyName() const
+    {
+        if( d && d->realTrack && d->realTrack->album() )
+            return d->realTrack->album()->prettyName();
+        else
+            return name();
+    }
+
+    QPixmap image( int size )
+    {
+        if( d && d->realTrack ) {
+            if ( d->realTrack->album() )
+                return d->realTrack->album()->image( size );
+            return Meta::Album::image( size );
+        } else
+            return Meta::Album::image( size );
+    }
+
+    virtual bool operator==( const Meta::Album &album ) const
+    {
+        const ProxyAlbum *proxy = dynamic_cast<const ProxyAlbum*>( &album );
+        if( proxy )
+        {
+            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->album() && ( *d->realTrack->album().data() ) == ( *proxy->d->realTrack->album().data() );
+        }
+        else
+        {
+            return d && d->realTrack && d->realTrack->album() && ( *d->realTrack->album().data() ) == album;
+        }
+    }
+
+    MetaProxy::Track::Private * const d;
+};
+
+class ProxyGenre : public Meta::Genre
+{
+public:
+    ProxyGenre( MetaProxy::Track::Private *dptr )
+        : Meta::Genre()
+        , d( dptr )
+    {}
+
+    QString name() const
+    {
+        if( d && d->realTrack && d->realTrack->genre() )
+            return d->realTrack->genre()->name();
+        else if( d )
+            return d->cachedGenre;
+        else
+            return QString();
+    }
+
+    QString prettyName() const
+    {
+        if( d && d->realTrack && d->realTrack->genre() )
+            return d->realTrack->genre()->prettyName();
+        else
+            return QString();
+    }
+
+    Meta::TrackList tracks()
+    {
+        if( d && d->realTrack && d->realTrack->genre() )
+            return d->realTrack->genre()->tracks();
+        else
+            return Meta::TrackList();
+    }
+
+    virtual bool operator==( const Meta::Genre &genre ) const
+    {
+        const ProxyGenre *proxy = dynamic_cast<const ProxyGenre*>( &genre );
+        if( proxy )
+        {
+            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->genre() && d->realTrack->genre() == proxy->d->realTrack->genre();
+        }
+        else
+        {
+            return d && d->realTrack && d->realTrack->genre() && d->realTrack->genre().data() == &genre;
+        }
+    }
+
+    MetaProxy::Track::Private * const d;
+};
+
+class ProxyComposer : public Meta::Composer
+{
+public:
+    ProxyComposer( MetaProxy::Track::Private *dptr )
+        : Meta::Composer()
+        , d( dptr )
+    {}
+
+    QString name() const
+    {
+        if( d && d->realTrack && d->realTrack->composer() )
+            return d->realTrack->composer()->name();
+        else if ( d )
+            return d->cachedComposer;
+        else
+            return QString();
+    }
+
+    QString prettyName() const
+    {
+        if( d && d->realTrack && d->realTrack->composer())
+            return d->realTrack->composer()->prettyName();
+        else
+            return name();
+    }
+
+    Meta::TrackList tracks()
+    {
+        if( d && d->realTrack && d->realTrack->composer() )
+            return d->realTrack->composer()->tracks();
+        else
+            return Meta::TrackList();
+    }
+
+    virtual bool operator==( const Meta::Composer &composer ) const
+    {
+        const ProxyComposer *proxy = dynamic_cast<const ProxyComposer*>( &composer );
+        if( proxy )
+        {
+            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->composer() && d->realTrack->composer() == proxy->d->realTrack->composer();
+        }
+        else
+        {
+            return d && d->realTrack && d->realTrack->composer() && d->realTrack->composer().data() == &composer;
+        }
+    }
+
+    MetaProxy::Track::Private * const d;
+};
+
+class ProxyYear : public Meta::Year
+{
+public:
+    ProxyYear( MetaProxy::Track::Private *dptr )
+        : Meta::Year()
+        , d( dptr )
+    {}
+
+    QString name() const
+    {
+        if( d && d->realTrack && d->realTrack->year() )
+            return d->realTrack->year()->name();
+        else if( d )
+            return d->cachedYear;
+        else
+            return QString();
+    }
+
+    QString prettyName() const
+    {
+        if( d && d->realTrack && d->realTrack->year() )
+            return d->realTrack->year()->prettyName();
+        else
+            return name();
+    }
+
+    Meta::TrackList tracks()
+    {
+        if( d && d->realTrack && d->realTrack->year() )
+            return d->realTrack->year()->tracks();
+        else
+            return Meta::TrackList();
+    }
+
+    virtual bool operator==( const Meta::Year &year ) const
+    {
+        const ProxyYear *proxy = dynamic_cast<const ProxyYear*>( &year );
+        if( proxy )
+        {
+            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->year() && d->realTrack->year() == proxy->d->realTrack->year();
+        }
+        else
+        {
+            return d && d->realTrack && d->realTrack->year() && d->realTrack->year().data() == &year;
+        }
+    }
+
+    MetaProxy::Track::Private * const d;
+};
+
+#endif
diff --git a/src/core/meta/impl/stream/Stream.cpp b/src/core/meta/impl/stream/Stream.cpp
new file mode 100644
index 0000000..dda6911
--- /dev/null
+++ b/src/core/meta/impl/stream/Stream.cpp
@@ -0,0 +1,344 @@
+/****************************************************************************************
+ * Copyright (c) 2007-2008 Maximilian Kossick <maximilian.kossick at googlemail.com>       *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "Stream.h"
+#include "Stream_p.h"
+#include "Stream_p.moc"
+
+#include "Debug.h"
+#include "core/meta/Meta.h"
+#include "core/meta/impl/default/DefaultMetaTypes.h"
+
+#include <QPointer>
+#include <QString>
+
+using namespace MetaStream;
+
+Track::Track( const KUrl &url )
+    : Meta::Track()
+    , d( new Track::Private( this ) )
+{
+    DEBUG_BLOCK
+
+    d->url = url;
+    d->artistPtr = Meta::ArtistPtr( new StreamArtist( QPointer<Track::Private>( d ) ) );
+    d->albumPtr = Meta::AlbumPtr( new StreamAlbum( QPointer<Track::Private>( d ) ) );
+    d->genrePtr = Meta::GenrePtr( new Meta::DefaultGenre() );
+    d->composerPtr = Meta::ComposerPtr( new Meta::DefaultComposer() );
+    d->yearPtr = Meta::YearPtr( new Meta::DefaultYear() );
+}
+
+Track::~Track()
+{
+    delete d;
+}
+
+QString
+Track::name() const
+{
+    if( d->title.isEmpty() )
+        return i18n( "Stream (%1)", d->url.url() );
+    return d->title;
+}
+
+QString
+Track::prettyName() const
+{
+    return name();
+}
+
+QString
+Track::fullPrettyName() const
+{
+    return name();
+}
+
+QString
+Track::sortableName() const
+{
+    return name();
+}
+
+
+KUrl
+Track::playableUrl() const
+{
+    return d->url;
+}
+
+QString
+Track::prettyUrl() const
+{
+    return playableUrl().url();
+}
+
+QString
+Track::uidUrl() const
+{
+    return playableUrl().url();
+}
+
+bool
+Track::isPlayable() const
+{
+    //simple implementation, check Internet connectivity or ping server?
+    return true;
+}
+
+bool
+Track::isEditable() const
+{
+    return false;
+}
+
+Meta::AlbumPtr
+Track::album() const
+{
+    return d->albumPtr;
+}
+
+Meta::ArtistPtr
+Track::artist() const
+{
+    return d->artistPtr;
+}
+
+Meta::GenrePtr
+Track::genre() const
+{
+    return d->genrePtr;
+}
+
+Meta::ComposerPtr
+Track::composer() const
+{
+    return d->composerPtr;
+}
+
+Meta::YearPtr
+Track::year() const
+{
+    return d->yearPtr;
+}
+
+void
+Track::setAlbum( const QString &newAlbum )
+{
+    d->album = newAlbum;
+}
+
+void
+Track::setArtist( const QString& newArtist )
+{
+    d->artist = newArtist;
+}
+
+void
+Track::setGenre( const QString& newGenre )
+{
+    Q_UNUSED( newGenre )
+}
+
+void
+Track::setComposer( const QString& newComposer )
+{
+    Q_UNUSED( newComposer )
+}
+
+void
+Track::setYear( const QString& newYear )
+{
+    Q_UNUSED( newYear )
+}
+
+void
+Track::setTitle( const QString &newTitle )
+{
+    //it is sometimes useful to set a title for a stream so it has a nice name
+    //before we actually start playing it
+    d->title = newTitle;
+}
+
+float
+Track::bpm() const
+{
+    return -1.0;
+}
+
+QString
+Track::comment() const
+{
+    return QString();
+}
+
+void
+Track::setComment( const QString& newComment )
+{
+    Q_UNUSED( newComment )
+}
+
+double
+Track::score() const
+{
+    return 0.0;
+}
+
+void
+Track::setScore( double newScore )
+{
+    Q_UNUSED( newScore )
+}
+
+int
+Track::rating() const
+{
+    return 0;
+}
+
+void
+Track::setRating( int newRating )
+{
+    Q_UNUSED( newRating )
+}
+
+int
+Track::trackNumber() const
+{
+    return 0;
+}
+
+void
+Track::setTrackNumber( int newTrackNumber )
+{
+    Q_UNUSED( newTrackNumber )
+}
+
+int
+Track::discNumber() const
+{
+    return 0;
+}
+
+void
+Track::setDiscNumber( int newDiscNumber )
+{
+    Q_UNUSED( newDiscNumber )
+}
+
+qint64
+Track::length() const
+{
+    //TODO
+    return 0;
+}
+
+int
+Track::filesize() const
+{
+    return 0;
+}
+
+int
+Track::sampleRate() const
+{
+    return 0;
+}
+
+int
+Track::bitrate() const
+{
+    return 0;
+}
+
+uint
+Track::lastPlayed() const
+{
+    return 0;
+}
+
+int
+Track::playCount() const
+{
+    return 0;
+}
+
+QString
+Track::type() const
+{
+    return "stream";
+}
+
+void
+Track::beginMetaDataUpdate()
+{
+    //not editable
+}
+
+void
+Track::endMetaDataUpdate()
+{
+    //not editable
+}
+
+void
+Track::abortMetaDataUpdate()
+{
+    //not editable
+}
+
+void
+Track::finishedPlaying( double playedFraction )
+{
+    Q_UNUSED( playedFraction );
+    //TODO
+}
+
+bool
+Track::inCollection() const
+{
+    return false;
+}
+
+Amarok::Collection*
+Track::collection() const
+{
+    return 0;
+}
+
+void
+Track::subscribe( Meta::Observer *observer )
+{
+    DEBUG_BLOCK
+
+    debug() << "Adding observer: " << observer;
+    d->observers.insert( observer );
+}
+
+void
+Track::unsubscribe( Meta::Observer *observer )
+{
+    DEBUG_BLOCK
+
+    debug() << "Removing observer: " << observer;
+    d->observers.remove( observer );
+}
+
+void Track::updateUrl( const KUrl & url )
+{
+    d->url = url;
+    notifyObservers();
+}
+
diff --git a/src/core/meta/impl/stream/Stream.h b/src/core/meta/impl/stream/Stream.h
new file mode 100644
index 0000000..43fb458
--- /dev/null
+++ b/src/core/meta/impl/stream/Stream.h
@@ -0,0 +1,110 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_STREAM_H
+#define AMAROK_STREAM_H
+
+#include "amarok_export.h"
+#include "core/meta/Meta.h"
+
+
+
+namespace MetaStream
+{
+    class AMAROK_EXPORT Track : public Meta::Track
+    {
+        public:
+            class Private;
+
+            Track( const KUrl &url );
+            virtual ~Track();
+
+        //methods inherited from Meta::MetaBase
+            virtual QString name() const;
+            virtual QString prettyName() const;
+            virtual QString fullPrettyName() const;
+            virtual QString sortableName() const;
+
+        //methods inherited from Meta::Track
+            virtual KUrl playableUrl() const;
+            virtual QString prettyUrl() const;
+            virtual QString uidUrl() const;
+
+            virtual bool isPlayable() const;
+            virtual bool isEditable() const;
+
+            virtual Meta::AlbumPtr album() const;
+            virtual Meta::ArtistPtr artist() const;
+            virtual Meta::GenrePtr genre() const;
+            virtual Meta::ComposerPtr composer() const;
+            virtual Meta::YearPtr year() const;
+
+            virtual void setAlbum( const QString &newAlbum );
+            virtual void setArtist( const QString &newArtist );
+            virtual void setGenre( const QString &newGenre );
+            virtual void setComposer( const QString &newComposer );
+            virtual void setYear( const QString &newYear );
+
+            virtual void setTitle( const QString &newTitle );
+
+            virtual float bpm() const;
+
+            virtual QString comment() const;
+            virtual void setComment( const QString &newComment );
+
+            virtual double score() const;
+            virtual void setScore( double newScore );
+
+            virtual int rating() const;
+            virtual void setRating( int newRating );
+
+            virtual int trackNumber() const;
+            virtual void setTrackNumber( int newTrackNumber );
+
+            virtual int discNumber() const;
+            virtual void setDiscNumber( int newDiscNumber );
+
+            virtual qint64 length() const;
+            virtual int filesize() const;
+            virtual int sampleRate() const;
+            virtual int bitrate() const;
+
+            virtual uint lastPlayed() const;
+            virtual int playCount() const;
+
+            virtual QString type() const;
+
+            virtual void beginMetaDataUpdate();
+            virtual void endMetaDataUpdate();
+            virtual void abortMetaDataUpdate();
+
+            virtual void finishedPlaying( double playedFraction );
+
+            virtual bool inCollection() const;
+            virtual Amarok::Collection *collection() const;
+
+            virtual void subscribe( Meta::Observer *observer );
+            virtual void unsubscribe( Meta::Observer *observer );
+
+            virtual void updateUrl( const KUrl &url );
+
+        private:
+            Private * const d;
+    };
+
+}
+
+#endif
diff --git a/src/core/meta/impl/stream/Stream_p.h b/src/core/meta/impl/stream/Stream_p.h
new file mode 100644
index 0000000..650ef23
--- /dev/null
+++ b/src/core/meta/impl/stream/Stream_p.h
@@ -0,0 +1,239 @@
+/****************************************************************************************
+ * Copyright (c) 2007-2008 Maximilian Kossick <maximilian.kossick at googlemail.com>       *
+ * Copyright (c) 2008 Mark Kretschmann <kretschmann at kde.org>                            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_STREAM_P_H
+#define AMAROK_STREAM_P_H
+
+#include "Debug.h"
+#include "EngineController.h"
+#include "EngineObserver.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaConstants.h"
+
+#include <QList>
+#include <QObject>
+#include <QPixmap>
+
+using namespace MetaStream;
+
+class MetaStream::Track::Private : public QObject, public EngineObserver
+{
+    Q_OBJECT
+    public:
+        Private( Track *t )
+            : EngineObserver( The::engineController() )
+            , track( t )
+        {}
+
+        void notify() const
+        {
+            DEBUG_BLOCK
+
+            foreach( Meta::Observer *observer, observers )
+            {
+                debug() << "Notifying observer: " << observer;
+                observer->metadataChanged( Meta::TrackPtr( const_cast<MetaStream::Track*>( track ) ) );
+            }
+        }
+
+        void engineNewMetaData( const QHash<qint64, QString> &metaData, bool trackChanged )
+        {
+            Q_UNUSED( trackChanged )
+
+            if( metaData.value( Meta::valUrl ) == url.url() )
+            {
+                DEBUG_BLOCK
+                debug() << "Applying new Metadata.";
+
+                if( metaData.contains( Meta::valArtist ) )
+                    artist = metaData.value( Meta::valArtist );
+                if( metaData.contains( Meta::valTitle ) )
+                    title = metaData.value( Meta::valTitle );
+                if( metaData.contains( Meta::valAlbum ) )
+                    album = metaData.value( Meta::valAlbum );
+
+                // Special demangling of artist/title for Shoutcast streams, which usually have "Artist - Title" in the title tag:
+                if( artist.isEmpty() && title.contains( " - " ) ) {
+                    const QStringList artist_title = title.split( " - " );
+                    if( artist_title.size() >= 2 ) {
+                        artist = artist_title[0];
+                        title  = title.remove( 0, artist.length() + 3 );
+                    }
+                }
+
+                notify();
+            }
+        }
+
+        void engineStateChanged( Phonon::State state, Phonon::State oldState )
+        {
+            Q_UNUSED( oldState )
+
+            if ( state ==  Phonon::PlayingState ) {
+                Meta::TrackPtr track = The::engineController()->currentTrack();
+
+                if ( track && track->playableUrl().url() == url.url() )
+                { 
+                    if( track->artist() )
+                        artist = track->artist()->name();
+                    title = track->name();
+                    if( track->album() )
+                        album = track->album()->name();
+
+                        // Special demangling of artist/title for Shoutcast streams, which usually have "Artist - Title" in the title tag:
+                    if( !track->artist() && title.contains( " - " ) ) {
+                        const QStringList artist_title = title.split( " - " );
+                        if( artist_title.size() >= 2 ) {
+                            artist = artist_title[0];
+                            title  = title.remove( 0, artist.length() + 3 );
+                        }
+                    }
+
+                    notify();
+                }
+            }
+        }
+
+    public:
+        QSet<Meta::Observer*> observers;
+        KUrl url;
+        QString title;
+        QString artist;
+        QString album;
+
+        Meta::ArtistPtr artistPtr;
+        Meta::AlbumPtr albumPtr;
+        Meta::GenrePtr genrePtr;
+        Meta::ComposerPtr composerPtr;
+        Meta::YearPtr yearPtr;
+
+    private:
+        Track *track;
+};
+
+
+// internal helper classes
+
+class StreamArtist : public Meta::Artist
+{
+    public:
+        StreamArtist( MetaStream::Track::Private *dptr )
+            : Meta::Artist()
+            , d( dptr )
+            {}
+
+        Meta::TrackList tracks()
+        {
+            return Meta::TrackList();
+        }
+
+        Meta::AlbumList albums()
+        {
+            return Meta::AlbumList();
+        }
+
+        QString name() const
+        {
+            if( d )
+                return d->artist;
+            return QString();
+        }
+
+        QString prettyName() const
+        {
+            return name();
+        }
+
+        bool operator==( const Meta::Artist &other ) const {
+            return name() == other.name();
+        }
+
+        MetaStream::Track::Private * const d;
+};
+
+class StreamAlbum : public Meta::Album
+{
+public:
+    StreamAlbum( MetaStream::Track::Private *dptr )
+        : Meta::Album()
+        , d( dptr )
+    {}
+
+    bool isCompilation() const
+    {
+        return false;
+    }
+
+    bool hasAlbumArtist() const
+    {
+        return false;
+    }
+
+    Meta::ArtistPtr albumArtist() const
+    {
+        return Meta::ArtistPtr();
+    }
+
+    Meta::TrackList tracks()
+    {
+        return Meta::TrackList();
+    }
+
+    QString name() const
+    {
+        if( d )
+            return d->album;
+        return QString();
+    }
+
+    QString prettyName() const
+    {
+        return name();
+    }
+
+    void setImage( const QPixmap &pixmap )
+    {
+        m_cover = pixmap;
+    }
+
+    QPixmap image( int size )
+    {
+        if ( m_cover.isNull() )
+            return Meta::Album::image( size );
+
+        //only cache during session
+        if ( m_coverSizeMap.contains( size ) )
+            return m_coverSizeMap.value( size );
+
+        QPixmap scaled = m_cover.scaled( size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
+
+        m_coverSizeMap.insert( size, scaled );
+        return scaled;
+    }
+ 
+    bool operator==( const Meta::Album &other ) const {
+        return name() == other.name();
+    }
+
+    MetaStream::Track::Private * const d;
+    QMap <int, QPixmap> m_coverSizeMap;
+    QPixmap m_cover;
+};
+
+
+#endif
+
diff --git a/src/core/meta/support/MetaConstants.h b/src/core/meta/support/MetaConstants.h
new file mode 100644
index 0000000..b17a76e
--- /dev/null
+++ b/src/core/meta/support/MetaConstants.h
@@ -0,0 +1,92 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_METACONSTANTS_H
+#define AMAROK_METACONSTANTS_H
+
+#include <QtGlobal>
+
+namespace Meta
+{
+    //track metadata
+    static const qint64 valUrl          = 1LL << 0;
+    static const qint64 valTitle        = 1LL << 1;
+    static const qint64 valArtist       = 1LL << 2;
+    static const qint64 valAlbum        = 1LL << 3;
+    static const qint64 valGenre        = 1LL << 4;
+    static const qint64 valComposer     = 1LL << 5;
+    static const qint64 valYear         = 1LL << 6;
+    static const qint64 valComment      = 1LL << 7;
+    static const qint64 valTrackNr      = 1LL << 8;
+    static const qint64 valDiscNr       = 1LL << 9;
+    static const qint64 valBpm          = 1LL << 10;
+    //track data
+    static const qint64 valLength       = 1LL << 11;
+    static const qint64 valBitrate      = 1LL << 12;
+    static const qint64 valSamplerate   = 1LL << 13;
+    static const qint64 valFilesize     = 1LL << 14;
+    static const qint64 valFormat       = 1LL << 15;
+    static const qint64 valCreateDate   = 1LL << 16;
+    //statistics
+    static const qint64 valScore        = 1LL << 17;
+    static const qint64 valRating       = 1LL << 18;
+    static const qint64 valFirstPlayed  = 1LL << 19;
+    static const qint64 valLastPlayed   = 1LL << 20;
+    static const qint64 valPlaycount    = 1LL << 21;
+    static const qint64 valUniqueId     = 1LL << 22;
+    //replay gain
+    static const qint64 valTrackGain    = 1LL << 23;
+    static const qint64 valTrackGainPeak= 1LL << 24;
+    static const qint64 valAlbumGain    = 1LL << 25;
+    static const qint64 valAlbumGainPeak= 1LL << 26;
+
+    static const qint64 valAlbumArtist  = 1LL << 27;
+
+    namespace Field
+    {
+        //actual string values are not final yet
+        static const QString ALBUM          = "xesam:album";
+        static const QString ARTIST         = "xesam:author";
+        static const QString BITRATE        = "xesam:audioBitrate";
+        static const QString BPM            = "xesam:audioBPM";
+        static const QString CODEC          = "xesam:audioCodec";
+        static const QString COMMENT        = "xesam:comment";
+        static const QString COMPOSER       = "xesam:composer";
+        static const QString DISCNUMBER     = "xesam:discNumber";
+        static const QString FILESIZE       = "xesam:size";
+        static const QString GENRE          = "xesam:genre";
+        static const QString LENGTH         = "xesam:mediaDuration";
+        static const QString RATING         = "xesam:userRating";
+        static const QString SAMPLERATE     = "xesam:audioSampleRate";
+        static const QString TITLE          = "xesam:title";
+        static const QString TRACKNUMBER    = "xesam:trackNumber";
+        static const QString URL            = "xesam:url";
+        static const QString YEAR           = "xesam:contentCreated";
+        static const QString ALBUMGAIN      = "xesam:albumGain";
+        static const QString ALBUMPEAKGAIN  = "xesam:albumPeakGain";
+        static const QString TRACKGAIN      = "xesam:trackGain";
+        static const QString TRACKPEAKGAIN  = "xesam:trackPeakGain";
+
+        static const QString SCORE          = "xesam:autoRating";
+        static const QString PLAYCOUNT      = "xesam:useCount";
+        static const QString FIRST_PLAYED   = "xesam:firstUsed";
+        static const QString LAST_PLAYED    = "xesam:lastUsed";
+
+        static const QString UNIQUEID       = "xesam:id";
+    }
+}
+
+#endif
diff --git a/src/core/meta/support/MetaUtility.cpp b/src/core/meta/support/MetaUtility.cpp
new file mode 100644
index 0000000..10a3165
--- /dev/null
+++ b/src/core/meta/support/MetaUtility.cpp
@@ -0,0 +1,382 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "core/meta/support/MetaUtility.h"
+
+#include "Debug.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/Capability.h"
+#include "core/capabilities/EditCapability.h"
+
+#include <QChar>
+#include <QFile>
+
+#include <klocale.h>
+#include <kio/global.h>
+
+        static const QString XESAM_ALBUM          = "http://freedesktop.org/standards/xesam/1.0/core#album";
+        static const QString XESAM_ARTIST         = "http://freedesktop.org/standards/xesam/1.0/core#artist";
+        static const QString XESAM_BITRATE        = "http://freedesktop.org/standards/xesam/1.0/core#audioBitrate";
+        static const QString XESAM_BPM            = "http://freedesktop.org/standards/xesam/1.0/core#audioBPM";
+        static const QString XESAM_CODEC          = "http://freedesktop.org/standards/xesam/1.0/core#audioCodec";
+        static const QString XESAM_COMMENT        = "http://freedesktop.org/standards/xesam/1.0/core#comment";
+        static const QString XESAM_COMPOSER       = "http://freedesktop.org/standards/xesam/1.0/core#composer";
+        static const QString XESAM_DISCNUMBER     = "http://freedesktop.org/standards/xesam/1.0/core#discNumber";
+        static const QString XESAM_FILESIZE       = "http://freedesktop.org/standards/xesam/1.0/core#size";
+        static const QString XESAM_GENRE          = "http://freedesktop.org/standards/xesam/1.0/core#genre";
+        static const QString XESAM_LENGTH         = "http://freedesktop.org/standards/xesam/1.0/core#mediaDuration";
+        static const QString XESAM_RATING         = "http://freedesktop.org/standards/xesam/1.0/core#userRating";
+        static const QString XESAM_SAMPLERATE     = "http://freedesktop.org/standards/xesam/1.0/core#audioSampleRate";
+        static const QString XESAM_TITLE          = "http://freedesktop.org/standards/xesam/1.0/core#title";
+        static const QString XESAM_TRACKNUMBER    = "http://freedesktop.org/standards/xesam/1.0/core#trackNumber";
+        static const QString XESAM_URL            = "http://freedesktop.org/standards/xesam/1.0/core#url";
+        static const QString XESAM_YEAR           = "http://freedesktop.org/standards/xesam/1.0/core#contentCreated";
+
+        static const QString XESAM_SCORE          = "http://freedesktop.org/standards/xesam/1.0/core#autoRating";
+        static const QString XESAM_PLAYCOUNT      = "http://freedesktop.org/standards/xesam/1.0/core#useCount";
+        static const QString XESAM_FIRST_PLAYED   = "http://freedesktop.org/standards/xesam/1.0/core#firstUsed";
+        static const QString XESAM_LAST_PLAYED    = "http://freedesktop.org/standards/xesam/1.0/core#lastUsed";
+
+        static const QString XESAM_ID             = "http://freedesktop.org/standards/xesam/1.0/core#id";
+        //static bool conversionMapsInitialised = false;
+
+QVariantMap
+Meta::Field::mapFromTrack( const Meta::TrackPtr track )
+{
+    //note: track does not support first_played yet
+    QVariantMap map;
+    if( !track )
+        return map;
+
+    if( track->name().isEmpty() )
+        map.insert( Meta::Field::TITLE, QVariant( track->prettyName() ) );
+    else
+        map.insert( Meta::Field::TITLE, QVariant( track->name() ) );
+    if( track->artist() && !track->artist()->name().isEmpty() )
+        map.insert( Meta::Field::ARTIST, QVariant( track->artist()->name() ) );
+    if( track->album() && !track->album()->name().isEmpty() )
+        map.insert( Meta::Field::ALBUM, QVariant( track->album()->name() ) );
+    if( track->filesize() )
+        map.insert( Meta::Field::FILESIZE, QVariant( track->filesize() ) );
+    if( track->genre() && !track->genre()->name().isEmpty() )
+        map.insert( Meta::Field::GENRE, QVariant( track->genre()->name() ) );
+    if( track->composer() && !track->composer()->name().isEmpty() )
+        map.insert( Meta::Field::COMPOSER, QVariant( track->composer()->name() ) );
+    if( track->year() && !track->year()->name().isEmpty() )
+        map.insert( Meta::Field::YEAR, QVariant( track->year()->name() ) );
+    if( !track->comment().isEmpty() )
+        map.insert( Meta::Field::COMMENT, QVariant( track->comment() ) );
+    if( track->trackNumber() )
+        map.insert( Meta::Field::TRACKNUMBER, QVariant( track->trackNumber() ) );
+    if( track->discNumber() )
+        map.insert( Meta::Field::DISCNUMBER, QVariant( track->discNumber() ) );
+    if( track->bitrate() )
+        map.insert( Meta::Field::BITRATE, QVariant( track->bitrate() ) );
+    if( track->length() )
+        map.insert( Meta::Field::LENGTH, QVariant( track->length() ) );
+    if( track->sampleRate() )
+        map.insert( Meta::Field::SAMPLERATE, QVariant( track->sampleRate() ) );
+    if( track->bpm() >= 0.0)
+        map.insert( Meta::Field::BPM, QVariant( track->bpm() ) );
+
+    map.insert( Meta::Field::UNIQUEID, QVariant( track->uidUrl() ) );
+    map.insert( Meta::Field::URL, QVariant( track->prettyUrl() ) );
+    map.insert( Meta::Field::RATING, QVariant( track->rating() ) );
+    map.insert( Meta::Field::SCORE, QVariant( track->score() ) );
+    map.insert( Meta::Field::PLAYCOUNT, QVariant( track->playCount() ) );
+    map.insert( Meta::Field::LAST_PLAYED, QVariant( track->lastPlayed() ) );
+
+    return map;
+}
+
+QVariantMap
+Meta::Field::mprisMapFromTrack( const Meta::TrackPtr track )
+{
+    QVariantMap map;
+    if( track )
+    {
+        // MANDATORY:
+        map["location"] = track->playableUrl().url();
+        // INFORMATIONAL:
+        map["title"] = track->prettyName();
+
+        if( track->artist() )
+            map["artist"] = track->artist()->name();
+
+        if( track->album() )
+            map["album"] = track->album()->name();
+
+        map["tracknumber"] = track->trackNumber();
+        map["time"] = track->length() / 1000;
+        map["mtime"] = track->length();
+
+        if( track->genre() )
+            map["genre"] = track->genre()->name();
+
+        map["comment"] = track->comment();
+        map["rating"] = track->rating()/2;  //out of 5, not 10.
+
+        if( track->year() )
+            map["year"] = track->year()->name();
+
+        if( track->album() )
+            map["arturl"] = track->album()->imageLocation().url();
+
+        //TODO: external service meta info
+
+        // TECHNICAL:
+        map["audio-bitrate"] = track->bitrate();
+        map["audio-samplerate"] = track->sampleRate();
+        //amarok has no video-bitrate
+
+        // EXTRA Amarok specific
+        const QString lyrics = track->cachedLyrics();
+        if( !lyrics.isEmpty() )
+            map["lyrics"] = lyrics;
+    }
+    return map;
+}
+
+
+void
+Meta::Field::updateTrack( Meta::TrackPtr track, const QVariantMap &metadata )
+{
+    if( !track || !track->hasCapabilityInterface( Meta::Capability::Editable ) )
+        return;
+
+    Meta::EditCapability *ec = track->create<Meta::EditCapability>();
+    if( !ec || !ec->isEditable() )
+        return;
+    ec->beginMetaDataUpdate();
+    QString title = metadata.contains( Meta::Field::TITLE ) ?
+                            metadata.value( Meta::Field::TITLE ).toString() : QString();
+    ec->setTitle( title );
+    QString comment = metadata.contains( Meta::Field::COMMENT ) ?
+                            metadata.value( Meta::Field::COMMENT ).toString() : QString();
+    ec->setComment( comment );
+    int tracknr = metadata.contains( Meta::Field::TRACKNUMBER ) ?
+                            metadata.value( Meta::Field::TRACKNUMBER ).toInt() : 0;
+    ec->setTrackNumber( tracknr );
+    int discnr = metadata.contains( Meta::Field::DISCNUMBER ) ?
+                            metadata.value( Meta::Field::DISCNUMBER ).toInt() : 0;
+    ec->setDiscNumber( discnr );
+    QString artist = metadata.contains( Meta::Field::ARTIST ) ?
+                            metadata.value( Meta::Field::ARTIST ).toString() : QString();
+    ec->setArtist( artist );
+    QString album = metadata.contains( Meta::Field::ALBUM ) ?
+                            metadata.value( Meta::Field::ALBUM ).toString() : QString();
+    ec->setAlbum( album );
+    QString genre = metadata.contains( Meta::Field::GENRE ) ?
+                            metadata.value( Meta::Field::GENRE ).toString() : QString();
+    ec->setGenre( genre );
+    QString composer = metadata.contains( Meta::Field::COMPOSER ) ?
+                            metadata.value( Meta::Field::COMPOSER ).toString() : QString();
+    ec->setComposer( composer );
+    QString year = metadata.contains( Meta::Field::YEAR ) ?
+                            metadata.value( Meta::Field::YEAR ).toString() : QString();
+    ec->setYear( year );
+
+    ec->endMetaDataUpdate();
+}
+
+QString
+Meta::Field::xesamPrettyToFullFieldName( const QString &name )
+{
+    if( name == Meta::Field::ARTIST )
+        return XESAM_ARTIST;
+    else if( name == Meta::Field::ALBUM )
+        return XESAM_ALBUM;
+    else if( name == Meta::Field::BITRATE )
+        return XESAM_BITRATE;
+    else if( name == Meta::Field::BPM )
+        return XESAM_BPM;
+    else if( name == Meta::Field::CODEC )
+        return XESAM_CODEC;
+    else if( name == Meta::Field::COMMENT )
+        return XESAM_COMMENT;
+    else if( name == Meta::Field::COMPOSER )
+        return XESAM_COMPOSER;
+    else if( name == Meta::Field::DISCNUMBER )
+        return XESAM_DISCNUMBER;
+    else if( name == Meta::Field::FILESIZE )
+        return XESAM_FILESIZE;
+    else if( name == Meta::Field::GENRE )
+        return XESAM_GENRE;
+    else if( name == Meta::Field::LENGTH )
+        return XESAM_LENGTH;
+    else if( name == Meta::Field::RATING )
+        return XESAM_RATING;
+    else if( name == Meta::Field::SAMPLERATE )
+        return XESAM_SAMPLERATE;
+    else if( name == Meta::Field::TITLE )
+        return XESAM_TITLE;
+    else if( name == Meta::Field::TRACKNUMBER )
+        return XESAM_TRACKNUMBER;
+    else if( name == Meta::Field::URL )
+        return XESAM_URL;
+    else if( name == Meta::Field::YEAR )
+        return XESAM_YEAR;
+    else if( name==Meta::Field::SCORE )
+        return XESAM_SCORE;
+    else if( name==Meta::Field::PLAYCOUNT )
+        return XESAM_PLAYCOUNT;
+    else if( name==Meta::Field::FIRST_PLAYED )
+        return XESAM_FIRST_PLAYED;
+    else if( name==Meta::Field::LAST_PLAYED )
+        return XESAM_LAST_PLAYED;
+    else if( name==Meta::Field::UNIQUEID )
+        return XESAM_ID;
+    else
+        return "xesamPrettyToFullName: unknown name " + name;
+}
+
+QString
+Meta::Field::xesamFullToPrettyFieldName( const QString &name )
+{
+    if( name == XESAM_ARTIST )
+        return Meta::Field::ARTIST;
+    else if( name == XESAM_ALBUM )
+        return Meta::Field::ALBUM;
+    else if( name == XESAM_BITRATE )
+        return Meta::Field::BITRATE;
+    else if( name == XESAM_BPM )
+        return Meta::Field::BPM;
+    else if( name == XESAM_CODEC )
+        return Meta::Field::CODEC;
+    else if( name == XESAM_COMMENT )
+        return Meta::Field::COMMENT;
+    else if( name == XESAM_COMPOSER )
+        return Meta::Field::COMPOSER;
+    else if( name == XESAM_DISCNUMBER )
+        return Meta::Field::DISCNUMBER;
+    else if( name == XESAM_FILESIZE )
+        return Meta::Field::FILESIZE;
+    else if( name == XESAM_GENRE )
+        return Meta::Field::GENRE;
+    else if( name == XESAM_LENGTH )
+        return Meta::Field::LENGTH;
+    else if( name == XESAM_RATING )
+        return Meta::Field::RATING;
+    else if( name == XESAM_SAMPLERATE )
+        return Meta::Field::SAMPLERATE;
+    else if( name == XESAM_TITLE )
+        return Meta::Field::TITLE;
+    else if( name == XESAM_TRACKNUMBER )
+        return Meta::Field::TRACKNUMBER;
+    else if( name == XESAM_URL )
+        return Meta::Field::URL;
+    else if( name == XESAM_YEAR )
+        return Meta::Field::YEAR;
+    else if( name == XESAM_SCORE )
+        return Meta::Field::SCORE;
+    else if( name == XESAM_PLAYCOUNT )
+        return Meta::Field::PLAYCOUNT;
+    else if( name == XESAM_FIRST_PLAYED )
+        return Meta::Field::FIRST_PLAYED;
+    else if( name == XESAM_LAST_PLAYED )
+        return Meta::Field::LAST_PLAYED;
+    else if( name == XESAM_ID )
+        return Meta::Field::UNIQUEID;
+    else
+        return "xesamFullToPrettyName: unknown name " + name;
+}
+
+
+QString
+Meta::msToPrettyTime( qint64 ms )
+{
+    return Meta::secToPrettyTime( ms / 1000 );
+}
+
+QString
+Meta::secToPrettyTime( int seconds )
+{
+    int minutes = ( seconds / 60 ) % 60;
+    int hours = seconds / 3600;
+    QString s = QChar( ':' );
+    s.append( ( seconds % 60 ) < 10 ? QString( "0%1" ).arg( seconds % 60 ) : QString::number( seconds % 60 ) ); //seconds
+
+    if( hours )
+    {
+        s.prepend( minutes < 10 ? QString( "0%1" ).arg( minutes ) : QString::number( minutes ) );
+        s.prepend( ':' );
+    }
+    else
+    {
+        s.prepend( QString::number( minutes ) );
+        return s;
+    }
+
+    //don't zeroPad the last one, as it can be greater than 2 digits
+    s.prepend( QString::number( hours ) );
+
+    return s;
+}
+
+QString
+Meta::prettyFilesize( quint64 size )
+{
+    return KIO::convertSize( size );
+}
+
+QString
+Meta::prettyBitrate( int bitrate )
+{
+    //the point here is to force sharing of these strings returned from prettyBitrate()
+    static const QString bitrateStore[9] = {
+        "?", "32", "64", "96", "128", "160", "192", "224", "256" };
+
+    return (bitrate >=0 && bitrate <= 256 && bitrate % 32 == 0)
+                ? bitrateStore[ bitrate / 32 ]
+    : QString( "%1" ).arg( bitrate );
+}
+
+QString
+Meta::prettyRating( int rating )
+{
+    // Use the graphical star rating widget instead -- stharward
+    // I would remove this entirely, but I'm not sure if it would break the A2 string freeze
+    AMAROK_DEPRECATED
+    switch( rating )
+    {
+        case 1: return i18nc( "The quality of music", "Awful" );
+        case 2: return i18nc( "The quality of music", "Bad" );
+        case 3: return i18nc( "The quality of music", "Barely tolerable" );
+        case 4: return i18nc( "The quality of music", "Tolerable" );
+        case 5: return i18nc( "The quality of music", "Okay" );
+        case 6: return i18nc( "The quality of music", "Good" );
+        case 7: return i18nc( "The quality of music", "Very good" );
+        case 8: return i18nc( "The quality of music", "Excellent" );
+        case 9: return i18nc( "The quality of music", "Amazing" );
+        case 10: return i18nc( "The quality of music", "Favorite" );
+        case 0: default: return i18nc( "The quality of music", "Not rated" ); // assume weird values as not rated
+    }
+    return "if you can see this, then that's a bad sign.";
+}
+
+TrackKey
+Meta::keyFromTrack( const Meta::TrackPtr &track )
+{
+    TrackKey k;
+    k.trackName = track->name();
+    if( track->artist() )
+        k.artistName = track->artist()->name();
+
+    if( track->album() )
+        k.albumName = track->album()->name();
+
+    return k;
+}
diff --git a/src/core/meta/support/MetaUtility.h b/src/core/meta/support/MetaUtility.h
new file mode 100644
index 0000000..19533b3
--- /dev/null
+++ b/src/core/meta/support/MetaUtility.h
@@ -0,0 +1,110 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_METAUTILITY_H
+#define AMAROK_METAUTILITY_H
+
+#include "amarok_export.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaConstants.h"
+
+#include <QMap>
+#include <QString>
+#include <QVariant>
+
+class AMAROK_EXPORT AlbumKey
+{
+public:
+    QString albumName;
+    QString artistName;
+
+    AlbumKey() {}
+    AlbumKey( const QString &artist, const QString &album )
+    { artistName = artist; albumName = album; }
+
+    AlbumKey &operator=( const AlbumKey &o )
+    { albumName = o.albumName; artistName = o.artistName; return *this; }
+};
+
+class AMAROK_EXPORT TrackKey
+{
+public:
+    QString trackName;
+    QString albumName;
+    QString artistName;
+    //more?
+
+    TrackKey() {}
+
+    TrackKey &operator=( const TrackKey &o )
+    { trackName = o.trackName; albumName = o.albumName; artistName = o.artistName; return *this; }
+};
+
+namespace Meta
+{
+    class Track;
+
+    namespace Field
+    {
+
+        //deprecated
+        AMAROK_EXPORT QVariantMap mapFromTrack( const Meta::TrackPtr track );
+        //this method will return a map with keys that are compatible to the fdo MPRIS specification
+        AMAROK_EXPORT QVariantMap mprisMapFromTrack( const Meta::TrackPtr track );
+        AMAROK_EXPORT void updateTrack( Meta::TrackPtr track, const QVariantMap &metadata );
+        AMAROK_EXPORT QString xesamPrettyToFullFieldName( const QString &name );
+        AMAROK_EXPORT QString xesamFullToPrettyFieldName( const QString &name );
+    }
+
+
+    AMAROK_EXPORT QString msToPrettyTime( qint64 ms );
+    AMAROK_EXPORT QString secToPrettyTime( int seconds );
+
+    AMAROK_EXPORT QString prettyFilesize( quint64 size );
+    AMAROK_EXPORT QString prettyBitrate( int bitrate );
+
+    AMAROK_EXPORT QString prettyRating( int rating );
+
+    AMAROK_EXPORT TrackKey keyFromTrack( const Meta::TrackPtr &track );
+}
+
+inline bool
+operator==( const TrackKey &k1, const TrackKey &k2 )
+{
+    return k1.trackName == k2.trackName &&
+                          k1.albumName == k2.albumName &&
+                          k1.artistName == k2.artistName;
+}
+
+inline uint
+qHash( const TrackKey &key )
+{
+    return qHash( key.trackName ) + 17 * qHash( key.albumName ) + 31 * qHash( key.artistName );
+}
+
+inline bool
+operator==( const AlbumKey &k1, const AlbumKey &k2 )
+{
+    return k1.albumName == k2.albumName && k1.artistName == k2.artistName;
+}
+
+inline uint
+qHash( const AlbumKey &key )
+{
+    return qHash( key.albumName ) + 17 * qHash( key.artistName );
+}
+
+#endif
diff --git a/src/core/meta/support/PrivateMetaRegistry.cpp b/src/core/meta/support/PrivateMetaRegistry.cpp
new file mode 100644
index 0000000..8c73411
--- /dev/null
+++ b/src/core/meta/support/PrivateMetaRegistry.cpp
@@ -0,0 +1,120 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "PrivateMetaRegistry.h"
+
+#include "Debug.h"
+
+namespace Meta {
+
+
+PrivateMetaRegistry* PrivateMetaRegistry::s_instance = 0;
+
+
+PrivateMetaRegistry * PrivateMetaRegistry::instance()
+{
+    if ( s_instance == 0 )
+        s_instance = new PrivateMetaRegistry();
+    return s_instance;
+}
+
+
+PrivateMetaRegistry::PrivateMetaRegistry()
+{
+}
+
+
+PrivateMetaRegistry::~PrivateMetaRegistry()
+{
+}
+
+
+void PrivateMetaRegistry::insertAlbum( const QString &owner, const QString &key, AlbumPtr album )
+{
+    const QString compositeKey = owner + '-' + key;
+    m_albums.insert( compositeKey, album );
+}
+
+void PrivateMetaRegistry::insertArtist( const QString &owner, const QString &key, ArtistPtr artist )
+{
+    const QString compositeKey = owner + '-' + key;
+    m_artists.insert( compositeKey, artist );
+}
+
+void PrivateMetaRegistry::insertGenre( const QString &owner, const QString &key, GenrePtr genre )
+{
+    const QString compositeKey = owner + '-' + key;
+    m_genre.insert( compositeKey, genre );
+}
+
+void PrivateMetaRegistry::insertComposer( const QString &owner, const QString &key, ComposerPtr composer )
+{
+    const QString compositeKey = owner + '-' + key;
+    m_composers.insert( compositeKey, composer );
+}
+
+void PrivateMetaRegistry::insertYear( const QString &owner, const QString &key, YearPtr year )
+{
+    const QString compositeKey = owner + '-' + key;
+    m_years.insert( compositeKey, year );
+}
+
+AlbumPtr PrivateMetaRegistry::album( const QString &owner, const QString &key )
+{
+    DEBUG_BLOCK
+    const QString compositeKey = owner + '-' + key;
+    if ( m_albums.contains( compositeKey ) ) {
+        debug() << "reusing album with key: " << key;
+         return m_albums.value( compositeKey );
+
+    }
+    return AlbumPtr();
+}
+
+ArtistPtr PrivateMetaRegistry::artist( const QString &owner, const QString &key )
+{
+    const QString compositeKey = owner + '-' + key;
+    if ( m_artists.contains( compositeKey ) )
+        return m_artists.value( compositeKey );
+    return ArtistPtr();
+}
+
+GenrePtr PrivateMetaRegistry::genre( const QString &owner, const QString &key )
+{
+    const QString compositeKey = owner + '-' + key;
+    if ( m_genre.contains( compositeKey ) )
+        return m_genre.value( compositeKey );
+    return GenrePtr();
+}
+
+ComposerPtr PrivateMetaRegistry::composer( const QString &owner, const QString &key )
+{
+    const QString compositeKey = owner + '-' + key;
+    if ( m_composers.contains( compositeKey ) )
+        return m_composers.value( compositeKey );
+    return ComposerPtr();
+}
+
+YearPtr PrivateMetaRegistry::year( const QString &owner, const QString &key )
+{
+     const QString compositeKey = owner + '-' + key;
+     if ( m_years.contains( compositeKey ) )
+         return m_years.value( compositeKey );
+     return YearPtr();
+}
+
+}
+
diff --git a/src/core/meta/support/PrivateMetaRegistry.h b/src/core/meta/support/PrivateMetaRegistry.h
new file mode 100644
index 0000000..86f721d
--- /dev/null
+++ b/src/core/meta/support/PrivateMetaRegistry.h
@@ -0,0 +1,65 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+ 
+#ifndef METAPRIVATEMETAREGISTRY_H
+#define METAPRIVATEMETAREGISTRY_H
+
+#include "core/meta/Meta.h"
+
+namespace Meta {
+
+/**
+An extremely simple registry used where tracks often have private often have private album (or other members) to corrolate these instead of creating a new one for each trac (even if they are from the same album). This, besides saving memory, also makes it possible to group by pointers in the playlist instead of doing some album/artist name foo.
+
+	@author 
+*/
+class PrivateMetaRegistry{
+public:
+
+    static PrivateMetaRegistry * instance();
+
+    void insertAlbum( const QString &owner, const QString &key, AlbumPtr album );
+    void insertArtist( const QString &owner, const QString &key, ArtistPtr artist );
+    void insertGenre( const QString &owner, const QString &key, GenrePtr genre );
+    void insertComposer( const QString &owner, const QString &key, ComposerPtr composer );
+    void insertYear( const QString &owner, const QString &key, YearPtr year );
+
+    AlbumPtr album( const QString &owner, const QString &key );
+    ArtistPtr artist( const QString &owner, const QString &key );
+    GenrePtr genre( const QString &owner, const QString &key );
+    ComposerPtr composer( const QString &owner, const QString &key );
+    YearPtr year( const QString &owner, const QString &key );
+
+
+private:
+
+    PrivateMetaRegistry();
+    ~PrivateMetaRegistry();
+
+    static PrivateMetaRegistry* s_instance;      //! instance variable
+    
+    QMap<QString, AlbumPtr> m_albums;
+    QMap<QString, ArtistPtr> m_artists;
+    QMap<QString, GenrePtr> m_genre;
+    QMap<QString, ComposerPtr> m_composers;
+    QMap<QString, YearPtr> m_years;
+
+
+};
+
+}
+
+#endif
diff --git a/src/core/playlists/Playlist.cpp b/src/core/playlists/Playlist.cpp
new file mode 100644
index 0000000..eb7c079
--- /dev/null
+++ b/src/core/playlists/Playlist.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "Playlist.h"
+
+
+Meta::PlaylistObserver::~PlaylistObserver()
+{
+    foreach( Meta::PlaylistPtr playlist, m_playlistSubscriptions )
+    {
+        playlist->unsubscribe( this );
+    }
+}
+
+void
+Meta::PlaylistObserver::subscribeTo( Meta::PlaylistPtr playlist )
+{
+    if( playlist )
+    {
+        m_playlistSubscriptions.insert( playlist );
+        playlist->subscribe( this );
+    }
+}
+
+void
+Meta::PlaylistObserver::unsubscribeFrom( Meta::PlaylistPtr playlist )
+{
+    if( playlist )
+    {
+        m_playlistSubscriptions.remove( playlist );
+        playlist->unsubscribe( this );
+    }
+}
diff --git a/src/core/playlists/Playlist.h b/src/core/playlists/Playlist.h
new file mode 100644
index 0000000..edecd85
--- /dev/null
+++ b/src/core/playlists/Playlist.h
@@ -0,0 +1,169 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_META_PLAYLIST_H
+#define AMAROK_META_PLAYLIST_H
+
+#include "amarok_export.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/Capability.h"
+
+#include <QList>
+#include <QMetaType>
+#include <QPixmap>
+#include <QSet>
+#include <QSharedData>
+#include <QString>
+#include <QTextStream>
+
+#include <ksharedptr.h>
+#include <kurl.h>
+
+class PlaylistProvider;
+class QTextStream;
+
+namespace Meta
+{
+    class Playlist;
+
+    typedef KSharedPtr<Playlist> PlaylistPtr;
+    typedef QList<PlaylistPtr> PlaylistList;
+
+    enum PlaylistCategory
+    {
+        UserPlaylist = 1,
+        PodcastChannelPlaylist
+    };
+
+    class AMAROK_EXPORT PlaylistObserver
+    {
+        public:
+            void subscribeTo( PlaylistPtr );
+            void unsubscribeFrom( PlaylistPtr );
+
+            /** This method is called when a track has been added to the playlist.
+             */
+            virtual void trackAdded( PlaylistPtr playlist, TrackPtr track, int position ) = 0;
+            /** This method is called when a track is removed from to the playlist.
+             */
+            virtual void trackRemoved( PlaylistPtr playlist, int position ) = 0;
+
+            virtual ~PlaylistObserver();
+
+        private:
+            QSet<PlaylistPtr> m_playlistSubscriptions;
+    };
+
+    class AMAROK_EXPORT Playlist : public virtual QSharedData
+    {
+        public:
+            virtual ~Playlist() {}
+            virtual QString name() const = 0;
+            virtual QString prettyName() const = 0;
+            virtual QString description() const { return QString(); }
+
+            virtual PlaylistProvider *provider() const { return 0; }
+
+            /**override showing just the filename */
+            virtual void setName( const QString &name ) { m_name = name; }
+
+            /** @returns the number of tracks this playlist contains. -1 if this can not
+              * be determined before loading them all.
+              */
+            virtual int trackCount() const { return -1; }
+            /** returns all tracks in this playlist */
+            virtual TrackList tracks() = 0;
+            virtual void addTrack( Meta::TrackPtr track, int position = -1 )
+                    { Q_UNUSED(track); Q_UNUSED(position); }
+            virtual void removeTrack( int position ) { Q_UNUSED(position); }
+
+            virtual void subscribe( PlaylistObserver *observer )
+                    { if( observer ) m_observers.insert( observer ); }
+            virtual void unsubscribe( PlaylistObserver *observer )
+                    { m_observers.remove( observer ); }
+
+            virtual QStringList groups() { return QStringList(); }
+
+            /**
+            * "labels" the playlist as part of a group. In a folder-like hierachy this means adding
+            * the playlist to the folder with name groups.first().
+            * If groups is empty that means removing all groups from the playlist.
+            */
+            virtual void setGroups( const QStringList &groups ) { Q_UNUSED(groups) }
+
+            /* the following has been copied from Meta.h
+            * it is my hope that we can integrate Playlists
+            * better into the rest of the Meta framework someday ~Bart Cerneels
+            * TODO: Playlist : public MetaBase
+            */
+            virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const = 0;
+
+            virtual Capability* createCapabilityInterface( Capability::Type type ) = 0;
+
+            /**
+             * Retrieves a specialized interface which represents a capability of this
+             * MetaBase object.
+             *
+             * @returns a pointer to the capability interface if it exists, 0 otherwise
+             */
+            template <class CapIface> CapIface *create()
+            {
+                Meta::Capability::Type type = CapIface::capabilityInterfaceType();
+                Meta::Capability *iface = createCapabilityInterface(type);
+                return qobject_cast<CapIface *>(iface);
+            }
+
+            /**
+             * Tests if a MetaBase object provides a given capability interface.
+             *
+             * @returns true if the interface is available, false otherwise
+             */
+            template <class CapIface> bool is() const
+            {
+                return hasCapabilityInterface( CapIface::capabilityInterfaceType() );
+            }
+
+            virtual KUrl retrievableUrl() { return KUrl(); }
+
+        protected:
+            inline void notifyObserversTrackAdded( Meta::TrackPtr track, int position )
+            {
+                foreach( Meta::PlaylistObserver *observer, m_observers )
+                {
+                    if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
+                        observer->trackAdded( Meta::PlaylistPtr( this ), track, position );
+                }
+            }
+
+            inline void notifyObserversTrackRemoved( int position )
+            {
+                foreach( Meta::PlaylistObserver *observer, m_observers )
+                {
+                    if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
+                        observer->trackRemoved( Meta::PlaylistPtr( this ), position );
+                }
+            }
+
+            QSet<Meta::PlaylistObserver*> m_observers;
+            QString m_name;
+    };
+
+}
+
+Q_DECLARE_METATYPE( Meta::PlaylistPtr )
+Q_DECLARE_METATYPE( Meta::PlaylistList )
+
+#endif
diff --git a/src/core/playlists/PlaylistProvider.cpp b/src/core/playlists/PlaylistProvider.cpp
new file mode 100644
index 0000000..9fb0b36
--- /dev/null
+++ b/src/core/playlists/PlaylistProvider.cpp
@@ -0,0 +1,2 @@
+#include "PlaylistProvider.h"
+#include "PlaylistProvider.moc"
diff --git a/src/core/playlists/PlaylistProvider.h b/src/core/playlists/PlaylistProvider.h
new file mode 100644
index 0000000..aab95d0
--- /dev/null
+++ b/src/core/playlists/PlaylistProvider.h
@@ -0,0 +1,65 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_PLAYLISTPROVIDER_H
+#define AMAROK_PLAYLISTPROVIDER_H
+
+#include "amarok_export.h"
+#include "plugin/plugin.h"
+#include "Playlist.h"
+
+#include <QString>
+
+class QAction;
+class KIcon;
+
+class AMAROK_EXPORT PlaylistProvider : public QObject, public Amarok::Plugin
+{
+    Q_OBJECT
+
+    public:
+        virtual ~PlaylistProvider() {}
+
+        /**
+        * @returns A translated string to identify this Provider.
+        */
+        virtual QString prettyName() const = 0;
+
+        virtual KIcon icon() const = 0;
+
+        /**
+         * @returns An unique integer that identifies the category of the offered playlists.
+         * Use the PlaylistManager::PlaylistCategory enum.
+         */
+        virtual int category() const = 0;
+
+        /** @returns the number of playlists this provider has or a negative value if it
+         * can not determine that before loading them all.
+         */
+        virtual int playlistCount() const { return -1; }
+        virtual Meta::PlaylistList playlists() = 0;
+
+        virtual QList<QAction *> providerActions() { return QList<QAction *>(); }
+        virtual QList<QAction *> playlistActions( Meta::PlaylistPtr playlist ) = 0;
+        virtual QList<QAction *> trackActions( Meta::PlaylistPtr playlist,
+                                                  int trackIndex ) = 0;
+
+    signals:
+        void updated();
+
+};
+
+#endif // AMAROK_PLAYLISTPROVIDER_H
diff --git a/src/core/playlists/impl/dynamic/DynamicPlaylist.cpp b/src/core/playlists/impl/dynamic/DynamicPlaylist.cpp
new file mode 100644
index 0000000..f42a31b
--- /dev/null
+++ b/src/core/playlists/impl/dynamic/DynamicPlaylist.cpp
@@ -0,0 +1,39 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "DynamicPlaylist.h"
+
+#include <KLocale>
+
+namespace Meta {
+
+DynamicPlaylist::DynamicPlaylist( PlaylistPtr playlist )
+ : Playlist()
+{
+    m_tracks = playlist->tracks();
+}
+
+DynamicPlaylist::~DynamicPlaylist()
+{
+}
+
+QString
+DynamicPlaylist::prettyName() const
+{
+    return i18n("Default Dynamic Playlist");
+}
+
+}
diff --git a/src/core/playlists/impl/dynamic/DynamicPlaylist.h b/src/core/playlists/impl/dynamic/DynamicPlaylist.h
new file mode 100644
index 0000000..81373b0
--- /dev/null
+++ b/src/core/playlists/impl/dynamic/DynamicPlaylist.h
@@ -0,0 +1,50 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef METADYNAMICPLAYLIST_H
+#define METADYNAMICPLAYLIST_H
+
+#include <Playlist.h>
+
+namespace Meta {
+
+/**
+ * Base Class for all dynamic playlists.
+ *  @author Bart Cerneels <bart.cerneels at kde.org>
+*/
+class AMAROK_EXPORT DynamicPlaylist : public Playlist
+{
+    public:
+        DynamicPlaylist( PlaylistPtr playlist );
+
+        ~DynamicPlaylist();
+
+        /* Meta::Playlist virtuals */
+        virtual QString name() const { return prettyName(); };
+        virtual QString prettyName() const;
+
+        TrackList tracks() { return m_tracks; };
+
+        void recalculate();
+
+    protected:
+        TrackList m_tracks;
+        TrackPtr m_newestTrack;
+};
+
+}
+
+#endif
diff --git a/src/core/playlists/impl/file/PlaylistFile.h b/src/core/playlists/impl/file/PlaylistFile.h
new file mode 100644
index 0000000..a1722ca
--- /dev/null
+++ b/src/core/playlists/impl/file/PlaylistFile.h
@@ -0,0 +1,68 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef METAPLAYLISTFILE_H
+#define METAPLAYLISTFILE_H
+
+#include "core/playlists/Playlist.h"
+
+class PlaylistProvider;
+
+namespace Meta
+{
+
+    class PlaylistFile;
+
+    typedef KSharedPtr<PlaylistFile> PlaylistFilePtr;
+    typedef QList<PlaylistFilePtr> PlaylistFileList;
+
+    /**
+     * Base class for all playlist files
+     *
+     **/
+    class AMAROK_EXPORT PlaylistFile : public Playlist
+    {
+        public:
+            PlaylistFile() : Playlist(), m_provider( 0 ) {}
+            virtual ~PlaylistFile() {}
+
+            virtual bool isWritable() { return false; }
+
+            virtual bool save( const KUrl &url, bool relative )
+                { Q_UNUSED( url ); Q_UNUSED( relative ); return false; }
+            virtual bool load( QTextStream &stream ) { Q_UNUSED( stream ); return false; }
+
+            virtual void setName( const QString &name ) = 0;
+            virtual void setGroups( const QStringList &groups ) { m_groups = groups; }
+            virtual QStringList groups() { return m_groups; }
+
+            //default implementation prevents crashes related to PlaylistFileProvider
+            virtual void setProvider( PlaylistProvider *provider ) { m_provider = provider; }
+
+            /* Playlist Methods */
+            virtual PlaylistProvider *provider() const { return m_provider; }
+
+        protected:
+            PlaylistProvider *m_provider;
+            QStringList m_groups;
+    };
+
+}
+
+Q_DECLARE_METATYPE( Meta::PlaylistFilePtr )
+Q_DECLARE_METATYPE( Meta::PlaylistFileList )
+
+#endif
diff --git a/src/core/playlists/impl/file/PlaylistFileSupport.cpp b/src/core/playlists/impl/file/PlaylistFileSupport.cpp
new file mode 100644
index 0000000..0f754ef
--- /dev/null
+++ b/src/core/playlists/impl/file/PlaylistFileSupport.cpp
@@ -0,0 +1,219 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Ian Monroe <ian at monroe.nu>                                        *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) version 3 or        *
+ * any later version accepted by the membership of KDE e.V. (or its successor approved  *
+ * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of  *
+ * version 3 of the license.                                                            *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "PlaylistFileSupport.h"
+#include "Debug.h"
+#include "collection/CollectionManager.h"
+#include "statusbar/StatusBar.h"
+#include "core/playlists/impl/file/xspf/XSPFPlaylist.h"
+#include "core/playlists/impl/file/pls/PLSPlaylist.h"
+#include "core/playlists/impl/file/m3u/M3UPlaylist.h"
+
+
+#include <KLocale>
+#include <KTemporaryFile>
+#include <KUrl>
+
+#include <QFile>
+#include <QFileInfo>
+
+namespace Meta {
+
+PlaylistFormat
+getFormat( const KUrl &path )
+{
+    const QString ext = Amarok::extension( path.fileName() );
+
+    if( ext == "m3u" || ext == "m3u8" ) return M3U; //m3u8 is M3U in UTF8
+    if( ext == "pls" ) return PLS;
+    if( ext == "ram" ) return RAM;
+    if( ext == "smil") return SMIL;
+    if( ext == "asx" || ext == "wax" ) return ASX;
+    if( ext == "xml" ) return XML;
+    if( ext == "xspf" ) return XSPF;
+
+    return Unknown;
+}
+
+bool
+isPlaylist( const KUrl &path )
+{
+    return ( getFormat( path ) != Unknown );
+}
+
+PlaylistFilePtr
+loadPlaylistFile( const KUrl &url )
+{
+    //DEBUG_BLOCK
+
+    QFile file;
+    KUrl fileToLoad;
+
+    if( !url.isValid() )
+    {
+        error() << "url is not valid!";
+        return PlaylistFilePtr();
+    }
+
+    if( url.isLocalFile() )
+    {
+        if( !QFileInfo( url.toLocalFile() ).exists() )
+        {
+            error() << QString("Could not load local playlist file %1!").arg( url.toLocalFile() );
+            return PlaylistFilePtr();
+        }
+    }
+
+    if( url.isLocalFile() )
+    {
+        //debug() << "local file";
+
+        file.setFileName( url.toLocalFile() );
+
+        if( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
+        {
+            debug() << "could not read file " << url.path();
+
+            if( The::statusBar() )
+                The::statusBar()->longMessage( i18n( "Cannot read playlist (%1).", url.url() ) );
+
+            return Meta::PlaylistFilePtr( 0 );
+        }
+        fileToLoad = url;
+    }
+    else
+    {
+        //debug() << "remote file: " << url;
+        //FIXME: for now, just do a blocking download... Someone please come up with a better way...
+
+        KTemporaryFile tempFile;
+
+        tempFile.setSuffix(  '.' + Amarok::extension( url.url() ) );
+        tempFile.setAutoRemove( false );  //file will be removed in JamendoXmlParser
+        if( !tempFile.open() )
+        {
+            if( The::statusBar() )
+                The::statusBar()->longMessage( i18n( "Could not create a temporary file to download playlist.") );
+
+            return Meta::PlaylistFilePtr( 0 ); //error
+        }
+
+
+        QString tempFileName = tempFile.fileName();
+        #ifdef Q_WS_WIN
+        // KIO::file_copy faild to overwrite an open file
+        // using KTemporary.close() is not enough here
+        tempFile.remove();
+        #endif
+        KIO::FileCopyJob * job = KIO::file_copy( url , KUrl( tempFileName ), 0774 , KIO::Overwrite | KIO::HideProgressInfo );
+
+        if( The::statusBar() )
+            The::statusBar()->newProgressOperation( job, i18n( "Downloading remote playlist" ) );
+
+        if( !job->exec() ) //Job deletes itself after execution
+        {
+            error() << "error";
+            return Meta::PlaylistFilePtr( 0 );
+        }
+        else
+        {
+            file.setFileName( tempFileName );
+            if( !file.open( QFile::ReadOnly ) )
+            {
+                debug() << "error opening file: " << tempFileName;
+                return Meta::PlaylistFilePtr( 0 );
+            }
+            fileToLoad = KUrl::fromPath( file.fileName() );
+        }
+    }
+
+    PlaylistFormat format = getFormat( fileToLoad );
+    PlaylistFile *playlist = 0;
+    switch( format )
+    {
+        case PLS:
+            playlist = new PLSPlaylist( fileToLoad );
+            break;
+        case M3U:
+            playlist = new M3UPlaylist( fileToLoad );
+            break;
+        case XSPF:
+            playlist = new XSPFPlaylist( fileToLoad );
+            break;
+        default:
+            debug() << "Could not load playlist file " << fileToLoad;
+            break;
+    }
+
+    return PlaylistFilePtr( playlist );
+}
+
+bool
+exportPlaylistFile( const Meta::TrackList &list, const KUrl &path )
+{
+    PlaylistFormat format = getFormat( path );
+    bool result = false;
+    switch( format )
+    {
+        case PLS:
+            result = PLSPlaylist( list ).save( path.path(), true );
+            break;
+        case M3U:
+            result = M3UPlaylist( list ).save( path.path(), true );
+            break;
+        case XSPF:
+            result = XSPFPlaylist( list ).save( path.path(), true );
+            break;
+        default:
+            debug() << "Could not export playlist file " << path;
+            break;
+    }
+    return result;
+}
+
+bool
+canExpand( TrackPtr track )
+{
+    if( !track )
+        return false;
+
+    return Meta::getFormat( track->uidUrl() ) != Meta::NotPlaylist;
+}
+
+PlaylistPtr
+expand( TrackPtr track )
+{
+   //this should really be made asyncrhonous
+   return Meta::PlaylistPtr::dynamicCast( loadPlaylistFile( track->uidUrl() ) );
+}
+
+KUrl
+newPlaylistFilePath( const QString &fileExtension )
+{
+    int trailingNumber = 1;
+    KLocalizedString fileName = ki18n("Playlist_%1");
+    KUrl url( Amarok::saveLocation( "playlists" ) );
+    url.addPath( fileName.subs( trailingNumber ).toString() );
+
+    while( QFileInfo( url.path() ).exists() )
+        url.setFileName( fileName.subs( ++trailingNumber ).toString() );
+
+    return KUrl( QString( "%1.%2" ).arg( url.path() ).arg( fileExtension ) );
+}
+
+}
diff --git a/src/core/playlists/impl/file/PlaylistFileSupport.h b/src/core/playlists/impl/file/PlaylistFileSupport.h
new file mode 100644
index 0000000..c0e1d11
--- /dev/null
+++ b/src/core/playlists/impl/file/PlaylistFileSupport.h
@@ -0,0 +1,64 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Ian Monroe <ian at monroe.nu>                                        *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef AMAROK_META_PLAYLISTFILESUPPORT_H
+#define AMAROK_META_PLAYLISTFILESUPPORT_H
+
+#include "amarok_export.h"
+#include "core/meta/Meta.h"
+#include "core/playlists/impl/file/PlaylistFile.h"
+
+#include <QString>
+#include <QTextStream>
+
+#include <KUrl>
+#include <kio/job.h>
+#include <kio/jobclasses.h>
+
+class QFile;
+
+namespace Meta
+{
+    enum PlaylistFormat
+    {
+        M3U,
+        PLS,
+        XML,
+        RAM,
+        SMIL,
+        ASX,
+        XSPF,
+        Unknown,
+        NotPlaylist = Unknown
+    };
+    PlaylistFormat getFormat( const KUrl &path );
+    bool isPlaylist( const KUrl &path );
+
+    AMAROK_EXPORT PlaylistFilePtr loadPlaylistFile( const KUrl &url );
+    bool exportPlaylistFile( const Meta::TrackList &list, const KUrl &path );
+
+    /* HACK:
+     * the next two functions are needed to support some services that have no other way
+     * of presenting data to the user than wrapping the url to a playlist in a track.
+     */
+    bool canExpand( Meta::TrackPtr track );
+    PlaylistPtr expand( Meta::TrackPtr track );
+
+    AMAROK_EXPORT KUrl newPlaylistFilePath( const QString& fileExtension );
+
+}
+
+#endif
diff --git a/src/core/playlists/impl/file/m3u/M3UPlaylist.cpp b/src/core/playlists/impl/file/m3u/M3UPlaylist.cpp
new file mode 100644
index 0000000..7f6c6fe
--- /dev/null
+++ b/src/core/playlists/impl/file/m3u/M3UPlaylist.cpp
@@ -0,0 +1,230 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "M3UPlaylist.h"
+
+#include "Amarok.h"
+#include "CollectionManager.h"
+#include "Debug.h"
+#include "PlaylistManager.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
+
+#include <KMimeType>
+#include <KUrl>
+
+#include <QFile>
+#include <QFileInfo>
+#include <QTextStream>
+
+namespace Meta {
+
+M3UPlaylist::M3UPlaylist()
+    : m_url( Meta::newPlaylistFilePath( "m3u" ) )
+    , m_tracksLoaded( false )
+{
+    m_name = m_url.fileName();
+}
+
+M3UPlaylist::M3UPlaylist( Meta::TrackList tracks )
+    : m_url( Meta::newPlaylistFilePath( "m3u" ) )
+    , m_tracksLoaded( true )
+    , m_tracks( tracks )
+{
+    m_name = m_url.fileName();
+}
+
+M3UPlaylist::M3UPlaylist( const KUrl &url )
+    : m_url( url )
+    , m_tracksLoaded( false )
+{
+    //DEBUG_BLOCK
+    //debug() << "url: " << m_url;
+    m_name = m_url.fileName();
+}
+
+M3UPlaylist::~M3UPlaylist()
+{
+}
+
+QString
+M3UPlaylist::description() const
+{
+    KMimeType::Ptr mimeType = KMimeType::mimeType( "audio/x-mpegurl" );
+    return QString( "%1 (%2)").arg( mimeType->name(), "m3u" );
+}
+
+TrackList
+M3UPlaylist::tracks()
+{
+    if( m_tracksLoaded )
+        return m_tracks;
+
+    //check if file is local or remote
+    if ( m_url.isLocalFile() )
+    {
+        QFile file( m_url.toLocalFile() );
+        if( !file.open( QIODevice::ReadOnly ) ) {
+            debug() << "cannot open file";
+            return m_tracks;
+        }
+
+        QString contents( file.readAll() );
+        file.close();
+
+        QTextStream stream;
+        stream.setString( &contents );
+        loadM3u( stream );
+        m_tracksLoaded = true;
+    }
+    else
+    {
+        The::playlistManager()->downloadPlaylist( m_url, PlaylistFilePtr( this ) );
+    }
+    return m_tracks;
+}
+
+bool
+M3UPlaylist::loadM3u( QTextStream &stream )
+{
+    DEBUG_BLOCK
+
+    const QString directory = m_url.directory();
+
+    for( QString line; !stream.atEnd(); )
+    {
+        line = stream.readLine();
+        if( line.startsWith( "#EXTINF" ) )
+        {
+            //const QString extinf = line.section( ':', 1 );
+            //const int length = extinf.section( ',', 0, 0 ).toInt();
+        }
+
+        else if( !line.startsWith( '#' ) && !line.isEmpty() )
+        {
+            line = line.replace( "\\", "/" );
+
+            debug() << "line: " << line;
+            
+            // KUrl::isRelativeUrl() expects absolute URLs to start with a protocol, so prepend it if missing
+            QString url = line;
+            if( url.startsWith( '/' ) )
+                url.prepend( "file://" );
+            // Won't be relative if it begins with a /
+            // Also won't be windows url, so no need to worry about swapping \ for /
+            if( KUrl::isRelativeUrl( url ) )
+            {
+                debug() << "relative url";
+                //Replace \ with / for windows playlists
+                line.replace('\\','/');
+                KUrl kurl( directory );
+                kurl.addPath( line ); // adds directory separator if required
+                kurl.cleanPath();
+                Meta::TrackPtr trackPtr = CollectionManager::instance()->trackForUrl( kurl );
+
+                if ( trackPtr ) {
+                    debug() << "track url: " << trackPtr->prettyUrl();
+                    m_tracks.append( trackPtr );
+                }
+            }
+            else
+            {
+                Meta::TrackPtr trackPtr = CollectionManager::instance()->trackForUrl( KUrl( line ) );
+                if ( trackPtr ) {
+                    m_tracks.append( trackPtr );
+                }
+            }
+        }
+    }
+    return true;
+}
+
+bool
+M3UPlaylist::save( const KUrl &location, bool relative )
+{
+    KUrl savePath = location;
+    //if the location is a directory append the name of this playlist.
+    if( savePath.fileName().isNull() )
+        savePath.setFileName( name() );
+
+    QFile file( savePath.path() );
+
+    if( !file.open( QIODevice::WriteOnly ) )
+    {
+        debug() << "Unable to write to playlist " << savePath.path();
+        return false;
+    }
+
+    QTextStream stream( &file );
+
+    stream << "#EXTM3U\n";
+
+    KUrl::List urls;
+    QStringList titles;
+    QList<int> lengths;
+    foreach( Meta::TrackPtr track, m_tracks )
+    {
+        if( track )
+        {
+            urls << track->playableUrl();
+            titles << track->name();
+            lengths << track->length();
+        }
+    }
+
+    for( int i = 0, n = urls.count(); i < n; ++i )
+    {
+        const KUrl &url = urls[i];
+
+        if( !titles.isEmpty() && !lengths.isEmpty() )
+        {
+            stream << "#EXTINF:";
+            stream << QString::number( lengths[i] );
+            stream << ',';
+            stream << titles[i];
+            stream << '\n';
+        }
+        if (url.protocol() == "file" ) {
+            if ( relative ) {
+                const QFileInfo fi(file);
+                stream << KUrl::relativePath(fi.path(), url.path());
+            } else
+                stream << url.path();
+        } else {
+            stream << url.url();
+        }
+        stream << "\n";
+    }
+
+    return true;
+}
+
+bool
+M3UPlaylist::isWritable()
+{
+    if( m_url.isEmpty() )
+        return false;
+
+    return QFileInfo( m_url.path() ).isWritable();
+}
+
+void
+M3UPlaylist::setName( const QString &name )
+{
+    m_url.setFileName( name );
+}
+
+} //namespace Meta
+
diff --git a/src/core/playlists/impl/file/m3u/M3UPlaylist.h b/src/core/playlists/impl/file/m3u/M3UPlaylist.h
new file mode 100644
index 0000000..5ba06fd
--- /dev/null
+++ b/src/core/playlists/impl/file/m3u/M3UPlaylist.h
@@ -0,0 +1,86 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef METAM3UPLAYLIST_H
+#define METAM3UPLAYLIST_H
+
+#include "core/playlists/impl/file/PlaylistFile.h"
+
+class QTextStream;
+class QString;
+class QFile;
+
+namespace Meta {
+
+class M3UPlaylist;
+
+typedef KSharedPtr<M3UPlaylist> M3UPlaylistPtr;
+typedef QList<M3UPlaylistPtr> M3UPlaylistList;
+
+/**
+	@author Bart Cerneels <bart.cerneels at kde.org>
+*/
+class AMAROK_EXPORT_TESTS M3UPlaylist : public PlaylistFile
+{
+    public:
+        M3UPlaylist();
+        M3UPlaylist( Meta::TrackList tracks );
+        M3UPlaylist( const KUrl &url );
+
+        ~M3UPlaylist();
+
+        /* Playlist virtual functions */
+        virtual QString name() const { return prettyName(); }
+        virtual QString prettyName() const { return m_url.fileName(); }
+        virtual QString description() const;
+
+        virtual int trackCount() const { return -1; }
+        /** returns all tracks in this playlist */
+        virtual TrackList tracks();
+
+       /* the following has been copied from Meta.h
+        * it is my hope that we can integrate Playlists
+        * better into the rest of the Meta framework someday ~Bart Cerneels
+        * TODO: Playlist : public MetaBase
+        */
+        bool hasCapabilityInterface( Meta::Capability::Type type ) const { Q_UNUSED( type ); return false; }
+
+        Capability* createCapabilityInterface( Capability::Type type ) { Q_UNUSED( type ); return 0; }
+
+        KUrl retrievableUrl() { return m_url; }
+
+        /* PlaylistFile methods */
+        bool isWritable();
+        void setName( const QString &name );
+
+        bool save( const KUrl &location, bool relative );
+        bool load( QTextStream &stream ) { return loadM3u( stream ); }
+
+    private:
+        bool loadM3u( QTextStream &stream );
+
+        KUrl m_url;
+
+        bool m_tracksLoaded;
+        TrackList m_tracks;
+};
+
+}
+
+Q_DECLARE_METATYPE( Meta::M3UPlaylistPtr )
+Q_DECLARE_METATYPE( Meta::M3UPlaylistList )
+
+#endif
diff --git a/src/core/playlists/impl/file/pls/PLSPlaylist.cpp b/src/core/playlists/impl/file/pls/PLSPlaylist.cpp
new file mode 100644
index 0000000..96ec4e7
--- /dev/null
+++ b/src/core/playlists/impl/file/pls/PLSPlaylist.cpp
@@ -0,0 +1,297 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "PLSPlaylist.h"
+
+#include "CollectionManager.h"
+#include "Debug.h"
+#include "core/capabilities/EditCapability.h"
+#include "core/meta/Meta.h"
+#include "PlaylistManager.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
+
+#include <KMimeType>
+#include <KLocale>
+
+#include <QTextStream>
+#include <QRegExp>
+#include <QString>
+#include <QFile>
+
+namespace Meta {
+
+PLSPlaylist::PLSPlaylist()
+    : m_url( Meta::newPlaylistFilePath( "pls" ) )
+{
+    m_name = m_url.fileName();
+}
+
+PLSPlaylist::PLSPlaylist( TrackList tracks )
+    : m_tracks( tracks )
+    , m_url( Meta::newPlaylistFilePath( "pls" ) )
+{
+    m_name = m_url.fileName();
+}
+
+PLSPlaylist::PLSPlaylist( const KUrl &url )
+    : m_url( url )
+{
+    DEBUG_BLOCK
+    debug() << "url: " << m_url;
+
+    m_name = m_url.fileName();
+
+    //check if file is local or remote
+    if ( m_url.isLocalFile() )
+    {
+        QFile file( m_url.toLocalFile() );
+        if( !file.open( QIODevice::ReadOnly ) ) {
+            debug() << "cannot open file";
+            return;
+        }
+
+        QString contents = QString( file.readAll() );
+        file.close();
+
+        QTextStream stream;
+        stream.setString( &contents );
+        loadPls( stream );
+    }
+    else
+    {
+        The::playlistManager()->downloadPlaylist( m_url, PlaylistFilePtr( this ) );
+    }
+}
+
+PLSPlaylist::~PLSPlaylist()
+{
+}
+
+QString
+PLSPlaylist::description() const
+{
+    KMimeType::Ptr mimeType = KMimeType::mimeType( "audio/x-scpls" );
+    return QString( "%1 (%2)").arg( mimeType->name(), "pls" );
+}
+
+bool
+PLSPlaylist::loadPls( QTextStream &stream )
+{
+    DEBUG_BLOCK
+
+    Meta::TrackPtr currentTrack;
+
+    // Counted number of "File#=" lines.
+    unsigned int entryCnt = 0;
+    // Value of the "NumberOfEntries=#" line.
+    unsigned int numberOfEntries = 0;
+    // Does the file have a "[playlist]" section? (as it's required by the standard)
+    bool havePlaylistSection = false;
+    QString tmp;
+    QStringList lines;
+
+    const QRegExp regExp_NumberOfEntries("^NumberOfEntries\\s*=\\s*\\d+$");
+    const QRegExp regExp_File("^File\\d+\\s*=");
+    const QRegExp regExp_Title("^Title\\d+\\s*=");
+    const QRegExp regExp_Length("^Length\\d+\\s*=\\s*\\d+$");
+    const QRegExp regExp_Version("^Version\\s*=\\s*\\d+$");
+    const QString section_playlist("[playlist]");
+
+    /* Preprocess the input data.
+    * Read the lines into a buffer; Cleanup the line strings;
+    * Count the entries manually and read "NumberOfEntries".
+    */
+    while (!stream.atEnd()) {
+        tmp = stream.readLine();
+        tmp = tmp.trimmed();
+        if (tmp.isEmpty())
+            continue;
+        lines.append(tmp);
+
+        if (tmp.contains(regExp_File)) {
+            entryCnt++;
+            continue;
+        }
+        if (tmp == section_playlist) {
+            havePlaylistSection = true;
+            continue;
+        }
+        if (tmp.contains(regExp_NumberOfEntries)) {
+            numberOfEntries = tmp.section('=', -1).trimmed().toUInt();
+            continue;
+        }
+    }
+    if (numberOfEntries != entryCnt) {
+        warning() << ".pls playlist: Invalid \"NumberOfEntries\" value.  "
+                << "NumberOfEntries=" << numberOfEntries << "  counted="
+                << entryCnt << endl;
+        /* Corrupt file. The "NumberOfEntries" value is
+        * not correct. Fix it by setting it to the manually
+        * counted number and go on parsing.
+        */
+        numberOfEntries = entryCnt;
+    }
+    if (!numberOfEntries)
+        return true;
+
+    unsigned int index;
+    bool ok = false;
+    bool inPlaylistSection = false;
+
+    /* Now iterate through all beautified lines in the buffer
+    * and parse the playlist data.
+    */
+    QStringList::const_iterator i = lines.constBegin(), end = lines.constEnd();
+    for ( ; i != end; ++i) {
+        if (!inPlaylistSection && havePlaylistSection) {
+            /* The playlist begins with the "[playlist]" tag.
+            * Skip everything before this.
+            */
+            if ((*i) == section_playlist)
+                inPlaylistSection = true;
+            continue;
+        }
+        if ((*i).contains(regExp_File)) {
+            // Have a "File#=XYZ" line.
+            index = loadPls_extractIndex(*i);
+            if (index > numberOfEntries || index == 0)
+                continue;
+            tmp = (*i).section('=', 1).trimmed();
+            currentTrack = CollectionManager::instance()->trackForUrl( tmp );
+            if( currentTrack.isNull() )
+            {
+                debug() << "track could not be loaded: " << tmp;
+                continue;
+            }
+            m_tracks.append( currentTrack );
+            continue;
+        }
+        if ((*i).contains(regExp_Title)) {
+            // Have a "Title#=XYZ" line.
+            index = loadPls_extractIndex(*i);
+            if (index > numberOfEntries || index == 0)
+                continue;
+            tmp = (*i).section('=', 1).trimmed();
+
+            if ( currentTrack.data() != 0 && currentTrack->is<Meta::EditCapability>() )
+            {
+                Meta::EditCapability *ec = currentTrack->create<Meta::EditCapability>();
+                if( ec )
+                    ec->setTitle( tmp );
+                delete ec;
+            }
+            continue;
+        }
+        if ((*i).contains(regExp_Length)) {
+            // Have a "Length#=XYZ" line.
+            index = loadPls_extractIndex(*i);
+            if (index > numberOfEntries || index == 0)
+                continue;
+            tmp = (*i).section('=', 1).trimmed();
+            //tracks.append( KUrl(tmp) );
+//             Q_ASSERT(ok);
+            continue;
+        }
+        if ((*i).contains(regExp_NumberOfEntries)) {
+            // Have the "NumberOfEntries=#" line.
+            continue;
+        }
+        if ((*i).contains(regExp_Version)) {
+            // Have the "Version=#" line.
+            tmp = (*i).section('=', 1).trimmed();
+            // We only support Version=2
+            if (tmp.toUInt(&ok) != 2)
+                warning() << ".pls playlist: Unsupported version." << endl;
+//             Q_ASSERT(ok);
+            continue;
+        }
+        warning() << ".pls playlist: Unrecognized line: \"" << *i << "\"" << endl;
+    }
+
+    return true;
+}
+
+bool
+PLSPlaylist::save( const KUrl &location, bool relative )
+{
+    Q_UNUSED( relative );
+
+    KUrl savePath = location;
+    //if the location is a directory append the name of this playlist.
+    if( savePath.fileName().isNull() )
+        savePath.setFileName( name() );
+
+    QFile file( savePath.path() );
+
+    if( !file.open( QIODevice::WriteOnly ) )
+    {
+        debug() << "Unable to write to playlist " << savePath.path();
+        return false;
+    }
+
+    QTextStream stream( &file );
+    stream << "[Playlist]\n";
+    stream << "NumberOfEntries=" << m_tracks.count() << endl;
+    int i = 0;
+    foreach( Meta::TrackPtr track, m_tracks )
+    {
+        stream << "File" << i << "=";
+        stream << KUrl( track->playableUrl() ).path();
+        stream << "\nTitle" << i << "=";
+        stream << track->name();
+        stream << "\nLength" << i << "=";
+        stream << track->length() / 1000;
+        stream << "\n";
+        i++;
+    }
+
+    stream << "Version=2\n";
+    file.close();
+    return true;
+}
+
+unsigned int
+PLSPlaylist::loadPls_extractIndex( const QString &str ) const
+{
+    /* Extract the index number out of a .pls line.
+     * Example:
+    *   loadPls_extractIndex("File2=foobar") == 2
+    */
+    bool ok = false;
+    unsigned int ret;
+    QString tmp(str.section('=', 0, 0));
+    tmp.remove(QRegExp("^\\D*"));
+    ret = tmp.trimmed().toUInt(&ok);
+    Q_ASSERT(ok);
+    return ret;
+}
+
+bool
+PLSPlaylist::isWritable()
+{
+    if( m_url.isEmpty() )
+        return false;
+
+    return QFileInfo( m_url.path() ).isWritable();
+}
+
+void
+PLSPlaylist::setName( const QString &name )
+{
+    m_url.setFileName( name );
+}
+
+}
diff --git a/src/core/playlists/impl/file/pls/PLSPlaylist.h b/src/core/playlists/impl/file/pls/PLSPlaylist.h
new file mode 100644
index 0000000..515ac3c
--- /dev/null
+++ b/src/core/playlists/impl/file/pls/PLSPlaylist.h
@@ -0,0 +1,77 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef METAPLSPLAYLIST_H
+#define METAPLSPLAYLIST_H
+
+#include "core/playlists/impl/file/PlaylistFile.h"
+
+class QTextStream;
+class QFile;
+
+namespace Meta {
+
+class PLSPlaylist;
+
+typedef KSharedPtr<PLSPlaylist> PLSPlaylistPtr;
+typedef QList<PLSPlaylistPtr> PLSPlaylistList;
+
+/**
+	@author Bart Cerneels <bart.cerneels at kde.org>
+*/
+class AMAROK_EXPORT_TESTS PLSPlaylist : public PlaylistFile
+{
+    public:
+        PLSPlaylist();
+        PLSPlaylist( TrackList tracks );
+        PLSPlaylist( const KUrl &url );
+
+        ~PLSPlaylist();
+
+        /* Playlist virtual functions */
+        virtual QString name() const { return prettyName(); }
+        virtual QString prettyName() const { return m_url.fileName(); }
+        virtual QString description() const;
+
+        /** returns all tracks in this playlist */
+        TrackList tracks() { return m_tracks; }
+
+        bool hasCapabilityInterface( Meta::Capability::Type type ) const { Q_UNUSED( type ); return false; }
+
+        Capability* createCapabilityInterface( Capability::Type type ) { Q_UNUSED( type ); return 0; }
+
+        KUrl retrievableUrl() { return m_url; }
+
+        /* PlaylistFile methods */
+        bool isWritable();
+        void setName( const QString &name );
+        bool save( const KUrl &location, bool relative );
+        bool load( QTextStream &stream ) { return loadPls( stream ); }
+
+    private:
+        bool loadPls( QTextStream &stream );
+        unsigned int loadPls_extractIndex( const QString &str ) const;
+
+        Meta::TrackList m_tracks;
+        KUrl m_url;
+};
+
+}
+
+Q_DECLARE_METATYPE( Meta::PLSPlaylistPtr )
+Q_DECLARE_METATYPE( Meta::PLSPlaylistList )
+
+#endif
diff --git a/src/core/playlists/impl/file/xspf/XSPFPlaylist.cpp b/src/core/playlists/impl/file/xspf/XSPFPlaylist.cpp
new file mode 100644
index 0000000..e91ea50
--- /dev/null
+++ b/src/core/playlists/impl/file/xspf/XSPFPlaylist.cpp
@@ -0,0 +1,805 @@
+/****************************************************************************************
+ * Copyright (c) 2006 Mattias Fliesberg <mattias.fliesberg at gmail.com>                   *
+ * Copyright (c) 2007 Ian Monroe <ian at monroe.nu>                                        *
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "XSPFPlaylist.h"
+
+#include "Debug.h"
+#include "CollectionManager.h"
+#include "MainWindow.h"
+#include "core/meta/impl/proxy/MetaProxy.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/StreamInfoCapability.h"
+#include "core/meta/impl/stream/Stream.h"
+#include "core/meta/impl/file/File.h"
+#include "playlist/PlaylistController.h"
+#include "playlist/PlaylistModelStack.h"
+#include "PlaylistManager.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
+
+#include "timecode/TimecodeMeta.h"
+
+#include <kurl.h>
+#include <KMessageBox>
+#include <KMimeType>
+
+#include <QDateTime>
+#include <QDomElement>
+#include <QFile>
+#include <QString>
+
+#include <typeinfo>
+
+namespace Meta
+{
+
+XSPFPlaylist::XSPFPlaylist()
+    : QDomDocument()
+    , m_tracksLoaded( false )
+{
+    QDomElement root = createElement( "playlist" );
+
+    root.setAttribute( "version", 1 );
+    root.setAttribute( "xmlns", "http://xspf.org/ns/1/" );
+
+    root.appendChild( createElement( "trackList" ) );
+
+    appendChild( root );
+}
+
+XSPFPlaylist::XSPFPlaylist( const KUrl &url, bool autoAppend )
+    : QDomDocument()
+    , m_tracksLoaded( false )
+    , m_url( url )
+    , m_autoAppendAfterLoad( autoAppend )
+{
+    DEBUG_BLOCK
+    debug() << "url: " << m_url;
+
+    //check if file is local or remote
+    if ( m_url.isLocalFile() )
+    {
+        QFile file( m_url.toLocalFile() );
+        if( !file.open( QIODevice::ReadOnly ) ) {
+            debug() << "cannot open file";
+            return;
+        }
+
+        QTextStream stream( &file );
+        stream.setAutoDetectUnicode( true );
+
+        loadXSPF( stream );
+    }
+    else
+    {
+        The::playlistManager()->downloadPlaylist( m_url, PlaylistFilePtr( this ) );
+    }
+}
+
+XSPFPlaylist::XSPFPlaylist( Meta::TrackList tracks )
+    : QDomDocument()
+{
+    DEBUG_BLOCK
+
+    QDomElement root = createElement( "playlist" );
+
+    root.setAttribute( "version", 1 );
+    root.setAttribute( "xmlns", "http://xspf.org/ns/0/" );
+
+    root.appendChild( createElement( "trackList" ) );
+
+    appendChild( root );
+
+    setTrackList( tracks );
+
+    m_tracks = tracks;
+    m_tracksLoaded = true;
+}
+
+XSPFPlaylist::~XSPFPlaylist()
+{}
+
+QString
+XSPFPlaylist::description() const
+{
+    if( !annotation().isEmpty() )
+        return annotation();
+
+    KMimeType::Ptr mimeType = KMimeType::mimeType( "application/xspf+xml" );
+    return QString( "%1 (%2)").arg( mimeType->name(), "xspf" );
+}
+
+bool
+XSPFPlaylist::save( const KUrl &location, bool relative )
+{
+    DEBUG_BLOCK
+    Q_UNUSED( relative );
+
+    debug() << "Saving to " << location;
+    m_url = location;
+    //if the location is a directory append the name of this playlist.
+    if( m_url.fileName( KUrl::ObeyTrailingSlash ).isNull() )
+        m_url.setFileName( name() );
+
+    QFile file;
+
+    if( location.isLocalFile() )
+    {
+        file.setFileName( m_url.toLocalFile() );
+    }
+    else
+    {
+        file.setFileName( m_url.path() );
+    }
+
+    if( !file.open( QIODevice::WriteOnly ) )
+    {
+        if( The::mainWindow() ) // MainWindow might already be destroyed at this point (at program shutdown)
+            KMessageBox::sorry( The::mainWindow(), i18n( "Cannot write playlist (%1).", file.fileName() ) );
+        else
+            warning() << QString( "Cannot write playlist (%1)." ).arg( file.fileName() );
+
+        return false;
+    }
+
+    QTextStream stream ( &file );
+    stream.setCodec( "UTF-8" );
+    QDomDocument::save( stream, 2 /*indent*/, QDomNode::EncodingFromTextStream );
+
+    return true;
+}
+
+bool
+XSPFPlaylist::loadXSPF( QTextStream &stream )
+{
+    DEBUG_BLOCK
+    QString errorMsg;
+    int errorLine, errorColumn;
+
+    QString rawText = stream.readAll();
+
+    if ( !setContent( rawText, &errorMsg, &errorLine, &errorColumn ) )
+    {
+        debug() << "[XSPFPlaylist]: Error loading xml file: " "(" << errorMsg << ")"
+                << " at line " << errorLine << ", column " << errorColumn;
+        return false;
+    }
+
+    //FIXME: this needs to be moved to whatever is creating the XSPFPlaylist
+    if( m_autoAppendAfterLoad )
+        The::playlistController()->insertPlaylist( ::Playlist::ModelStack::instance()->source()->rowCount(), Meta::PlaylistPtr( this ) );
+
+    return true;
+}
+
+TrackList
+XSPFPlaylist::tracks()
+{
+    if( m_tracksLoaded )
+        return m_tracks;
+
+    XSPFTrackList xspfTracks = trackList();
+    TrackList tracks;
+
+    foreach( const XSPFTrack &track, xspfTracks )
+    {
+        TrackPtr trackPtr;
+        if( !track.identifier.isEmpty() )
+            trackPtr = CollectionManager::instance()->trackForUrl( track.identifier );
+        else
+            trackPtr = CollectionManager::instance()->trackForUrl( track.location );
+        if ( trackPtr )
+        {
+            if( !trackPtr->isPlayable() )
+                trackPtr = CollectionManager::instance()->trackForUrl( track.identifier );
+        }
+
+        if ( trackPtr )
+        {
+            if ( typeid( * trackPtr.data() ) == typeid( MetaStream::Track ) )
+            {
+                MetaStream::Track * streamTrack = dynamic_cast<MetaStream::Track *> ( trackPtr.data() );
+                if ( streamTrack )
+                {
+                    streamTrack->setTitle( track.title );
+                    streamTrack->setAlbum( track.album );
+                    streamTrack->setArtist( track.creator );
+                }
+            }
+            else if ( typeid( * trackPtr.data() ) == typeid( Meta::TimecodeTrack ) )
+            {
+                Meta::TimecodeTrack * timecodeTrack = dynamic_cast<Meta::TimecodeTrack *> ( trackPtr.data() );
+                if ( timecodeTrack )
+                {
+                    timecodeTrack->beginMetaDataUpdate();
+                    timecodeTrack->setTitle( track.title );
+                    timecodeTrack->setAlbum( track.album );
+                    timecodeTrack->setArtist( track.creator );
+                    timecodeTrack->endMetaDataUpdate();
+                }
+            }
+
+            m_tracks << trackPtr;
+        }
+
+
+        // why do we need this? sqlplaylist is not doing this
+        // we don't want (probably) unplayable tracks
+        // and it causes problems for me (DanielW) as long
+        // amarok not respects Track::isPlayable()
+        /*else {
+
+            MetaProxy::Track *proxyTrack = new MetaProxy::Track( track.location );
+            {
+                //Fill in values from xspf..
+                QVariantMap map;
+                map.insert( Meta::Field::TITLE, track.title );
+                map.insert( Meta::Field::ALBUM, track.album );
+                map.insert( Meta::Field::ARTIST, track.creator );
+                map.insert( Meta::Field::LENGTH, track.duration );
+                map.insert( Meta::Field::TRACKNUMBER, track.trackNum );
+                map.insert( Meta::Field::URL, track.location );
+                Meta::Field::updateTrack( proxyTrack, map );
+            }
+            m_tracks << Meta::TrackPtr( proxyTrack );
+    //         m_tracks << CollectionManager::instance()->trackForUrl( track.location );
+        }*/
+
+    }
+
+    m_tracksLoaded = true;
+    return m_tracks;
+}
+
+void
+XSPFPlaylist::addTrack( Meta::TrackPtr track, int position )
+{
+    TrackList trackList = tracks();
+    int trackPos = position < 0 ? trackList.count() : position;
+    if( trackPos > trackList.count() )
+        trackPos = trackList.count();
+    trackList.insert( trackPos, track );
+    setTrackList( trackList );
+    //also add to cache
+    m_tracks.insert( trackPos, track );
+    //set in case no track was in the playlist before
+    m_tracksLoaded = true;
+}
+
+void
+XSPFPlaylist::removeTrack( int position )
+{
+    TrackList trackList = tracks();
+    if( position < 0  || position > trackList.count() )
+        return;
+
+    trackList.removeAt( position );
+    setTrackList( trackList );
+    //also remove from cache
+    m_tracks.removeAt( position );
+}
+
+QString
+XSPFPlaylist::title() const
+{
+    return documentElement().namedItem( "title" ).firstChild().nodeValue();
+}
+
+QString
+XSPFPlaylist::creator() const
+{
+    return documentElement().namedItem( "creator" ).firstChild().nodeValue();
+}
+
+QString
+XSPFPlaylist::annotation() const
+{
+    return documentElement().namedItem( "annotation" ).firstChild().nodeValue();
+}
+
+KUrl
+XSPFPlaylist::info() const
+{
+    return KUrl( documentElement().namedItem( "info" ).firstChild().nodeValue() );
+}
+
+KUrl
+XSPFPlaylist::location() const
+{
+    return KUrl( documentElement().namedItem( "location" ).firstChild().nodeValue() );
+}
+
+QString
+XSPFPlaylist::identifier() const
+{
+    return documentElement().namedItem( "identifier" ).firstChild().nodeValue();
+}
+
+KUrl
+XSPFPlaylist::image() const
+{
+    return KUrl( documentElement().namedItem( "image" ).firstChild().nodeValue() );
+}
+
+QDateTime
+XSPFPlaylist::date() const
+{
+    return QDateTime::fromString( documentElement().namedItem( "date" ).firstChild().nodeValue(), Qt::ISODate );
+}
+
+KUrl
+XSPFPlaylist::license() const
+{
+    return KUrl( documentElement().namedItem( "license" ).firstChild().nodeValue() );
+}
+
+KUrl::List
+XSPFPlaylist::attribution() const
+{
+    QDomNode node = documentElement().namedItem( "attribution" );
+    KUrl::List list;
+
+    while ( !node.isNull() )
+    {
+        if ( !node.namedItem( "location" ).firstChild().nodeValue().isNull() )
+            list.append( node.namedItem( "location" ).firstChild().nodeValue() );
+        else if ( !node.namedItem( "identifier" ).firstChild().nodeValue().isNull() )
+            list.append( node.namedItem( "identifier" ).firstChild().nodeValue() );
+
+        node = node.nextSibling();
+    }
+
+    return list;
+}
+
+KUrl
+XSPFPlaylist::link() const
+{
+    return KUrl( documentElement().namedItem( "link" ).firstChild().nodeValue() );
+}
+
+void
+XSPFPlaylist::setTitle( const QString &title )
+{
+    QDomNode titleNode = documentElement().namedItem( "title" );
+    if( titleNode.isNull() || !titleNode.hasChildNodes() )
+    {
+        QDomNode node = createElement( "title" );
+        QDomNode subNode = createTextNode( title );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+    {
+        documentElement().namedItem( "title" ).replaceChild( createTextNode( title ),
+                                    documentElement().namedItem( "title" ).firstChild()
+                                );
+    }
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setCreator( const QString &creator )
+{
+    if ( documentElement().namedItem( "creator" ).isNull() )
+    {
+        QDomNode node = createElement( "creator" );
+        QDomNode subNode = createTextNode( creator );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "creator" ).replaceChild( createTextNode( creator ), documentElement().namedItem( "creator" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setAnnotation( const QString &annotation )
+{
+    if ( documentElement().namedItem( "annotation" ).isNull() )
+    {
+        QDomNode node = createElement( "annotation" );
+        QDomNode subNode = createTextNode( annotation );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "annotation" ).replaceChild( createTextNode( annotation ), documentElement().namedItem( "annotation" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setInfo( const KUrl &info )
+{
+    if ( documentElement().namedItem( "info" ).isNull() )
+    {
+        QDomNode node = createElement( "info" );
+        QDomNode subNode = createTextNode( info.url() );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "info" ).replaceChild( createTextNode( info.url() ), documentElement().namedItem( "info" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setLocation( const KUrl &location )
+{
+    if ( documentElement().namedItem( "location" ).isNull() )
+    {
+        QDomNode node = createElement( "location" );
+        QDomNode subNode = createTextNode( location.url() );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "location" ).replaceChild( createTextNode( location.url() ), documentElement().namedItem( "location" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setIdentifier( const QString &identifier )
+{
+    if ( documentElement().namedItem( "identifier" ).isNull() )
+    {
+        QDomNode node = createElement( "identifier" );
+        QDomNode subNode = createTextNode( identifier );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "identifier" ).replaceChild( createTextNode( identifier ), documentElement().namedItem( "identifier" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setImage( const KUrl &image )
+{
+    if ( documentElement().namedItem( "image" ).isNull() )
+    {
+        QDomNode node = createElement( "image" );
+        QDomNode subNode = createTextNode( image.url() );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "image" ).replaceChild( createTextNode( image.url() ), documentElement().namedItem( "image" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setDate( const QDateTime &date )
+{
+    /* date needs timezone info to be compliant with the standard
+    (ex. 2005-01-08T17:10:47-05:00 ) */
+
+    if ( documentElement().namedItem( "date" ).isNull() )
+    {
+        QDomNode node = createElement( "date" );
+        QDomNode subNode = createTextNode( date.toString( "yyyy-MM-ddThh:mm:ss" ) );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "date" ).replaceChild( createTextNode( date.toString( "yyyy-MM-ddThh:mm:ss" ) ), documentElement().namedItem( "date" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setLicense( const KUrl &license )
+{
+    if ( documentElement().namedItem( "license" ).isNull() )
+    {
+        QDomNode node = createElement( "license" );
+        QDomNode subNode = createTextNode( license.url() );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "license" ).replaceChild( createTextNode( license.url() ), documentElement().namedItem( "license" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setAttribution( const KUrl &attribution, bool append )
+{
+    if ( documentElement().namedItem( "attribution" ).isNull() )
+        documentElement().insertBefore( createElement( "attribution" ), documentElement().namedItem( "trackList" ) );
+
+    if ( append )
+    {
+        QDomNode subNode = createElement( "location" );
+        QDomNode subSubNode = createTextNode( attribution.url() );
+        subNode.appendChild( subSubNode );
+        documentElement().namedItem( "attribution" ).insertBefore( subNode, documentElement().namedItem( "attribution" ).firstChild() );
+    }
+    else
+    {
+        QDomNode node = createElement( "attribution" );
+        QDomNode subNode = createElement( "location" );
+        QDomNode subSubNode = createTextNode( attribution.url() );
+        subNode.appendChild( subSubNode );
+        node.appendChild( subNode );
+        documentElement().replaceChild( node, documentElement().namedItem( "attribution" ) );
+    }
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+void
+XSPFPlaylist::setLink( const KUrl &link )
+{
+    if ( documentElement().namedItem( "link" ).isNull() )
+    {
+        QDomNode node = createElement( "link" );
+        QDomNode subNode = createTextNode( link.url() );
+        node.appendChild( subNode );
+        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
+    }
+    else
+        documentElement().namedItem( "link" ).replaceChild( createTextNode( link.url() ), documentElement().namedItem( "link" ).firstChild() );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+XSPFTrackList
+XSPFPlaylist::trackList()
+{
+    DEBUG_BLOCK
+
+    XSPFTrackList list;
+
+    QDomNode trackList = documentElement().namedItem( "trackList" );
+    QDomNode subNode = trackList.firstChild();
+    QDomNode subSubNode;
+
+    while ( !subNode.isNull() )
+    {
+        XSPFTrack track;
+        subSubNode = subNode.firstChild();
+        if ( subNode.nodeName() == "track" )
+        {
+            while ( !subSubNode.isNull() )
+            {
+                if ( subSubNode.nodeName() == "location" )
+                    track.location = subSubNode.firstChild().nodeValue();
+                else if ( subSubNode.nodeName() == "title" )
+                    track.title = subSubNode.firstChild().nodeValue();
+                else if ( subSubNode.nodeName() == "creator" )
+                    track.creator = subSubNode.firstChild().nodeValue();
+                else if ( subSubNode.nodeName() == "duration" )
+                    track.duration = subSubNode.firstChild().nodeValue().toInt();
+                else if ( subSubNode.nodeName() == "annotation" )
+                    track.annotation = subSubNode.firstChild().nodeValue();
+                else if ( subSubNode.nodeName() == "album" )
+                    track.album = subSubNode.firstChild().nodeValue();
+                else if ( subSubNode.nodeName() == "trackNum" )
+                    track.trackNum = (uint)subSubNode.firstChild().nodeValue().toInt();
+                else if ( subSubNode.nodeName() == "identifier" )
+                    track.identifier = subSubNode.firstChild().nodeValue();
+                else if ( subSubNode.nodeName() == "info" )
+                    track.info = subSubNode.firstChild().nodeValue();
+                else if ( subSubNode.nodeName() == "image" )
+                    track.image = subSubNode.firstChild().nodeValue();
+                else if ( subSubNode.nodeName() == "link" )
+                    track.link = subSubNode.firstChild().nodeValue();
+
+                subSubNode = subSubNode.nextSibling();
+            }
+        }
+        list.append( track );
+        subNode = subNode.nextSibling();
+    }
+
+    debug() << "returning " << list.size() << "tracks";
+    return list;
+}
+
+
+//documentation of attributes from http://www.xspf.org/xspf-v1.html
+void
+XSPFPlaylist::setTrackList( Meta::TrackList trackList, bool append )
+{
+    DEBUG_BLOCK
+
+    if ( documentElement().namedItem( "trackList" ).isNull() )
+        documentElement().appendChild( createElement( "trackList" ) );
+
+    QDomNode node = createElement( "trackList" );
+    XSPFTrackList::iterator it;
+
+    Meta::TrackPtr track;
+    foreach( track, trackList ) // krazy:exclude=foreach
+    {
+        QDomNode subNode = createElement( "track" );
+
+        //URI of resource to be rendered.
+        QDomNode location = createElement( "location" );
+
+        //Human-readable name of the track that authored the resource
+        QDomNode title = createElement( "title" );
+
+        //Human-readable name of the entity that authored the resource.
+        QDomNode creator = createElement( "creator" );
+
+        //A human-readable comment on the track.
+        QDomNode annotation = createElement( "annotation" );
+
+        //Human-readable name of the collection from which the resource comes
+        QDomNode album = createElement( "album" );
+
+        //Integer > 0 giving the ordinal position of the media in the album.
+        QDomNode trackNum = createElement( "trackNum" );
+
+        //The time to render a resource, in milliseconds. It MUST be a nonNegativeInteger.
+        QDomNode duration = createElement( "duration" );
+
+        //location-independent name, such as a MusicBrainz identifier. MUST be a legal URI.
+        QDomNode identifier = createElement( "identifier" );
+
+        //info - URI of a place where this resource can be bought or more info can be found.
+        //QDomNode info = createElement( "info" );
+
+        //image - URI of an image to display for the duration of the track.
+        //QDomNode image = createElement( "image" );
+
+        //link - element allows XSPF to be extended without the use of XML namespaces.
+        //QDomNode link = createElement( "link" );
+
+        //QDomNode meta
+        //QDomNode extension
+
+        #define APPENDNODE( X, Y ) \
+        { \
+            X.appendChild( createTextNode( Y ) );    \
+            subNode.appendChild( X ); \
+        }
+
+        if ( !track->playableUrl().url().isEmpty() )
+            APPENDNODE( location, track->playableUrl().url() )
+        else
+            APPENDNODE( location, track->uidUrl() )
+
+        APPENDNODE( identifier, track->uidUrl() )
+
+        Meta::StreamInfoCapability *streamInfo = track->create<Meta::StreamInfoCapability>();
+        if( streamInfo ) // We have a stream, use it's metadata instead of the tracks.
+        {
+            if( !streamInfo->streamName().isEmpty() )
+                APPENDNODE( title, streamInfo->streamName() )
+            if( !streamInfo->streamSource().isEmpty() )
+                APPENDNODE( creator, streamInfo->streamSource() )
+
+            delete streamInfo;
+        }
+        else
+        {
+            if ( !track->name().isEmpty() )
+                APPENDNODE(title, track->name() )
+            if ( track->artist() && !track->artist()->name().isEmpty() )
+                APPENDNODE(creator, track->artist()->name() );
+        }
+        if ( !track->comment().isEmpty() )
+            APPENDNODE(annotation, track->comment() );
+        if ( track->album() && !track->album()->name().isEmpty() )
+            APPENDNODE( album, track->album()->name() );
+        if ( track->trackNumber() > 0 )
+            APPENDNODE( trackNum, QString::number( track->trackNumber() ) );
+        if ( track->length() > 0 )
+            APPENDNODE( duration, QString::number( track->length() ) );
+        node.appendChild( subNode );
+    }
+    #undef APPENDNODE
+
+    if ( append )
+    {
+        while ( !node.isNull() )
+        {
+            documentElement().namedItem( "trackList" ).appendChild( node.firstChild() );
+            node = node.nextSibling();
+        }
+    }
+    else
+        documentElement().replaceChild( node, documentElement().namedItem( "trackList" ) );
+
+    //write changes to file directly if we know where.
+    if( !m_url.isEmpty() )
+        save( m_url, false );
+}
+
+bool
+XSPFPlaylist::hasCapabilityInterface( Capability::Type type ) const
+{
+    switch( type )
+    {
+        case Capability::EditablePlaylist: return true; break;
+        default: return false; break;
+    }
+}
+
+Capability*
+XSPFPlaylist::createCapabilityInterface( Capability::Type type )
+{
+    switch( type )
+    {
+        case Capability::EditablePlaylist: return static_cast<EditablePlaylistCapability *>(this);
+        default: return 0;
+    }
+}
+
+bool
+XSPFPlaylist::isWritable()
+{
+    if( m_url.isEmpty() )
+        return false;
+
+    return QFileInfo( m_url.path() ).isWritable();
+}
+
+void
+XSPFPlaylist::setName( const QString &name )
+{
+    DEBUG_BLOCK
+
+    //can't save to a new file if we don't know where.
+    if( !m_url.isEmpty() && !name.isEmpty() )
+    {
+        if( QFileInfo( m_url.toLocalFile() ).exists() )
+        {
+            debug() << "Deleting old playlist file:" << m_url.toLocalFile();
+            QFile::remove( m_url.toLocalFile() );
+        }
+        m_url.setFileName( name + ( name.endsWith( ".xspf", Qt::CaseInsensitive ) ? "" : ".xspf" ) );
+        debug() << "new url:" << m_url;
+    }
+    //setTitle will save if there is a url.
+    setTitle( name );
+}
+
+} //namespace Meta
diff --git a/src/core/playlists/impl/file/xspf/XSPFPlaylist.h b/src/core/playlists/impl/file/xspf/XSPFPlaylist.h
new file mode 100644
index 0000000..1a06394
--- /dev/null
+++ b/src/core/playlists/impl/file/xspf/XSPFPlaylist.h
@@ -0,0 +1,148 @@
+/****************************************************************************************
+ * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
+ * Copyright (c) 2006 Mattias Fliesberg <mattias.fliesberg at gmail.com>                   *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef XSPFPLAYLIST_H
+#define XSPFPLAYLIST_H
+
+#include "core/playlists/impl/file/PlaylistFile.h"
+#include "core/capabilities/EditablePlaylistCapability.h"
+
+#include <QDomDocument>
+#include <QTextStream>
+
+class QTextStream;
+class KUrl;
+
+namespace Meta
+{
+class XSPFPlaylist;
+
+typedef KSharedPtr<XSPFPlaylist> XSPFPlaylistPtr;
+typedef QList<XSPFPlaylistPtr> XSPFPlaylistList;
+
+/* convenience struct for internal use */
+typedef struct {
+    KUrl location;
+    QString identifier;
+    QString title;
+    QString creator;
+    QString annotation;
+    KUrl info;
+    KUrl image;
+    QString album;
+    uint trackNum;
+    uint duration;
+    KUrl link;
+} XSPFTrack;
+
+typedef QList<XSPFTrack> XSPFTrackList;
+
+/**
+	@author Bart Cerneels <bart.cerneels at kde.org>
+*/
+class AMAROK_EXPORT XSPFPlaylist : public PlaylistFile, public QDomDocument,
+            public EditablePlaylistCapability
+{
+public:
+    XSPFPlaylist();
+
+    /**
+    * Creates a new XSPFPlaylist and starts loading the xspf file of the url.
+    * @param url The Url of the xspf file to load.
+    * @param autoAppend Should this playlist automatically append itself to the playlist when loaded (useful when loading a remote url as it
+    * allows the caller to do it in a "one shot" way and not have to worry about waiting untill download and parsing is completed.
+    */
+    explicit XSPFPlaylist( const KUrl &url, bool autoAppend = false );
+    XSPFPlaylist( Meta::TrackList list );
+
+    ~XSPFPlaylist();
+
+    virtual QString name() const { return title(); }
+    virtual QString prettyName() const { return name(); }
+    virtual QString description() const;
+
+    /** returns all tracks in this playlist */
+    TrackList tracks();
+    virtual void addTrack( Meta::TrackPtr track, int position = -1 );
+    virtual void removeTrack( int position );
+
+    /* convenience functions */
+    QString title() const;
+    QString creator() const;
+    QString annotation() const;
+    KUrl info() const;
+    KUrl location() const;
+    QString identifier() const;
+    KUrl image() const;
+    QDateTime date() const;
+    KUrl license() const;
+    KUrl::List attribution() const ;
+    KUrl link() const;
+
+    /* EditablePlaylistCapability virtual functions */
+    void setTitle( const QString &title );
+    void setCreator( const QString &creator );
+    void setAnnotation( const QString &annotation );
+    void setInfo( const KUrl &info );
+    void setLocation( const KUrl &location );
+    void setIdentifier( const QString &identifier );
+    void setImage( const KUrl &image );
+    void setDate( const QDateTime &date );
+    void setLicense( const KUrl &license );
+    void setAttribution( const KUrl &attribution, bool append = true );
+    void setLink( const KUrl &link );
+    void setTrackList( TrackList trackList, bool append = false );
+
+    //TODO: implement these
+    void beginMetaDataUpdate() {}
+    void endMetaDataUpdate() {}
+    void abortMetaDataUpdate() {}
+
+    bool isEditable() const { return true; }
+
+    /* Meta::Playlist virtual functions */
+    bool hasCapabilityInterface( Capability::Type type ) const;
+
+    KUrl retrievableUrl() { return m_url; }
+
+    Capability* createCapabilityInterface( Capability::Type type );
+
+    /* PlaylistFile methods */
+    bool isWritable();
+    /** Changes both the filename and the title in XML */
+    void setName( const QString &name );
+    bool load( QTextStream &stream ) { return loadXSPF( stream ); }
+    /** save to location, relative is unused since XSPF mandates absolute paths */
+    bool save( const KUrl &location, bool relative );
+
+private:
+    XSPFTrackList trackList();
+    bool loadXSPF( QTextStream& );
+    bool m_tracksLoaded;
+    //cache for the tracklist since a tracks() is a called *a lot*.
+    TrackList m_tracks;
+
+    KUrl m_url;
+    bool m_autoAppendAfterLoad;
+};
+
+}
+
+Q_DECLARE_METATYPE( Meta::XSPFPlaylistPtr )
+Q_DECLARE_METATYPE( Meta::XSPFPlaylistList )
+
+#endif
diff --git a/src/core/playlists/providers/user/UserPlaylistProvider.cpp b/src/core/playlists/providers/user/UserPlaylistProvider.cpp
new file mode 100644
index 0000000..7bf1bea
--- /dev/null
+++ b/src/core/playlists/providers/user/UserPlaylistProvider.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "UserPlaylistProvider.h"
+
+
+UserPlaylistProvider::~UserPlaylistProvider()
+{
+}
+
+int
+UserPlaylistProvider::category() const
+{
+     return Meta::UserPlaylist;
+}
+
+bool
+UserPlaylistProvider::supportsEmptyGroups()
+{
+    return false;
+}
+
+QList<QAction *>
+UserPlaylistProvider::playlistActions( Meta::PlaylistPtr playlist )
+{
+    Q_UNUSED( playlist );
+    return QList<QAction *>();
+}
+
+QList<QAction *>
+UserPlaylistProvider::trackActions( Meta::PlaylistPtr playlist, int trackIndex )
+{
+    Q_UNUSED( playlist );
+    Q_UNUSED( trackIndex );
+    return QList<QAction *>();
+}
+
+#include "UserPlaylistProvider.moc"
diff --git a/src/core/playlists/providers/user/UserPlaylistProvider.h b/src/core/playlists/providers/user/UserPlaylistProvider.h
new file mode 100644
index 0000000..e108a34
--- /dev/null
+++ b/src/core/playlists/providers/user/UserPlaylistProvider.h
@@ -0,0 +1,68 @@
+/****************************************************************************************
+ * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
+ * Copyright (c) 2008 Bart Cerneels <bart.cerneels at kde.org>                             *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef USERPLAYLISTPROVIDER_H
+#define USERPLAYLISTPROVIDER_H
+
+#include "core/playlists/Playlist.h"
+#include "core/playlists/PlaylistProvider.h"
+
+class QAction;
+
+/**
+    @author Bart Cerneels <bart.cerneels at kde.org>
+*/
+class AMAROK_EXPORT UserPlaylistProvider : public PlaylistProvider
+{
+    Q_OBJECT
+    public:
+        virtual ~UserPlaylistProvider();
+
+        /* PlaylistProvider functions */
+        virtual int category() const;
+
+        /* UserPlaylistProvider functions */
+        /**
+            @returns true if this provider supports - and is currently able to - save playlists
+        **/
+        virtual bool canSavePlaylists() = 0;
+
+        /**
+            Save a list of tracks as a playlist in the database.
+            @returns a non-null Meta::PlaylistPtr if successful
+        **/
+        virtual Meta::PlaylistPtr save( const Meta::TrackList &tracks ) = 0;
+
+        virtual Meta::PlaylistPtr save( const Meta::TrackList &tracks, const QString& name ) = 0;
+
+        virtual bool supportsEmptyGroups();
+
+        virtual QList<QAction *> playlistActions( Meta::PlaylistPtr playlist );
+        virtual QList<QAction *> trackActions( Meta::PlaylistPtr playlist,
+                                                  int trackIndex );
+
+        // UserPlaylistProvider-specific
+
+        virtual bool isWritable() { return false; }
+        virtual void rename( Meta::PlaylistPtr playlist, const QString &newName ) {Q_UNUSED( playlist ) Q_UNUSED(newName)}
+        virtual void deletePlaylists( Meta::PlaylistList playlistlist ) { Q_UNUSED( playlistlist ) }
+
+    signals:
+            void updated();
+};
+
+#endif
diff --git a/src/core/statistics/StatisticsProvider.cpp b/src/core/statistics/StatisticsProvider.cpp
new file mode 100644
index 0000000..86e98f0
--- /dev/null
+++ b/src/core/statistics/StatisticsProvider.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "StatisticsProvider.h"
+
+#include "Amarok.h"
+#include "Debug.h"
+
+Meta::StatisticsProvider::StatisticsProvider()
+        : m_score( 0.0 )
+        , m_rating( 0 )
+        , m_playCount( 0 )
+{
+}
+
+Meta::StatisticsProvider::~StatisticsProvider()
+{
+}
+
+void
+Meta::StatisticsProvider::played( double playedFraction )
+{
+    DEBUG_BLOCK
+
+    debug() << "called with playedFraction = " << playedFraction;
+    m_lastPlayed = QDateTime::currentDateTime();
+    if( !m_firstPlayed.isValid() )
+    {
+        m_firstPlayed = QDateTime::currentDateTime();
+    }
+    m_playCount++;
+    m_score = Amarok::computeScore( m_score, m_playCount, playedFraction );
+    save();
+}
+
+QDateTime
+Meta::StatisticsProvider::firstPlayed() const
+{
+    return m_firstPlayed;
+}
+
+void
+Meta::StatisticsProvider::setFirstPlayed( const QDateTime &dt )
+{
+    m_firstPlayed = dt;
+    save();
+}
+
+QDateTime
+Meta::StatisticsProvider::lastPlayed() const
+{
+    return m_lastPlayed;
+}
+
+void
+Meta::StatisticsProvider::setLastPlayed( const QDateTime &dt )
+{
+    m_lastPlayed = dt;
+    save();
+}
+
+int
+Meta::StatisticsProvider::playCount() const
+{
+    return m_playCount;
+}
+
+void
+Meta::StatisticsProvider::setPlayCount( int playCount )
+{
+    m_playCount = playCount;
+    save();
+}
+
+int
+Meta::StatisticsProvider::rating() const
+{
+    return m_rating;
+}
+
+double
+Meta::StatisticsProvider::score() const
+{
+    return m_score;
+}
+
+void
+Meta::StatisticsProvider::setRating( int newRating )
+{
+    m_rating = newRating;
+    save();
+}
+
+void
+Meta::StatisticsProvider::setScore( double newScore )
+{
+    m_score = newScore;
+    save();
+}
diff --git a/src/core/statistics/StatisticsProvider.h b/src/core/statistics/StatisticsProvider.h
new file mode 100644
index 0000000..bb1fce8
--- /dev/null
+++ b/src/core/statistics/StatisticsProvider.h
@@ -0,0 +1,62 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef META_STATISTICSPROVIDER_H
+#define META_STATISTICSPROVIDER_H
+
+#include "amarok_export.h"
+
+#include <QDateTime>
+
+namespace Meta
+{
+    class AMAROK_EXPORT StatisticsProvider
+    {                
+        public:
+            StatisticsProvider();
+            virtual ~StatisticsProvider();
+
+             /** Returns the score of this track */
+            double score() const;
+            void setScore( double newScore );
+            /** Returns the rating of this track */
+            int rating() const;
+            void setRating( int newRating );
+            /** Returns the time the song was last played, or 0 if it has not been played yet */
+            QDateTime lastPlayed() const;
+            void setLastPlayed( const QDateTime &dt );
+            /** Returns the time the song was first played, or 0 if it has not been played yet */
+            QDateTime firstPlayed() const;
+            void setFirstPlayed( const QDateTime &dt );
+
+            /** Returns the number of times the track was played (what about unknown?)*/
+            int playCount() const;
+            void setPlayCount( int playCount );
+            /** indicate to the statistics provider that a song was played */
+            void played( double playedFraction );
+
+        protected:
+            virtual void save() = 0;
+
+            QDateTime m_lastPlayed;
+            QDateTime m_firstPlayed;
+            double m_score;
+            int m_rating;
+            int m_playCount;
+    };
+}
+
+#endif
diff --git a/src/core/statistics/providers/tag/TagStatisticsProvider.cpp b/src/core/statistics/providers/tag/TagStatisticsProvider.cpp
new file mode 100644
index 0000000..3e6749a
--- /dev/null
+++ b/src/core/statistics/providers/tag/TagStatisticsProvider.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "TagStatisticsProvider.h"
+
+#include "collection/CollectionManager.h"
+#include "collection/SqlStorage.h"
+
+TagStatisticsProvider::TagStatisticsProvider( const QString &name, const QString &artist, const QString &album )
+        : StatisticsProvider()
+        , m_name( name )
+        , m_artist( artist )
+        , m_album( album )
+{
+    SqlStorage *sql = CollectionManager::instance()->sqlStorage();
+
+    const QString query = "SELECT firstPlayed, lastPlayed, score, rating, playcount FROM "
+                          "statistics_tag WHERE name = '%1' AND artist = '%2' AND album = '%3'";
+    QStringList result = sql->query( query.arg( sql->escape( name ),
+                                                sql->escape( artist ),
+                                                sql->escape( album ) ) );
+    if( !result.isEmpty() )
+    {
+        m_firstPlayed = QDateTime::fromString( result.value( 0 ), "yy-MM-dd hh:mm:ss" );
+        m_lastPlayed = QDateTime::fromString( result.value( 1 ), "yy-MM-dd hh:mm:ss" );
+        m_score = result.value( 2 ).toDouble();
+        m_rating = result.value( 3 ).toInt();
+        m_playCount = result.value( 4 ).toInt();
+    }
+}
+
+void
+TagStatisticsProvider::save()
+{
+    SqlStorage *sql = CollectionManager::instance()->sqlStorage();
+
+    const QString check = "SELECT COUNT(*) FROM statistics_tag WHERE name = '%1' "
+                          "AND artist = '%2' AND album = '%3'";
+    QStringList rsCheck = sql->query( check.arg( sql->escape( m_name ),
+                                                 sql->escape( m_artist ),
+                                                 sql->escape( m_album ) ) );
+    if( !rsCheck.isEmpty() )
+    {
+        QString sqlString;
+        if( rsCheck.first().toInt() )
+        {
+            sqlString = "UPDATE statistics_tag SET firstPlayed = '%1',lastPlayed = '%2',"
+                        "score = %3,rating = %4,playcount=%5 WHERE name = '%6' "
+                        "AND artist = '%7' AND album = '%8'";
+        }
+        else
+        {
+            sqlString = "INSERT INTO statistics_tag(firstPlayed,lastPlayed,score,"
+                        "rating,playcount,name,artist,album) "
+                        "VALUE ('%1','%2',%3,%4,%5,'%6','%7','%8')";
+        }
+        sqlString = sqlString.arg( m_firstPlayed.toString( "yy-MM-dd hh:mm:ss" ),
+                                   m_lastPlayed.toString( "yy-MM-dd hh:mm:ss" ),
+                                   QString::number( m_score ),
+                                   QString::number( m_rating ),
+                                   QString::number( m_playCount ),
+                                   sql->escape( m_name ),
+                                   sql->escape( m_artist ),
+                                   sql->escape( m_album ) );
+        sql->query( sqlString );
+    }
+}
+
diff --git a/src/core/statistics/providers/tag/TagStatisticsProvider.h b/src/core/statistics/providers/tag/TagStatisticsProvider.h
new file mode 100644
index 0000000..8faa97e
--- /dev/null
+++ b/src/core/statistics/providers/tag/TagStatisticsProvider.h
@@ -0,0 +1,40 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef TAGSTATISTICSPROVIDER_H
+#define TAGSTATISTICSPROVIDER_H
+
+#include "core/statistics/StatisticsProvider.h"
+
+#include "Amarok.h"
+
+#include <QString>
+
+class AMAROK_EXPORT TagStatisticsProvider : public Meta::StatisticsProvider
+{
+public:
+    TagStatisticsProvider( const QString &name, const QString &artist, const QString &album );
+
+protected:
+    virtual void save();
+
+private:
+    QString m_name;
+    QString m_artist;
+    QString m_album;
+};
+
+#endif // PERMANENTURLSTATISTICSPROVIDER_H
diff --git a/src/core/statistics/providers/url/PermanentUrlStatisticsProvider.cpp b/src/core/statistics/providers/url/PermanentUrlStatisticsProvider.cpp
new file mode 100644
index 0000000..99b3c3f
--- /dev/null
+++ b/src/core/statistics/providers/url/PermanentUrlStatisticsProvider.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#include "PermanentUrlStatisticsProvider.h"
+
+#include "collection/CollectionManager.h"
+#include "collection/SqlStorage.h"
+
+#include "Debug.h"
+
+PermanentUrlStatisticsProvider::PermanentUrlStatisticsProvider( const QString &permanentUrl )
+        : StatisticsProvider()
+        , m_permanentUrl( permanentUrl )
+{
+    SqlStorage *sql = CollectionManager::instance()->sqlStorage();
+    if( !sql )
+    {
+        debug() << "Could not get SqlStorage, aborting" << endl;
+        return;
+    }
+
+
+    const QString query = "SELECT firstplayed, lastplayed, score, rating, playcount FROM "
+                          "statistics_permanent WHERE url = '%1'";
+    QStringList result = sql->query( query.arg( sql->escape( permanentUrl ) ) );
+    if( !result.isEmpty() )
+    {
+        m_firstPlayed = QDateTime::fromString( result.value( 0 ), "yy-MM-dd hh:mm:ss" );
+        m_lastPlayed = QDateTime::fromString( result.value( 1 ), "yy-MM-dd hh:mm:ss" );
+        m_score = result.value( 2 ).toDouble();
+        m_rating = result.value( 3 ).toInt();
+        m_playCount = result.value( 4 ).toInt();
+    }
+}
+
+void
+PermanentUrlStatisticsProvider::save()
+{
+    SqlStorage *sql = CollectionManager::instance()->sqlStorage();
+    if( !sql )
+    {
+        debug() << "Could not get SqlStorage, aborting" << endl;
+        return;
+    }
+
+    const QString check = "SELECT COUNT(*) FROM statistics_permanent WHERE url = '%1'";
+    QStringList rsCheck = sql->query( check.arg( sql->escape( m_permanentUrl ) ) );
+    if( !rsCheck.isEmpty() )
+    {
+        QString sqlString;
+        if( rsCheck.first().toInt() )
+        {
+            sqlString = "UPDATE statistics_permanent SET firstplayed = '%1',lastplayed = '%2',"
+                        "score = %3,rating = %4,playcount=%5 WHERE url = '%6'";
+        }
+        else
+        {
+            sqlString = "INSERT INTO statistics_permanent(firstplayed,lastplayed,score,"
+                        "rating,playcount,url) VALUE ('%1','%2',%3,%4,%5,'%6')";
+        }
+        sqlString = sqlString.arg( m_firstPlayed.toString( "yy-MM-dd hh:mm:ss" ),
+                                   m_lastPlayed.toString( "yy-MM-dd hh:mm:ss" ),
+                                   QString::number( m_score ),
+                                   QString::number( m_rating ),
+                                   QString::number( m_playCount ),
+                                   sql->escape( m_permanentUrl ) );
+        sql->query( sqlString );
+    }
+}
+
diff --git a/src/core/statistics/providers/url/PermanentUrlStatisticsProvider.h b/src/core/statistics/providers/url/PermanentUrlStatisticsProvider.h
new file mode 100644
index 0000000..9af916e
--- /dev/null
+++ b/src/core/statistics/providers/url/PermanentUrlStatisticsProvider.h
@@ -0,0 +1,38 @@
+/****************************************************************************************
+ * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
+ *                                                                                      *
+ * This program is free software; you can redistribute it and/or modify it under        *
+ * the terms of the GNU General Public License as published by the Free Software        *
+ * Foundation; either version 2 of the License, or (at your option) any later           *
+ * version.                                                                             *
+ *                                                                                      *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
+ *                                                                                      *
+ * You should have received a copy of the GNU General Public License along with         *
+ * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
+ ****************************************************************************************/
+
+#ifndef PERMANENTURLSTATISTICSPROVIDER_H
+#define PERMANENTURLSTATISTICSPROVIDER_H
+
+#include "core/statistics/StatisticsProvider.h"
+
+#include "amarok_export.h"
+
+#include <QString>
+
+class AMAROK_EXPORT PermanentUrlStatisticsProvider : public Meta::StatisticsProvider
+{
+public:
+    PermanentUrlStatisticsProvider( const QString &permanentUrl );
+
+protected:
+    virtual void save();
+
+private:
+    QString m_permanentUrl;
+};
+
+#endif // PERMANENTURLSTATISTICSPROVIDER_H
diff --git a/src/covermanager/CoverFetchQueue.h b/src/covermanager/CoverFetchQueue.h
index a06ade2..3578efb 100644
--- a/src/covermanager/CoverFetchQueue.h
+++ b/src/covermanager/CoverFetchQueue.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_COVERFETCHQUEUE_H
 #define AMAROK_COVERFETCHQUEUE_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "CoverFetchUnit.h"
 
 #include <KIO/Job>
diff --git a/src/covermanager/CoverFetchUnit.h b/src/covermanager/CoverFetchUnit.h
index 42076e1..db969e0 100644
--- a/src/covermanager/CoverFetchUnit.h
+++ b/src/covermanager/CoverFetchUnit.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_COVERFETCHUNIT_H
 #define AMAROK_COVERFETCHUNIT_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <KSharedPtr>
 
diff --git a/src/covermanager/CoverFetcher.h b/src/covermanager/CoverFetcher.h
index 57d40c6..d6bc047 100644
--- a/src/covermanager/CoverFetcher.h
+++ b/src/covermanager/CoverFetcher.h
@@ -20,7 +20,7 @@
 #ifndef AMAROK_COVERFETCHER_H
 #define AMAROK_COVERFETCHER_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "CoverFetchUnit.h"
 
 #include <QHash>
diff --git a/src/covermanager/CoverFetchingActions.h b/src/covermanager/CoverFetchingActions.h
index dbbd570..a3d2112 100644
--- a/src/covermanager/CoverFetchingActions.h
+++ b/src/covermanager/CoverFetchingActions.h
@@ -17,7 +17,7 @@
 #ifndef COVERFETCHINGACTIONS_H
 #define COVERFETCHINGACTIONS_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QAction>
 
diff --git a/src/covermanager/CoverFoundDialog.h b/src/covermanager/CoverFoundDialog.h
index 7532add..b2ba4e7 100644
--- a/src/covermanager/CoverFoundDialog.h
+++ b/src/covermanager/CoverFoundDialog.h
@@ -21,7 +21,7 @@
 #define AMAROK_COVERFOUNDDIALOG_H
 
 #include "CoverFetchUnit.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <KDialog>
 #include <KVBox>
diff --git a/src/covermanager/CoverManager.cpp b/src/covermanager/CoverManager.cpp
index 6da2bf4..94e1898 100644
--- a/src/covermanager/CoverManager.cpp
+++ b/src/covermanager/CoverManager.cpp
@@ -26,8 +26,8 @@
 #include "CollectionManager.h"
 #include "CompoundProgressBar.h"
 #include "Debug.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "meta/Meta.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/meta/Meta.h"
 #include "QueryMaker.h"
 #include <config-amarok.h>
 #include "PixmapViewer.h"
diff --git a/src/covermanager/CoverViewDialog.h b/src/covermanager/CoverViewDialog.h
index f347cc8..ede3aca 100644
--- a/src/covermanager/CoverViewDialog.h
+++ b/src/covermanager/CoverViewDialog.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_COVERVIEWDIALOG_H
 #define AMAROK_COVERVIEWDIALOG_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "widgets/PixmapViewer.h"
 
 #include <KApplication>
diff --git a/src/databaseimporter/DatabaseImporter.h b/src/databaseimporter/DatabaseImporter.h
index d638bd9..a49e6d8 100644
--- a/src/databaseimporter/DatabaseImporter.h
+++ b/src/databaseimporter/DatabaseImporter.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_DATABASE_IMPORTER_H
 #define AMAROK_DATABASE_IMPORTER_H
 
-#include <meta/Meta.h>
+#include "core/meta/Meta.h"
 
 #include <KVBox>
 
diff --git a/src/databaseimporter/amarok14/FastForwardWorker.cpp b/src/databaseimporter/amarok14/FastForwardWorker.cpp
index 51d3403..022e1c5 100644
--- a/src/databaseimporter/amarok14/FastForwardWorker.cpp
+++ b/src/databaseimporter/amarok14/FastForwardWorker.cpp
@@ -21,9 +21,9 @@
 #include "CollectionLocation.h"
 #include "Debug.h"
 #include "collection/support/FileCollectionLocation.h"
-#include "StatisticsCapability.h"
-#include "meta/impl/file/File.h"
-#include "meta/support/MetaConstants.h"
+#include "core/capabilities/StatisticsCapability.h"
+#include "core/meta/impl/file/File.h"
+#include "core/meta/support/MetaConstants.h"
 
 #include <kio/job.h>
 #include <kio/jobclasses.h>
diff --git a/src/databaseimporter/amarok14/FastForwardWorker.h b/src/databaseimporter/amarok14/FastForwardWorker.h
index 5ce5b81..f91f2e2 100644
--- a/src/databaseimporter/amarok14/FastForwardWorker.h
+++ b/src/databaseimporter/amarok14/FastForwardWorker.h
@@ -19,7 +19,7 @@
 
 #include "FastForwardImporter.h"
 #include "databaseimporter/DatabaseImporter.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <threadweaver/Job.h>
 #include <threadweaver/ThreadWeaver.h>
diff --git a/src/databaseimporter/itunes/ITunesImporterWorker.cpp b/src/databaseimporter/itunes/ITunesImporterWorker.cpp
index e34f9a6..64b2354 100644
--- a/src/databaseimporter/itunes/ITunesImporterWorker.cpp
+++ b/src/databaseimporter/itunes/ITunesImporterWorker.cpp
@@ -22,8 +22,8 @@
 #include "CollectionLocation.h"
 #include "Debug.h"
 #include "collection/support/FileCollectionLocation.h"
-#include "StatisticsCapability.h"
-#include "meta/impl/file/File.h"
+#include "core/capabilities/StatisticsCapability.h"
+#include "core/meta/impl/file/File.h"
 
 #include <kio/job.h>
 #include <kio/jobclasses.h>
diff --git a/src/databaseimporter/itunes/ITunesImporterWorker.h b/src/databaseimporter/itunes/ITunesImporterWorker.h
index b82ebc8..3ceaa69 100644
--- a/src/databaseimporter/itunes/ITunesImporterWorker.h
+++ b/src/databaseimporter/itunes/ITunesImporterWorker.h
@@ -18,7 +18,7 @@
 #define AMAROK_ITUNES_IMPORTER_WORKER_H
 
 #include "databaseimporter/DatabaseImporter.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <threadweaver/Job.h>
 #include <threadweaver/ThreadWeaver.h>
diff --git a/src/dbus/DBusQueryHelper.cpp b/src/dbus/DBusQueryHelper.cpp
index 235b2df..a22ea27 100644
--- a/src/dbus/DBusQueryHelper.cpp
+++ b/src/dbus/DBusQueryHelper.cpp
@@ -18,7 +18,7 @@
 
 #include "Debug.h"
 #include "collection/QueryMaker.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 
 #include <QTimer>
 
diff --git a/src/dbus/DBusQueryHelper.h b/src/dbus/DBusQueryHelper.h
index 1bbb474..4a2fa14 100644
--- a/src/dbus/DBusQueryHelper.h
+++ b/src/dbus/DBusQueryHelper.h
@@ -17,7 +17,7 @@
 #ifndef DBUSQUERYHELPER_H
 #define DBUSQUERYHELPER_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QDBusConnection>
 #include <QDBusMessage>
diff --git a/src/dbus/PlayerDBusHandler.cpp b/src/dbus/PlayerDBusHandler.cpp
index ec2bb14..6f98a0e 100644
--- a/src/dbus/PlayerDBusHandler.cpp
+++ b/src/dbus/PlayerDBusHandler.cpp
@@ -22,8 +22,8 @@
 #include "App.h"
 #include "Debug.h"
 #include "EngineController.h"
-#include "meta/Meta.h"
-#include "support/MetaUtility.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaUtility.h"
 #include "PlayerAdaptor.h"
 #include "playlist/PlaylistActions.h"
 #include "playlist/PlaylistModelStack.h"
diff --git a/src/dbus/PlayerDBusHandler.h b/src/dbus/PlayerDBusHandler.h
index d9973c1..07c4f06 100644
--- a/src/dbus/PlayerDBusHandler.h
+++ b/src/dbus/PlayerDBusHandler.h
@@ -18,7 +18,7 @@
 #ifndef PLAYER_DBUS_HANDLER_H
 #define PLAYER_DBUS_HANDLER_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "EngineObserver.h"
 
 #include <QObject>
diff --git a/src/dialogs/DatabaseImporterDialog.h b/src/dialogs/DatabaseImporterDialog.h
index 203faf6..488cbac 100644
--- a/src/dialogs/DatabaseImporterDialog.h
+++ b/src/dialogs/DatabaseImporterDialog.h
@@ -20,7 +20,7 @@
 #include <KAssistantDialog>    //baseclass
 
 #include "databaseimporter/DatabaseImporter.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QHash>
 
diff --git a/src/dialogs/EditFilterDialog.h b/src/dialogs/EditFilterDialog.h
index 857dbda..6e8c181 100644
--- a/src/dialogs/EditFilterDialog.h
+++ b/src/dialogs/EditFilterDialog.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_EDITFILTERDIALOG_H
 #define AMAROK_EDITFILTERDIALOG_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "ui_EditFilterDialog.h"
 
 #include <KDialog>
diff --git a/src/dialogs/OrganizeCollectionDialog.cpp b/src/dialogs/OrganizeCollectionDialog.cpp
index 8fcd6ab..3445d37 100644
--- a/src/dialogs/OrganizeCollectionDialog.cpp
+++ b/src/dialogs/OrganizeCollectionDialog.cpp
@@ -24,7 +24,7 @@
 #include "Amarok.h"
 #include "Debug.h"
 #include "amarokconfig.h"
-#include "meta/impl/file/File.h"
+#include "core/meta/impl/file/File.h"
 #include "QStringx.h"
 #include "ui_OrganizeCollectionDialogBase.h"
 
diff --git a/src/dialogs/OrganizeCollectionDialog.h b/src/dialogs/OrganizeCollectionDialog.h
index cadeb7b..cc541dd 100644
--- a/src/dialogs/OrganizeCollectionDialog.h
+++ b/src/dialogs/OrganizeCollectionDialog.h
@@ -19,7 +19,7 @@
 #define AMAROK_ORGANIZECOLLECTIONDIALOG_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "FilenameLayoutDialog.h"
 #include "widgets/TokenPool.h"
 
diff --git a/src/dialogs/TagDialog.cpp b/src/dialogs/TagDialog.cpp
index 9285599..6e6b5d5 100644
--- a/src/dialogs/TagDialog.cpp
+++ b/src/dialogs/TagDialog.cpp
@@ -31,18 +31,18 @@
 #include "SqlStorage.h"
 #include "covermanager/CoverFetchingActions.h"
 #include "Debug.h"
-#include "EditCapability.h"
+#include "core/capabilities/EditCapability.h"
 #include "FilenameLayoutDialog.h"
 #include "MainWindow.h"
 #include "MetaQueryMaker.h"
-#include "meta/support/MetaUtility.h"
-#include "capabilities/ReadLabelCapability.h"
-#include "capabilities/WriteLabelCapability.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/ReadLabelCapability.h"
+#include "core/capabilities/WriteLabelCapability.h"
 #include "QueryMaker.h"
 #include "statusbar/StatusBar.h"       //for status messages
 #include "TagGuesser.h"
 #include "ui_TagDialogBase.h"
-#include "UpdateCapability.h"
+#include "core/capabilities/UpdateCapability.h"
 
 #include <KGlobal>
 #include <KHTMLView>
diff --git a/src/dialogs/TagDialog.h b/src/dialogs/TagDialog.h
index b64e771..f2aacc1 100644
--- a/src/dialogs/TagDialog.h
+++ b/src/dialogs/TagDialog.h
@@ -26,7 +26,7 @@
 #include "playlist/PlaylistItem.h"
 #include "LabelListModel.h"
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <khtml_part.h>
 #include <KDialog>
diff --git a/src/dynamic/Bias.cpp b/src/dynamic/Bias.cpp
index b61fc93..2ff0783 100644
--- a/src/dynamic/Bias.cpp
+++ b/src/dynamic/Bias.cpp
@@ -27,7 +27,7 @@
 #include "Debug.h"
 #include "DynamicBiasWidgets.h"
 #include "DynamicModel.h"
-#include "meta/support/MetaConstants.h"
+#include "core/meta/support/MetaConstants.h"
 #include "MetaQueryMaker.h"
 #include "QueryMaker.h"
 #include "collection/support/XmlQueryWriter.h"
diff --git a/src/dynamic/Bias.h b/src/dynamic/Bias.h
index 2133f4e..526b74c 100644
--- a/src/dynamic/Bias.h
+++ b/src/dynamic/Bias.h
@@ -20,7 +20,7 @@
 #ifndef AMAROK_BIAS_H
 #define AMAROK_BIAS_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "collection/support/XmlQueryReader.h"
 
 #include <QDomElement>
diff --git a/src/dynamic/BiasSolver.cpp b/src/dynamic/BiasSolver.cpp
index f6d4cd8..554e87a 100644
--- a/src/dynamic/BiasSolver.cpp
+++ b/src/dynamic/BiasSolver.cpp
@@ -21,7 +21,7 @@
 #include "BiasSolver.h"
 #include "CollectionManager.h"
 #include "Debug.h"
-#include "meta/support/MetaConstants.h"
+#include "core/meta/support/MetaConstants.h"
 #include "TrackSet.h"
 
 #include <cmath>
diff --git a/src/dynamic/BiasSolver.h b/src/dynamic/BiasSolver.h
index 390e6cb..a23a7e0 100644
--- a/src/dynamic/BiasSolver.h
+++ b/src/dynamic/BiasSolver.h
@@ -20,7 +20,7 @@
 #define AMAROK_BIASSOLVER_H
 
 #include "Bias.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "TrackSet.h"
 
 #include <threadweaver/Job.h>
diff --git a/src/dynamic/BiasedPlaylist.h b/src/dynamic/BiasedPlaylist.h
index ede18e7..f1d5472 100644
--- a/src/dynamic/BiasedPlaylist.h
+++ b/src/dynamic/BiasedPlaylist.h
@@ -22,7 +22,7 @@
 #include "Bias.h"
 #include "BiasSolver.h"
 #include "DynamicPlaylist.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QDomElement>
 #include <QObject>
diff --git a/src/dynamic/DynamicPlaylist.h b/src/dynamic/DynamicPlaylist.h
index 847666a..ed92067 100644
--- a/src/dynamic/DynamicPlaylist.h
+++ b/src/dynamic/DynamicPlaylist.h
@@ -19,7 +19,7 @@
 #ifndef AMAROK_DYNAMICPLAYLIST_H
 #define AMAROK_DYNAMICPLAYLIST_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QDomElement>
 #include <QSharedData>
diff --git a/src/dynamic/TrackSet.h b/src/dynamic/TrackSet.h
index eb6d713..f3d1d92 100644
--- a/src/dynamic/TrackSet.h
+++ b/src/dynamic/TrackSet.h
@@ -19,7 +19,7 @@
 #ifndef AMAROK_TRACKSET_H
 #define AMAROK_TRACKSET_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QBitArray>
 
diff --git a/src/dynamic/biases/EchoNest.cpp b/src/dynamic/biases/EchoNest.cpp
index bb86fbd..94fe6d8 100644
--- a/src/dynamic/biases/EchoNest.cpp
+++ b/src/dynamic/biases/EchoNest.cpp
@@ -20,7 +20,7 @@
 #include "CollectionManager.h"
 #include "Debug.h"
 #include "EngineController.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "QueryMaker.h"
 #include "playlist/PlaylistModelStack.h"
 
diff --git a/src/mac/GrowlInterface.cpp b/src/mac/GrowlInterface.cpp
index e347f71..168bd83 100644
--- a/src/mac/GrowlInterface.cpp
+++ b/src/mac/GrowlInterface.cpp
@@ -20,7 +20,7 @@
 #include "App.h"
 #include "Debug.h"
 #include "EngineController.h"
-#include "meta/support/MetaUtility.h" // for secToPrettyTime
+#include "core/meta/support/MetaUtility.h" // for secToPrettyTime
 #include "TrayIcon.h"
 
 GrowlInterface::GrowlInterface( QString appName ) :
diff --git a/src/mac/GrowlInterface.h b/src/mac/GrowlInterface.h
index bbe61f9..7ac3681 100644
--- a/src/mac/GrowlInterface.h
+++ b/src/mac/GrowlInterface.h
@@ -23,7 +23,7 @@
 #include <QImage>
  
 #include "Debug.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "EngineController.h" 
 #include "EngineObserver.h"
     
diff --git a/src/meta/Meta.cpp b/src/meta/Meta.cpp
deleted file mode 100644
index b58296c..0000000
--- a/src/meta/Meta.cpp
+++ /dev/null
@@ -1,540 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- * Copyright (c) 2007 Ian Monroe <ian at monroe.nu>                                        *
- * Copyright (c) 2008 Mark Kretschmann <kretschmann at kde.org>                            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "Meta.h"
-
-#include "Amarok.h"
-#include "amarokconfig.h"
-#include "collection/Collection.h"
-#include "Debug.h"
-#include "collection/QueryMaker.h"
-#include "SvgHandler.h"
-
-#include <QDir>
-#include <QImage>
-
-#include <KStandardDirs>
-
-//Meta::Observer
-
-Meta::Observer::~Observer()
-{
-    // Unsubscribe all stray Meta subscriptions:
-
-    foreach( TrackPtr ptr, m_trackSubscriptions )
-        if( ptr )
-            ptr->unsubscribe( this );
-    foreach( ArtistPtr ptr, m_artistSubscriptions )
-        if( ptr )
-            ptr->unsubscribe( this );
-    foreach( AlbumPtr ptr, m_albumSubscriptions )
-        if( ptr )
-            ptr->unsubscribe( this );
-    foreach( GenrePtr ptr, m_genreSubscriptions )
-        if( ptr )
-            ptr->unsubscribe( this );
-    foreach( ComposerPtr ptr, m_composerSubscriptions )
-        if( ptr )
-            ptr->unsubscribe( this );
-    foreach( YearPtr ptr, m_yearSubscriptions )
-        if( ptr )
-            ptr->unsubscribe( this );
-}
-
-void
-Meta::Observer::subscribeTo( TrackPtr ptr )
-{
-    if( ptr ) {
-        ptr->subscribe( this );
-        m_trackSubscriptions.insert( ptr );
-    }
-}
-
-void
-Meta::Observer::unsubscribeFrom( TrackPtr ptr )
-{
-    if( ptr ) {
-        ptr->unsubscribe( this );
-        m_trackSubscriptions.remove( ptr );
-    }
-}
-
-void
-Meta::Observer::subscribeTo( ArtistPtr ptr )
-{
-    if( ptr ) {
-        ptr->subscribe( this );
-        m_artistSubscriptions.insert( ptr );
-    }
-}
-
-void
-Meta::Observer::unsubscribeFrom( ArtistPtr ptr )
-{
-    if( ptr ) {
-        ptr->unsubscribe( this );
-        m_artistSubscriptions.remove( ptr );
-    }
-}
-
-void
-Meta::Observer::subscribeTo( AlbumPtr ptr )
-{
-    if( ptr ) {
-        ptr->subscribe( this );
-        m_albumSubscriptions.insert( ptr );
-    }
-}
-
-void
-Meta::Observer::unsubscribeFrom( AlbumPtr ptr )
-{
-    if( ptr ) {
-        ptr->unsubscribe( this );
-        m_albumSubscriptions.remove( ptr );
-    }
-}
-
-void
-Meta::Observer::subscribeTo( ComposerPtr ptr )
-{
-    if( ptr ) {
-        ptr->subscribe( this );
-        m_composerSubscriptions.insert( ptr );
-    }
-}
-
-void
-Meta::Observer::unsubscribeFrom( ComposerPtr ptr )
-{
-    if( ptr ) {
-        ptr->unsubscribe( this );
-        m_composerSubscriptions.remove( ptr );
-    }
-}
-
-void
-Meta::Observer::subscribeTo( GenrePtr ptr )
-{
-    if( ptr ) {
-        ptr->subscribe( this );
-        m_genreSubscriptions.insert( ptr );
-    }
-}
-
-void
-Meta::Observer::unsubscribeFrom( GenrePtr ptr )
-{
-    if( ptr ) {
-        ptr->unsubscribe( this );
-        m_genreSubscriptions.remove( ptr );
-    }
-}
-
-void
-Meta::Observer::subscribeTo( YearPtr ptr )
-{
-    if( ptr ) {
-        ptr->subscribe( this );
-        m_yearSubscriptions.insert( ptr );
-    }
-}
-
-void
-Meta::Observer::unsubscribeFrom( YearPtr ptr )
-{
-    if( ptr ) {
-        ptr->unsubscribe( this );
-        m_yearSubscriptions.remove( ptr );
-    }
-}
-
-void
-Meta::Observer::metadataChanged( TrackPtr track )
-{
-    Q_UNUSED( track );
-}
-
-void
-Meta::Observer::metadataChanged( ArtistPtr artist )
-{
-    Q_UNUSED( artist );
-}
-
-void
-Meta::Observer::metadataChanged( AlbumPtr album )
-{
-    Q_UNUSED( album );
-}
-
-void
-Meta::Observer::metadataChanged( ComposerPtr composer )
-{
-    Q_UNUSED( composer );
-}
-
-void
-Meta::Observer::metadataChanged( GenrePtr genre )
-{
-    Q_UNUSED( genre );
-}
-
-void
-Meta::Observer::metadataChanged( YearPtr year )
-{
-    Q_UNUSED( year );
-}
-
-//Meta::MetaCapability
-
-bool
-Meta::MetaCapability::hasCapabilityInterface( Meta::Capability::Type type ) const
-{
-    Q_UNUSED( type );
-    return false;
-}
-
-Meta::Capability*
-Meta::MetaCapability::createCapabilityInterface( Meta::Capability::Type type )
-{
-    Q_UNUSED( type );
-    return 0;
-}
-
-//Meta::MetaBase
-
-void
-Meta::MetaBase::subscribe( Observer *observer )
-{
-    if( observer )
-        m_observers.insert( observer );
-}
-
-void
-Meta::MetaBase::unsubscribe( Observer *observer )
-{
-    m_observers.remove( observer );
-}
-
-//Meta::Track
-
-QString
-Meta::Track::prettyName() const
-{
-    if( !name().isEmpty() )
-        return name();
-    return prettyUrl();
-}
-
-bool
-Meta::Track::inCollection() const
-{
-    return false;
-}
-
-Amarok::Collection*
-Meta::Track::collection() const
-{
-    return 0;
-}
-
-QString
-Meta::Track::cachedLyrics() const
-{
-    return QString();
-}
-
-void
-Meta::Track::setCachedLyrics( const QString &lyrics )
-{
-    Q_UNUSED( lyrics )
-}
-
-void
-Meta::Track::addMatchTo( QueryMaker *qm )
-{
-    qm->addMatch( TrackPtr( this ) );
-}
-
-QDateTime
-Meta::Track::createDate() const
-{
-    return QDateTime();
-}
-qreal
-Meta::Track::replayGain( Meta::Track::ReplayGainMode mode ) const
-{
-    Q_UNUSED( mode )
-    return 0.0;
-}
-
-qreal
-Meta::Track::replayPeakGain( Meta::Track::ReplayGainMode mode ) const
-{
-    Q_UNUSED( mode )
-    return 0.0;
-}
-
-void
-Meta::Track::prepareToPlay()
-{
-}
-
-void
-Meta::Track::finishedPlaying( double /*playedFraction*/ )
-{
-}
-
-void
-Meta::Track::notifyObservers() const
-{
-    foreach( Observer *observer, m_observers )
-    {
-        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
-            observer->metadataChanged( Meta::TrackPtr( const_cast<Meta::Track*>(this) ) );
-    }
-}
-
-uint
-Meta::Track::firstPlayed() const
-{
-    return 0;
-}
-
-bool
-Meta::Track::operator==( const Meta::Track &track ) const
-{
-    return dynamic_cast<const void*>( this ) == dynamic_cast<const void*>( &track );
-}
-
-bool
-Meta::Track::lessThan( const Meta::TrackPtr& left, const Meta::TrackPtr& right )
-{
-    if( !left || !right ) // These should never be 0, but it can apparently happen (http://bugs.kde.org/show_bug.cgi?id=181187)
-        return false;
-
-    if( left->album() && right->album() )
-        if( left->album()->name() == right->album()->name() )
-        {
-            if( left->discNumber() < right->discNumber() )
-                return true;
-            else if( left->discNumber() > right->discNumber() )
-                return false;
-
-            if( left->trackNumber() < right->trackNumber() )
-                return true;
-            if( left->trackNumber() > right->trackNumber() )
-                return false;
-        }
-
-    if( left->artist() && right->artist() )
-    {
-        int compare = QString::localeAwareCompare( left->artist()->prettyName(), right->artist()->prettyName() );
-        if ( compare < 0 )
-            return true;
-        else if ( compare > 0 )
-            return false;
-    }
-
-    if( left->album() && right->album() )
-    {
-        int compare = QString::localeAwareCompare( left->album()->prettyName(), right->album()->prettyName() );
-        if ( compare < 0 )
-            return true;
-        else if ( compare > 0 )
-            return false;
-    }
-
-    return QString::localeAwareCompare( left->prettyName(), right->prettyName() ) < 0;
-}
-
-//Meta::Artist
-
-void
-Meta::Artist::addMatchTo( QueryMaker *qm )
-{
-    qm->addMatch( ArtistPtr( this ) );
-}
-
-void
-Meta::Artist::notifyObservers() const
-{
-    foreach( Observer *observer, m_observers )
-    {
-        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
-            observer->metadataChanged( Meta::ArtistPtr( const_cast<Meta::Artist*>(this) ) );
-    }
-}
-
-bool
-Meta::Artist::operator==( const Meta::Artist &artist ) const
-{
-    return dynamic_cast<const void*>( this ) == dynamic_cast<const  void*>( &artist );
-}
-
-QString
-Meta::Artist::sortableName() const
-{
-    if ( m_sortableName.isEmpty() && !name().isEmpty() ) {
-        if ( name().startsWith( "the ", Qt::CaseInsensitive ) ) {
-            QString begin = name().left( 3 );
-            m_sortableName = QString( "%1, %2" ).arg( name(), begin );
-            m_sortableName = m_sortableName.mid( 4 );
-        }
-        else
-            m_sortableName = name();
-    }
-    return m_sortableName;
-}
-
-//Meta::Album
-
-void
-Meta::Album::addMatchTo( QueryMaker *qm )
-{
-    qm->addMatch( AlbumPtr( this ) );
-}
-
-void
-Meta::Album::notifyObservers() const
-{
-    foreach( Observer *observer, m_observers )
-    {
-        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
-            observer->metadataChanged( Meta::AlbumPtr( const_cast<Meta::Album*>(this) ));
-    }
-}
-
-QPixmap
-Meta::Album::image( int size )
-{
-    /*
-     * This is the base class's image() function, which returns "nocover" by default.
-     * Retrieval of the cover for the actual album is done by subclasses.
-     */
-    const QDir &cacheCoverDir = QDir( Amarok::saveLocation( "albumcovers/cache/" ) );
-    if( size <= 1 )
-        size = 100;
-    const QString &noCoverKey = QString::number( size ) + "@nocover.png";
-
-    QPixmap pixmap;
-    if( cacheCoverDir.exists( noCoverKey ) )
-    {
-        pixmap.load( cacheCoverDir.filePath( noCoverKey ) );
-    }
-    else
-    {
-        const QPixmap orgPixmap( KStandardDirs::locate( "data", "amarok/images/nocover.png" ) );
-        pixmap = orgPixmap.scaled( size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
-        pixmap.save( cacheCoverDir.filePath( noCoverKey ), "PNG" );
-    }
-    return pixmap;
-}
-
-
-QPixmap
-Meta::Album::imageWithBorder( int size, int borderWidth )
-{
-    const int imageSize = size - ( borderWidth * 2 );
-    const QString loc   = imageLocation( imageSize ).url();
-    const QString key   = !loc.isEmpty() ? loc : name();
-    const QPixmap cover = image( imageSize );
-    return The::svgHandler()->addBordersToPixmap( cover, borderWidth, key );
-}
-
-
-bool
-Meta::Album::operator==( const Meta::Album &album ) const
-{
-    return dynamic_cast<const void*>( this ) == dynamic_cast<const void*>( &album );
-}
-
-//Meta::Genre
-
-void
-Meta::Genre::addMatchTo( QueryMaker *qm )
-{
-    qm->addMatch( GenrePtr( this ) );
-}
-
-void
-Meta::Genre::notifyObservers() const
-{
-    foreach( Observer *observer, m_observers )
-    {
-        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
-        {
-            observer->metadataChanged( Meta::GenrePtr( const_cast<Meta::Genre*>(this) ) );
-        }
-    }
-}
-
-bool
-Meta::Genre::operator==( const Meta::Genre &genre ) const
-{
-    return dynamic_cast<const void*>( this ) == dynamic_cast<const void*>( &genre );
-}
-
-//Meta::Composer
-
-void
-Meta::Composer::addMatchTo( QueryMaker *qm )
-{
-    qm->addMatch( ComposerPtr( this ) );
-}
-
-void
-Meta::Composer::notifyObservers() const
-{
-    foreach( Observer *observer, m_observers )
-    {
-        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
-            observer->metadataChanged( Meta::ComposerPtr( const_cast<Meta::Composer*>(this) ) );
-    }
-}
-
-bool
-Meta::Composer::operator==( const Meta::Composer &composer ) const
-{
-    return dynamic_cast<const void*>( this ) == dynamic_cast<const  void*>( &composer );
-}
-
-//Meta::Year
-
-void
-Meta::Year::addMatchTo( QueryMaker *qm )
-{
-    qm->addMatch( YearPtr( this ) );
-}
-
-void
-Meta::Year::notifyObservers() const
-{
-    foreach( Observer *observer, m_observers )
-    {
-        if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
-            observer->metadataChanged( Meta::YearPtr( const_cast<Meta::Year *>(this) ) );
-    }
-}
-
-bool
-Meta::Year::operator==( const Meta::Year &year ) const
-{
-    return dynamic_cast<const void*>( this ) == dynamic_cast<const  void*>( &year );
-}
-
diff --git a/src/meta/Meta.h b/src/meta/Meta.h
deleted file mode 100644
index 28f1d26..0000000
--- a/src/meta/Meta.h
+++ /dev/null
@@ -1,441 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- * Copyright (c) 2008 Mark Kretschmann <kretschmann at kde.org>                            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_META_H
-#define AMAROK_META_H
-
-#include "amarok_export.h"
-
-#include "capabilities/Capability.h"
-
-#include <QDateTime>
-#include <QList>
-#include <QMetaType>
-#include <QPixmap>
-#include <QSet>
-#include <QSharedData>
-#include <QString>
-
-#include <ksharedptr.h>
-#include <kurl.h>
-
-class QueryMaker;
-
-namespace Amarok
-{
-    class Collection;
-}
-
-namespace Meta
-{
-    class MetaBase;
-    class Track;
-    class Artist;
-    class Album;
-    class Genre;
-    class Composer;
-    class Year;
-
-    typedef KSharedPtr<MetaBase> DataPtr;
-    typedef QList<DataPtr> DataList;
-    typedef KSharedPtr<Track> TrackPtr;
-    typedef QList<TrackPtr> TrackList;
-    typedef KSharedPtr<Artist> ArtistPtr;
-    typedef QList<ArtistPtr> ArtistList;
-    typedef KSharedPtr<Album> AlbumPtr;
-    typedef QList<AlbumPtr> AlbumList;
-    typedef KSharedPtr<Composer> ComposerPtr;
-    typedef QList<ComposerPtr> ComposerList;
-    typedef KSharedPtr<Genre> GenrePtr;
-    typedef QList<GenrePtr> GenreList;
-    typedef KSharedPtr<Year> YearPtr;
-    typedef QList<YearPtr> YearList;
-
-    class AMAROK_EXPORT Observer
-    {
-        public:
-            void subscribeTo( TrackPtr );
-            void unsubscribeFrom( TrackPtr );
-            void subscribeTo( ArtistPtr );
-            void unsubscribeFrom( ArtistPtr );
-            void subscribeTo( AlbumPtr );
-            void unsubscribeFrom( AlbumPtr );
-            void subscribeTo( ComposerPtr );
-            void unsubscribeFrom( ComposerPtr );
-            void subscribeTo( GenrePtr );
-            void unsubscribeFrom( GenrePtr );
-            void subscribeTo( YearPtr );
-            void unsubscribeFrom( YearPtr );
-
-            /** This method is called when the metadata of a track has changed.
-                The called class may not cache the pointer */
-            virtual void metadataChanged( TrackPtr track );
-            virtual void metadataChanged( ArtistPtr artist );
-            virtual void metadataChanged( AlbumPtr album );
-            virtual void metadataChanged( GenrePtr genre );
-            virtual void metadataChanged( ComposerPtr composer );
-            virtual void metadataChanged( YearPtr year );
-            virtual ~Observer();
-
-        private:
-            QSet<TrackPtr> m_trackSubscriptions;
-            QSet<ArtistPtr> m_artistSubscriptions;
-            QSet<AlbumPtr> m_albumSubscriptions;
-            QSet<ComposerPtr> m_composerSubscriptions;
-            QSet<GenrePtr> m_genreSubscriptions;
-            QSet<YearPtr> m_yearSubscriptions;
-    };
-
-    class AMAROK_EXPORT MetaCapability
-    {
-    public:
-        virtual ~MetaCapability() {}
-
-        virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
-
-        virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
-
-        /**
-             * Retrieves a specialized interface which represents a capability of this
-             * MetaBase object.
-             *
-             * @returns a pointer to the capability interface if it exists, 0 otherwise
-             */
-        template <class CapIface> CapIface *create()
-        {
-            Meta::Capability::Type type = CapIface::capabilityInterfaceType();
-            Meta::Capability *iface = createCapabilityInterface( type );
-            return qobject_cast<CapIface *>( iface );
-        }
-
-        /**
-             * Tests if a MetaBase object provides a given capability interface.
-             *
-             * @returns true if the interface is available, false otherwise
-             */
-        template <class CapIface> bool is() const
-        {
-            return hasCapabilityInterface( CapIface::capabilityInterfaceType() );
-        }
-    };
-
-    class AMAROK_EXPORT MetaBase : public QSharedData, public MetaCapability
-    {
-        friend class Observer;
-
-        Q_PROPERTY( QString name READ name )
-        Q_PROPERTY( QString prettyName READ prettyName )
-        Q_PROPERTY( QString fullPrettyName READ fullPrettyName )
-        Q_PROPERTY( QString sortableName READ sortableName )
-
-        public:
-            MetaBase() {}
-            virtual ~MetaBase() {}
-            virtual QString name() const = 0;
-
-            virtual QString prettyName() const = 0;
-            virtual QString fullPrettyName() const { return prettyName(); }
-            virtual QString sortableName() const { return prettyName(); }
-
-            /**used for showing a fixed name in the tree view. Needed for items that change
-             * their name occasionally such as some streams. These should overwrite this
-             */
-            virtual QString fixedName() const { return prettyName(); }
-
-            virtual void addMatchTo( QueryMaker *qm ) = 0;
-
-
-
-        protected:
-            virtual void subscribe( Observer *observer );
-            virtual void unsubscribe( Observer *observer );
-
-            virtual void notifyObservers() const = 0;
-
-            QSet<Meta::Observer*> m_observers;
-
-        private: // no copy allowed, since it's not safe with observer list
-            Q_DISABLE_COPY(MetaBase)
-    };
-
-    class AMAROK_EXPORT Track : public MetaBase
-    {
-        public:
-
-            /**
-             * The Replay Gain mode.
-             */
-            enum ReplayGainMode
-            {
-                /** All tracks should be equally loud.  Also known as Radio mode. */
-                TrackReplayGain,
-                /** All albums should be equally loud.  Also known as Audiophile mode. */
-                AlbumReplayGain
-            };
-
-            virtual ~Track() {}
-            /** used to display the trackname, should never be empty, returns prettyUrl() by default if name() is empty */
-            virtual QString prettyName() const = 0;
-            /** an url which can be played by the engine backends */
-            virtual KUrl playableUrl() const = 0;
-            /** an url for display purposes */
-            virtual QString prettyUrl() const = 0;
-            /** an url which is unique for this track. Use this if you need a key for the track */
-            virtual QString uidUrl() const = 0;
-
-            /** Returns whether playableUrl() will return a playable Url */
-            virtual bool isPlayable() const = 0;
-            /** Returns the album this track belongs to */
-            virtual AlbumPtr album() const = 0;
-            /** Returns the artist of this track */
-            virtual ArtistPtr artist() const = 0;
-            /** Returns the composer of this track */
-            virtual ComposerPtr composer() const = 0;
-            /** Returns the genre of this track */
-            virtual GenrePtr genre() const = 0;
-            /** Returns the year of this track */
-            virtual YearPtr year() const = 0;
-            /** Returns the BPM of this track */
-            virtual float bpm() const = 0;
-            /** Returns the comment of this track */
-            virtual QString comment() const = 0;
-            /** Returns the score of this track */
-            virtual double score() const = 0;
-            virtual void setScore( double newScore ) = 0;
-            /** Returns the rating of this track */
-            virtual int rating() const = 0;
-            virtual void setRating( int newRating ) = 0;
-            /** Returns the length of this track in milliseconds, or 0 if unknown */
-            virtual qint64 length() const = 0;
-            /** Returns the filesize of this track in bytes */
-            virtual int filesize() const = 0;
-            /** Returns the sample rate of this track */
-            virtual int sampleRate() const = 0;
-            /** Returns the bitrate o this track */
-            virtual int bitrate() const = 0;
-            /** Returns the time when the track was added to the collection,
-                or an invalid QDateTime instance if the time is not known */
-            virtual QDateTime createDate() const;
-            /** Returns the track number of this track */
-            virtual int trackNumber() const = 0;
-            /** Returns the discnumber of this track */
-            virtual int discNumber() const = 0;
-            /** Returns the time the song was last played, or 0 if it has not been played yet */
-            virtual uint lastPlayed() const = 0;
-            /** Returns the time the song was first played, or 0 if it has not been played yet */
-            virtual uint firstPlayed() const;
-            /** Returns the number of times the track was played (what about unknown?)*/
-            virtual int playCount() const = 0;
-            /**
-             * Returns the gain adjustment for a given replay gain mode.
-             *
-             * Should return @c 0 if no replay gain value is known.
-             *
-             * Should return the track replay gain if the album gain is requested but
-             * is not available.
-             */
-            virtual qreal replayGain( ReplayGainMode mode ) const;
-            /** Returns the peak (after gain adjustment) for a given replay gain mode */
-            virtual qreal replayPeakGain( ReplayGainMode mode ) const;
-
-            /** Returns the type of this track, e.g. "ogg", "mp3", "stream" */
-            virtual QString type() const = 0;
-
-            /** tell the track to perform any prerequisite
-             * operations before playing */
-            virtual void prepareToPlay();
-
-            /** tell the track object that amarok finished playing it.
-                The argument is the percentage of the track which was played, in the range 0 to 1*/
-            virtual void finishedPlaying( double playedFraction );
-
-            virtual void addMatchTo( QueryMaker* qm );
-
-            /** returns true if the track is part of a collection false otherwise */
-            virtual bool inCollection() const;
-            /**
-                returns the collection that the track is part of, or 0 iff
-                inCollection() returns false */
-            virtual Amarok::Collection* collection() const;
-
-            /** get the cached lyrics for the track. returns an empty string if
-                no cached lyrics are available */
-            virtual QString cachedLyrics() const;
-            /**
-                set the cached lyrics for the track
-            */
-            virtual void setCachedLyrics( const QString &lyrics );
-
-            virtual bool operator==( const Track &track ) const;
-
-            static bool lessThan( const TrackPtr& left, const TrackPtr& right );
-
-        protected:
-            virtual void notifyObservers() const;
-
-    };
-
-    class AMAROK_EXPORT Artist : public MetaBase
-    {
-        Q_PROPERTY( TrackList tracks READ tracks )
-        Q_PROPERTY( AlbumList albums READ albums )
-        public:
-
-            virtual ~Artist() {}
-            /** returns all tracks by this artist */
-            virtual TrackList tracks() = 0;
-
-            /** returns all albums by this artist */
-            virtual AlbumList albums() = 0;
-
-            virtual void addMatchTo( QueryMaker* qm );
-
-            virtual bool operator==( const Meta::Artist &artist ) const;
-
-            virtual QString sortableName() const;
-
-        protected:
-            virtual void notifyObservers() const;
-
-        private:
-            mutable QString m_sortableName;
-    };
-
-    class AMAROK_EXPORT Album : public MetaBase
-    {
-        Q_PROPERTY( bool compilation READ isCompilation )
-        Q_PROPERTY( bool hasAlbumArtist READ hasAlbumArtist )
-        Q_PROPERTY( ArtistPtr albumArtist READ albumArtist )
-        Q_PROPERTY( TrackList tracks READ tracks )
-        Q_PROPERTY( bool hasImage READ hasImage )
-        Q_PROPERTY( QPixmap image READ image WRITE setImage )
-        Q_PROPERTY( bool supressImageAutoFetch READ suppressImageAutoFetch WRITE setSuppressImageAutoFetch )
-
-        public:
-            Album() {}
-            virtual ~Album() {}
-            virtual bool isCompilation() const = 0;
-
-            /** Returns true if this album has an album artist */
-            virtual bool hasAlbumArtist() const = 0;
-            /** Returns a pointer to the album's artist */
-            virtual ArtistPtr albumArtist() const = 0;
-            /** returns all tracks on this album */
-            virtual TrackList tracks() = 0;
-
-            /**
-             * A note about image sizes:
-             *  when size is <= 1, return the full size image
-             */
-            /** returns true if the album has a cover set */
-            virtual bool hasImage( int size = 1 ) const { Q_UNUSED( size ); return false; }
-            /** returns the "nocover" image; proper cover image getter is
-             * implemented in subclasses  */
-            virtual QPixmap image( int size = 1 );
-            /** returns the image location on disk */
-            virtual KUrl imageLocation( int size = 1 ) { Q_UNUSED( size ); return KUrl(); }
-            /** returns the cover of the album with a nice border around it*/
-            virtual QPixmap imageWithBorder( int size = 1, int borderWidth = 5 );
-            /** Returns true if it is possible to update the cover of the album */
-            virtual bool canUpdateImage() const { return false; }
-            /** updates the cover of the album */
-            virtual void setImage( const QPixmap &pixmap ) { Q_UNUSED( pixmap ); } //TODO: choose parameter
-            /** removes the album art */
-            virtual void removeImage() { }
-            /** don't automatically fetch artwork */
-            virtual void setSuppressImageAutoFetch( const bool suppress ) { Q_UNUSED( suppress ); }
-            /** should automatic artwork retrieval be suppressed? */
-            virtual bool suppressImageAutoFetch() const { return false; }
-
-            virtual void addMatchTo( QueryMaker* qm );
-
-            virtual bool operator==( const Meta::Album &album ) const;
-
-        protected:
-            virtual void notifyObservers() const;
-    };
-
-    class AMAROK_EXPORT Composer : public MetaBase
-    {
-        Q_PROPERTY( TrackList tracks READ tracks )
-        public:
-
-            virtual ~Composer() {}
-            /** returns all tracks by this composer */
-            virtual TrackList tracks() = 0;
-
-            virtual void addMatchTo( QueryMaker* qm );
-
-            virtual bool operator==( const Meta::Composer &composer ) const;
-
-        protected:
-            virtual void notifyObservers() const;
-    };
-
-    class AMAROK_EXPORT Genre : public MetaBase
-    {
-        Q_PROPERTY( TrackList tracks READ tracks )
-        public:
-
-            virtual ~Genre() {}
-            /** returns all tracks which belong to the genre */
-            virtual TrackList tracks() = 0;
-
-            virtual void addMatchTo( QueryMaker* qm );
-
-            virtual bool operator==( const Meta::Genre &genre ) const;
-
-        protected:
-            virtual void notifyObservers() const;
-    };
-
-    class AMAROK_EXPORT Year : public MetaBase
-    {
-        Q_PROPERTY( TrackList tracks READ tracks )
-        public:
-
-            virtual ~Year() {}
-            /** returns all tracks which are tagged with this year */
-            virtual TrackList tracks() = 0;
-
-            virtual void addMatchTo( QueryMaker* qm );
-
-            virtual bool operator==( const Meta::Year &year ) const;
-
-        protected:
-            virtual void notifyObservers() const;
-    };
-}
-
-Q_DECLARE_METATYPE( Meta::DataPtr )
-Q_DECLARE_METATYPE( Meta::DataList )
-Q_DECLARE_METATYPE( Meta::TrackPtr )
-Q_DECLARE_METATYPE( Meta::TrackList )
-Q_DECLARE_METATYPE( Meta::ArtistPtr )
-Q_DECLARE_METATYPE( Meta::ArtistList )
-Q_DECLARE_METATYPE( Meta::AlbumPtr )
-Q_DECLARE_METATYPE( Meta::AlbumList )
-Q_DECLARE_METATYPE( Meta::ComposerPtr )
-Q_DECLARE_METATYPE( Meta::ComposerList )
-Q_DECLARE_METATYPE( Meta::GenrePtr )
-Q_DECLARE_METATYPE( Meta::GenreList )
-Q_DECLARE_METATYPE( Meta::YearPtr )
-Q_DECLARE_METATYPE( Meta::YearList )
-
-
-
-#endif /* AMAROK_META_H */
diff --git a/src/meta/capabilities/BookmarkThisCapability.cpp b/src/meta/capabilities/BookmarkThisCapability.cpp
deleted file mode 100644
index da91bd4..0000000
--- a/src/meta/capabilities/BookmarkThisCapability.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#include "BookmarkThisCapability.h"
-
-namespace Meta {
-
-BookmarkThisCapability::~BookmarkThisCapability()
-{
-}
-
-
-}
diff --git a/src/meta/capabilities/BookmarkThisCapability.h b/src/meta/capabilities/BookmarkThisCapability.h
deleted file mode 100644
index a747629..0000000
--- a/src/meta/capabilities/BookmarkThisCapability.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#ifndef METABOOKMARKTHISCAPABILITY_H
-#define METABOOKMARKTHISCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-#include <QAction>
-
-namespace Meta {
-
-/**
-This capability determines whether a meta item in a collection can be directly bookmarked. Not all collections/services supports bookmarks on all levels, and some might not support Item level bookmarks at all as they have no query field and some might only support simple queries.
-
-    @author Nikolaj Hald Nielsen <nhn at kde.org>
-*/
-class AMAROK_EXPORT BookmarkThisCapability : public Capability {
-    Q_OBJECT
-public:
-    virtual ~BookmarkThisCapability();
-
-    virtual bool isBookmarkable() { return false; }
-    virtual QString browserName() = 0;
-    virtual QString collectionName() = 0;
-    virtual bool simpleFiltering() { return false; }
-    virtual QAction * bookmarkAction() = 0;
-
-    /**
-     * Get the capabilityInterfaceType of this capability
-     * @return The capabilityInterfaceType ( always Meta::Capability::BookmarkThis; )
-    */
-    static Type capabilityInterfaceType() { return Meta::Capability::BookmarkThis; }
-
-};
-
-}
-
-#endif
diff --git a/src/meta/capabilities/BoundedPlaybackCapability.cpp b/src/meta/capabilities/BoundedPlaybackCapability.cpp
deleted file mode 100644
index 1f26394..0000000
--- a/src/meta/capabilities/BoundedPlaybackCapability.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#include "BoundedPlaybackCapability.h"
-
-namespace Meta {
-
-Meta::BoundedPlaybackCapability::BoundedPlaybackCapability()
-    : Capability()
-{
-}
-    
-BoundedPlaybackCapability::~BoundedPlaybackCapability()
-{
-}
-
-}
-
-#include "BoundedPlaybackCapability.moc"
-
-
-
diff --git a/src/meta/capabilities/BoundedPlaybackCapability.h b/src/meta/capabilities/BoundedPlaybackCapability.h
deleted file mode 100644
index e426d02..0000000
--- a/src/meta/capabilities/BoundedPlaybackCapability.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#ifndef METABOUNDEDPLAYBACKCAPABILITY_H
-#define METABOUNDEDPLAYBACKCAPABILITY_H
-
-#include "capabilities/Capability.h"
-
-namespace Meta {
-
-/**
-A capability for tracks that represents a given, bounded, interval of a url, for instance a single track in a long podcast.
-
-    @author Nikolaj Hald Nielsen <nhn at kde.org>
-*/
-class BoundedPlaybackCapability : public Capability
-{
-    Q_OBJECT
-public:
-    BoundedPlaybackCapability();
-    ~BoundedPlaybackCapability();
-
-    virtual qint64 startPosition() = 0;
-    virtual qint64 endPosition() = 0;
-    
-    /**
-     * Get the capabilityInterfaceType of this capability
-     * @return The capabilityInterfaceType ( always Meta::Capability::BoundedPlayback; )
-     */
-    static Type capabilityInterfaceType() { return Capability::BoundedPlayback; }
-
-};
-
-}
-
-#endif
diff --git a/src/meta/capabilities/Capability.cpp b/src/meta/capabilities/Capability.cpp
deleted file mode 100644
index 28d4038..0000000
--- a/src/meta/capabilities/Capability.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "Capability.h"
-
-Meta::Capability::~Capability()
-{
-    //nothing to do
-}
-
-#include "Capability.moc"
diff --git a/src/meta/capabilities/Capability.h b/src/meta/capabilities/Capability.h
deleted file mode 100644
index 463d4a1..0000000
--- a/src/meta/capabilities/Capability.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_CAPABILITY_H
-#define AMAROK_CAPABILITY_H
-
-#include "amarok_export.h"
-
-#include <QObject>
-
-namespace Meta
-{
-    class AMAROK_EXPORT Capability : public QObject
-    {
-        Q_OBJECT
-        Q_ENUMS( Type )
-
-        public:
-            //add additional capabilities here
-            enum Type { Unknown = 0
-                        , Editable = 1
-                        , LastFm = 2
-                        , Buyable = 3
-                        , CustomActions = 4
-                        , EditablePlaylist = 5
-                        , MultiPlayable = 6
-                        , Organisable = 7
-                        , SourceInfo = 8
-                        , CurrentTrackActions = 9
-                        , StreamInfo = 10
-                        , Updatable = 11
-                        , Importable = 12
-                        , Collection = 13
-                        , BookmarkThis = 14
-                        , WriteTimecode = 15
-                        , LoadTimecode = 16
-                        , MultiSource = 17
-                        , BoundedPlayback = 18
-                        , Decorator = 19
-                        , ReadLabel = 20
-                        , WriteLabel = 21
-                        , FindInSource = 22
-                      };
-
-            virtual ~Capability();
-
-    };
-}
-
-
-#endif
diff --git a/src/meta/capabilities/CollectionCapability.cpp b/src/meta/capabilities/CollectionCapability.cpp
deleted file mode 100644
index 3d2cdb4..0000000
--- a/src/meta/capabilities/CollectionCapability.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "CollectionCapability.h"
-
-Meta::CollectionCapability::~CollectionCapability()
-{
-}
-
-#include "CollectionCapability.moc"
diff --git a/src/meta/capabilities/CollectionCapability.h b/src/meta/capabilities/CollectionCapability.h
deleted file mode 100644
index e5e812a..0000000
--- a/src/meta/capabilities/CollectionCapability.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_COLLECTIONCAPABILITY_H
-#define AMAROK_COLLECTIONCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-#include "Meta.h"
-
-
-#include <QAction>
-#include <QList>
-#include <QObject>
-
-namespace Meta
-{
-
-    class AMAROK_EXPORT CollectionCapability : public Meta::Capability
-    {
-        Q_OBJECT
-
-        public:
-            virtual ~CollectionCapability();
-
-            static Type capabilityInterfaceType() { return Meta::Capability::Collection; }
-            virtual QList<QAction*> collectionActions() = 0;
-    };
-}
-
-#endif
diff --git a/src/meta/capabilities/CurrentTrackActionsCapability.cpp b/src/meta/capabilities/CurrentTrackActionsCapability.cpp
deleted file mode 100644
index 957412f..0000000
--- a/src/meta/capabilities/CurrentTrackActionsCapability.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "CurrentTrackActionsCapability.h"
-
-Meta::CurrentTrackActionsCapability::CurrentTrackActionsCapability()
-    : CustomActionsCapability()
-{
-}
-
-Meta::CurrentTrackActionsCapability::CurrentTrackActionsCapability( const QList< QAction * > & actions )
-    : CustomActionsCapability( actions )
-{
-}
-
-
-#include "CurrentTrackActionsCapability.moc"
diff --git a/src/meta/capabilities/CurrentTrackActionsCapability.h b/src/meta/capabilities/CurrentTrackActionsCapability.h
deleted file mode 100644
index f87dbb5..0000000
--- a/src/meta/capabilities/CurrentTrackActionsCapability.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef CURRENTTRACKACTIONSCAPABILITY_H
-#define CURRENTTRACKACTIONSCAPABILITY_H
-
-#include "CustomActionsCapability.h"
-#include "amarok_export.h"
-
-/**
- * This capability allows tracks to display custom actions in different places ( such as the playlist context menu,
- * the system tray context menu and others ) when they are the currently playing tracks. Initial use for this will
- * to add last.fm skip, ban and love actions. This class is based on the CustomActionsCapability class as their
- * function is very similar although they are used in different places.
- *
- *         @author Nikolaj Hald Nielsen <nhn at kde.org>
- */
-
-namespace Meta {
-    
-    class AMAROK_EXPORT CurrentTrackActionsCapability : public CustomActionsCapability {
-
-        Q_OBJECT
-        public:
-            /**
-             * Constructor
-             */
-            CurrentTrackActionsCapability();
-            /**
-             * Constructor
-             * @param actions A list of actions that to use.
-             */
-            CurrentTrackActionsCapability( const QList< QAction * > &actions );
-            
-            /**
-             * Get the capabilityInterfaceType of this capability
-             * @return The capabilityInterfaceType ( always Meta::Capability::CurrentTrackActions; )
-             */
-            static Type capabilityInterfaceType() { return Meta::Capability::CurrentTrackActions; }
-    };
-
-}
-
-
-#endif
diff --git a/src/meta/capabilities/CustomActionsCapability.cpp b/src/meta/capabilities/CustomActionsCapability.cpp
deleted file mode 100644
index 6a513f6..0000000
--- a/src/meta/capabilities/CustomActionsCapability.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "CustomActionsCapability.h"
-
-Meta::CustomActionsCapability::CustomActionsCapability()
-    : Meta::Capability()
-{
-    //nothing to do
-}
-
-Meta::CustomActionsCapability::CustomActionsCapability( const QList<QAction*> &actions )
-    : Meta::Capability()
-    , m_actions( actions )
-{
-    //nothing to do
-}
-
-Meta::CustomActionsCapability::~CustomActionsCapability()
-{
-    //nothing to do.
-    //TODO are we responsible for deleting the actions?
-}
-
-QList<QAction *>
-Meta::CustomActionsCapability::customActions() const
-{
-    return m_actions;
-}
-
-#include "CustomActionsCapability.moc"
diff --git a/src/meta/capabilities/CustomActionsCapability.h b/src/meta/capabilities/CustomActionsCapability.h
deleted file mode 100644
index 8fc14b3..0000000
--- a/src/meta/capabilities/CustomActionsCapability.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_CUSTOMACTIONSCAPABILITY_H
-#define AMAROK_CUSTOMACTIONSCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-#include <QAction>
-#include <QList>
-
-namespace Meta
-{
-    /**
-     * This capability allows different meta types to display custom actions in the right click menu in the tree view
-     * or anywhere else where the actions are shown. This is useful for purchasing from stores, downloading from services
-     * banning a genre or whatever we can think of in the future
-     *
-     *         @author Nikolaj Hald Nielsen <nhn at kde.org>
-     */
-
-    class AMAROK_EXPORT CustomActionsCapability : public Meta::Capability
-    {
-        Q_OBJECT
-        public:
-            
-            /**
-             * Constructor
-             */
-            CustomActionsCapability();
-            
-            /**
-             * Constructor
-             * @param actions A list of actions to use.
-             */
-            CustomActionsCapability( const QList< QAction* > &actions );
-            /**
-             * Destructor
-             */
-            virtual ~CustomActionsCapability();
-
-            /**
-             * Get the custom actions for this capablility
-             * @return The list of custom actions
-             */
-            virtual QList<QAction *> customActions() const;
-
-            /**
-             * Get the capabilityInterfaceType of this capability
-             * @return The capabilityInterfaceType ( always Meta::Capability::CustomActions; )
-             */
-            static Type capabilityInterfaceType() { return Meta::Capability::CustomActions; }
-
-        protected:
-            QList< QAction* > m_actions;
-    };
-}
-
-#endif
diff --git a/src/meta/capabilities/DecoratorCapability.cpp b/src/meta/capabilities/DecoratorCapability.cpp
deleted file mode 100644
index d1a864f..0000000
--- a/src/meta/capabilities/DecoratorCapability.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Seb Ruiz <ruiz at kde.org>                                           *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "DecoratorCapability.h"
-
-Meta::DecoratorCapability::~DecoratorCapability()
-{
-}
-
-#include "DecoratorCapability.moc"
diff --git a/src/meta/capabilities/DecoratorCapability.h b/src/meta/capabilities/DecoratorCapability.h
deleted file mode 100644
index 968d151..0000000
--- a/src/meta/capabilities/DecoratorCapability.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Seb Ruiz <ruiz at kde.org>                                           *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_DECORATORCAPABILITY_H
-#define AMAROK_DECORATORCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-#include "Meta.h"
-
-
-#include <QAction>
-#include <QList>
-#include <QObject>
-
-namespace Meta
-{
-    class AMAROK_EXPORT DecoratorCapability : public Meta::Capability
-    {
-        Q_OBJECT
-
-        public:
-            virtual ~DecoratorCapability();
-
-            static Type capabilityInterfaceType() { return Meta::Capability::Decorator; }
-            virtual QList<QAction*> decoratorActions() = 0;
-    };
-}
-
-#endif
diff --git a/src/meta/capabilities/EditCapability.cpp b/src/meta/capabilities/EditCapability.cpp
deleted file mode 100644
index c8b4df4..0000000
--- a/src/meta/capabilities/EditCapability.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "EditCapability.h"
-
-Meta::EditCapability::~EditCapability()
-{
-    //nothing to do
-}
-
-#include "EditCapability.moc"
diff --git a/src/meta/capabilities/EditCapability.h b/src/meta/capabilities/EditCapability.h
deleted file mode 100644
index ddddc89..0000000
--- a/src/meta/capabilities/EditCapability.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_EDITCAPABILITY_H
-#define AMAROK_EDITCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-namespace Meta
-{
-    class AMAROK_EXPORT EditCapability : public Meta::Capability
-    {
-        Q_OBJECT
-        public:
-            virtual ~EditCapability();
-
-            static Type capabilityInterfaceType() { return Meta::Capability::Editable; }
-
-            /** Returns true if the tags of this track are currently editable */
-            virtual bool isEditable() const = 0;
-            /** Update the album of this track. */
-            virtual void setAlbum( const QString &newAlbum ) = 0;
-            //TODO: add overloaded methods which take a AlbumPtr if necessary
-            /** Change the artist of this track */
-            virtual void setArtist( const QString &newArtist ) = 0;
-
-            virtual void setComposer( const QString &newComposer ) = 0;
-
-            virtual void setGenre( const QString &newGenre ) = 0;
-
-            virtual void setYear( const QString &newYear ) = 0;
-
-            virtual void setTitle( const QString &newTitle ) = 0;
-
-            virtual void setComment( const QString &newComment ) = 0;
-
-            virtual void setTrackNumber( int newTrackNumber ) = 0;
-
-            virtual void setDiscNumber( int newDiscNumber ) = 0;
-
-            virtual void setBpm( const float newBpm ) = 0;
-
-            /** The track object should not store changed meta data immediately but cache the
-            changes until endMetaDataUpdate() or abortMetaDataUpdate() is called */
-            virtual void beginMetaDataUpdate() = 0;
-            /** All meta data has been updated and the object should commit the changed */
-            virtual void endMetaDataUpdate() = 0;
-            /** Abort the meta data update without committing the changes */
-            virtual void abortMetaDataUpdate() = 0;
-
-    };
-}
-
-#endif
diff --git a/src/meta/capabilities/EditablePlaylistCapability.cpp b/src/meta/capabilities/EditablePlaylistCapability.cpp
deleted file mode 100644
index d36df3e..0000000
--- a/src/meta/capabilities/EditablePlaylistCapability.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "EditablePlaylistCapability.h"
-
-namespace Meta {
-
-EditablePlaylistCapability::~EditablePlaylistCapability()
-{
-}
-
-
-}
diff --git a/src/meta/capabilities/EditablePlaylistCapability.h b/src/meta/capabilities/EditablePlaylistCapability.h
deleted file mode 100644
index a828f05..0000000
--- a/src/meta/capabilities/EditablePlaylistCapability.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef METAEDITABLEPLAYLISTCAPABILITY_H
-#define METAEDITABLEPLAYLISTCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-#include "meta/Meta.h"
-
-#include <QDateTime>
-
-class QString;
-class KUrl;
-
-namespace Meta {
-
-/**
-	@author Bart Cerneels <bart.cerneels at kde.org>
-*/
-class AMAROK_EXPORT EditablePlaylistCapability : public Capability
-{
-    Q_OBJECT
-
-    public:
-
-        virtual ~EditablePlaylistCapability();
-
-        static Type capabilityInterfaceType() { return Meta::Capability::EditablePlaylist; }
-
-        /** Returns true if the tags of this track are currently editable */
-        virtual bool isEditable() const = 0;
-
-        virtual void setTitle( const QString &title ) { Q_UNUSED( title ); };
-        virtual void setCreator( const QString &creator ) { Q_UNUSED( creator ); };
-        virtual void setAnnotation( const QString &annotation ) { Q_UNUSED( annotation ); };
-        virtual void setInfo( const KUrl &info ) { Q_UNUSED( info ); };
-        virtual void setLocation( const KUrl &location ) { Q_UNUSED( location); };
-        virtual void setIdentifier( const QString &identifier ) { Q_UNUSED( identifier); };
-        virtual void setImage( const KUrl &image ) { Q_UNUSED( image ); };
-        virtual void setDate( const QDateTime &date ) { Q_UNUSED( date); };
-        virtual void setLicense( const KUrl &license ) { Q_UNUSED( license ); };
-        virtual void setAttribution( const KUrl &attribution, bool append = true ) { Q_UNUSED( attribution); Q_UNUSED(append); };
-        virtual void setLink( const KUrl &link ) { Q_UNUSED( link ); };
-        virtual void setTrackList( TrackList trackList, bool append = false ) { Q_UNUSED( trackList ); Q_UNUSED( append ); };
-
-        /** The playlist object should not store changed meta data immediately but cache the
-        changes until endMetaDataUpdate() or abortMetaDataUpdate() is called */
-        virtual void beginMetaDataUpdate() = 0;
-        /** All meta data has been updated and the object should commit the changed */
-        virtual void endMetaDataUpdate() = 0;
-        /** Abort the meta data update without committing the changes */
-        virtual void abortMetaDataUpdate() = 0;
-
-};
-
-}
-
-#endif
diff --git a/src/meta/capabilities/FindInSourceCapability.cpp b/src/meta/capabilities/FindInSourceCapability.cpp
deleted file mode 100644
index b8f9b68..0000000
--- a/src/meta/capabilities/FindInSourceCapability.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2010 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "FindInSourceCapability.h"
-
-using namespace Meta;
-
-FindInSourceCapability::~FindInSourceCapability()
-{
-}
-
diff --git a/src/meta/capabilities/FindInSourceCapability.h b/src/meta/capabilities/FindInSourceCapability.h
deleted file mode 100644
index 96e96a0..0000000
--- a/src/meta/capabilities/FindInSourceCapability.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2010 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef FINDINSOURCECAPABILITY_H
-#define FINDINSOURCECAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-namespace Meta {
-
-/**
-This capability exposes a method that shows this track (or the closest possible parent, such as album) in the source where it was added from.
-
-    @author Nikolaj Hald Nielsen <nhn at kde.org>
-*/
-
-class AMAROK_EXPORT FindInSourceCapability : public Meta::Capability
-{
-    Q_OBJECT
-public: 
-    virtual ~FindInSourceCapability();
-
-    virtual void findInSource() = 0;
-
-    /**
-     * Get the capabilityInterfaceType of this capability
-     * @return The capabilityInterfaceType ( always Meta::Capability::FindInSource; )
-     */
-    static Type capabilityInterfaceType() { return Meta::Capability::FindInSource; }
-};
-
-};
-
-#endif // FINDINSOURCECAPABILITY_H
diff --git a/src/meta/capabilities/FingerprintCapability.cpp b/src/meta/capabilities/FingerprintCapability.cpp
deleted file mode 100644
index e69de29..0000000
diff --git a/src/meta/capabilities/LastFmCapability.cpp b/src/meta/capabilities/LastFmCapability.cpp
deleted file mode 100644
index f6b7b3e..0000000
--- a/src/meta/capabilities/LastFmCapability.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "LastFmCapability.h"
-
-Meta::LastFmCapability::~LastFmCapability()
-{
-    //nothing to do
-}
-
-#include "LastFmCapability.moc"
diff --git a/src/meta/capabilities/LastFmCapability.h b/src/meta/capabilities/LastFmCapability.h
deleted file mode 100644
index e882c69..0000000
--- a/src/meta/capabilities/LastFmCapability.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_LASTFMCAPABILITY_H
-#define AMAROK_LASTFMCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-namespace Meta
-{
-    class AMAROK_EXPORT LastFmCapability : public Meta::Capability
-    {
-        Q_OBJECT
-        public:
-            virtual ~LastFmCapability();
-
-            virtual void love() = 0;
-            virtual void ban() = 0;
-            virtual void skip() = 0;
-
-            static Type capabilityInterfaceType() { return Meta::Capability::LastFm; }
-    };
-}
-
-#endif
diff --git a/src/meta/capabilities/MultiPlayableCapability.cpp b/src/meta/capabilities/MultiPlayableCapability.cpp
deleted file mode 100644
index c9deb58..0000000
--- a/src/meta/capabilities/MultiPlayableCapability.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Shane King <kde at dontletsstart.com>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "MultiPlayableCapability.h"
-
-Meta::MultiPlayableCapability::~MultiPlayableCapability()
-{
-    //nothing to do
-}
-
-#include "MultiPlayableCapability.moc"
diff --git a/src/meta/capabilities/MultiPlayableCapability.h b/src/meta/capabilities/MultiPlayableCapability.h
deleted file mode 100644
index 5e7ac0d..0000000
--- a/src/meta/capabilities/MultiPlayableCapability.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Shane King <kde at dontletsstart.com>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_MULTIPLAYABLECAPABILITY_H
-#define AMAROK_MULTIPLAYABLECAPABILITY_H
-
-#include "capabilities/Capability.h"
-
-#include <KUrl>
-
-namespace Meta
-{
-    class AMAROK_EXPORT MultiPlayableCapability : public Capability
-    {
-        Q_OBJECT
-
-    public:
-        virtual ~MultiPlayableCapability();
-
-        static Type capabilityInterfaceType() { return Meta::Capability::MultiPlayable; }
-
-        virtual void fetchFirst() = 0;
-        virtual void fetchNext() = 0;
-
-    signals:
-        void playableUrlFetched( const KUrl &url );
-    };
-}
-
-#endif // AMAROK_MULTIPLAYABLECAPABILITY_H
diff --git a/src/meta/capabilities/MultiSourceCapability.cpp b/src/meta/capabilities/MultiSourceCapability.cpp
deleted file mode 100644
index 1706eaf..0000000
--- a/src/meta/capabilities/MultiSourceCapability.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "MultiSourceCapability.h"
-
-namespace Meta {
-
-MultiSourceCapability::MultiSourceCapability()
- : Capability()
-{
-}
-
-
-MultiSourceCapability::~MultiSourceCapability()
-{
-}
-
-}
-
-#include "MultiSourceCapability.moc"
diff --git a/src/meta/capabilities/MultiSourceCapability.h b/src/meta/capabilities/MultiSourceCapability.h
deleted file mode 100644
index 331c213..0000000
--- a/src/meta/capabilities/MultiSourceCapability.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#ifndef METAMULTISOURCECAPABILITY_H
-#define METAMULTISOURCECAPABILITY_H
-
-#include <Capability.h>
-
-#include <KUrl>
-
-namespace Meta {
-
-/**
-A capability for tracks that can have several different source urls, such as multiple fallback streams for a radio station. If one source url fails or finishes, the track will automatically use the next one. It is also possbile to get a list of all urls that can be presented to the user so he can choose.
-
-    @author Nikolaj Hald Nielsen <nhn at kde.org>
-*/
-class MultiSourceCapability : public Capability
-{
-    Q_OBJECT
-public:
-    MultiSourceCapability();
-
-    ~MultiSourceCapability();
-
-    static Type capabilityInterfaceType() { return Meta::Capability::MultiSource; }
-
-    virtual KUrl first() = 0;
-    virtual KUrl next() = 0;
-    virtual int current() = 0;
-    virtual QStringList sources() = 0;
-    virtual void setSource( int source ) = 0;
-    
-signals:
-    void urlChanged( const KUrl &url );
-
-};
-
-}
-
-#endif
diff --git a/src/meta/capabilities/OrganiseCapability.cpp b/src/meta/capabilities/OrganiseCapability.cpp
deleted file mode 100644
index e710ac0..0000000
--- a/src/meta/capabilities/OrganiseCapability.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "OrganiseCapability.h"
-
-Meta::OrganiseCapability::~OrganiseCapability()
-{
-    //nothing to do
-}
diff --git a/src/meta/capabilities/OrganiseCapability.h b/src/meta/capabilities/OrganiseCapability.h
deleted file mode 100644
index 7be49f2..0000000
--- a/src/meta/capabilities/OrganiseCapability.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_ORGANISECAPABILITY_H
-#define AMAROK_ORGANISECAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-namespace Meta
-{
-    class AMAROK_EXPORT OrganiseCapability : public Meta::Capability
-    {
-        Q_OBJECT
-        public:
-            virtual ~OrganiseCapability();
-
-            static Type capabilityInterfaceType() { return Meta::Capability::Organisable; }
-
-            /**
-             * delete this track from the collection
-             */
-            virtual void deleteTrack() = 0;
-            //virtual void organiseTrack() = 0;
-    };
-}
-
-#endif
diff --git a/src/meta/capabilities/ReadLabelCapability.cpp b/src/meta/capabilities/ReadLabelCapability.cpp
deleted file mode 100644
index 2d6fe30..0000000
--- a/src/meta/capabilities/ReadLabelCapability.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-    Copyright (C) 2009 Dan Meltzer <parallelgrapefruit at gmail.com>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "ReadLabelCapability.h"
-
diff --git a/src/meta/capabilities/ReadLabelCapability.h b/src/meta/capabilities/ReadLabelCapability.h
deleted file mode 100644
index 7055b2d..0000000
--- a/src/meta/capabilities/ReadLabelCapability.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-    Copyright (C) 2009 Dan Meltzer <parallelgrapefruit at gmail.com>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#ifndef READLABELCAPABILITY_H
-#define READLABELCAPABILITY_H
-
-#include "capabilities/Capability.h"
-#include "meta/Meta.h"
-#include "amarok_export.h"
-
-namespace Meta
-{
-
-class AMAROK_EXPORT ReadLabelCapability : public Meta::Capability
-{
-    Q_OBJECT
-    public:
-        static Type capabilityInterfaceType() { return Meta::Capability::ReadLabel; }
-
-        //Implementors
-        virtual void fetchLabels() = 0;
-        virtual void fetchGlobalLabels() = 0;
-        virtual QStringList labels() = 0;
-
-    signals:
-        void labelsFetched( QStringList );
-
-};
-
-}
-#endif // READLABELCAPABILITY_H
diff --git a/src/meta/capabilities/SourceInfoCapability.cpp b/src/meta/capabilities/SourceInfoCapability.cpp
deleted file mode 100644
index 9884976..0000000
--- a/src/meta/capabilities/SourceInfoCapability.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#include "SourceInfoCapability.h"
-
-Meta::SourceInfoCapability::SourceInfoCapability()
-    : Meta::Capability()
-{
-}
-
-
-Meta::SourceInfoCapability::~SourceInfoCapability()
-{
-}
-
-
-
diff --git a/src/meta/capabilities/SourceInfoCapability.h b/src/meta/capabilities/SourceInfoCapability.h
deleted file mode 100644
index f85ae6e..0000000
--- a/src/meta/capabilities/SourceInfoCapability.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#ifndef SOURCEINFOCAPABILITY_H
-#define SOURCEINFOCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-class QPixmap;
-
-namespace Meta
-{
-
-    /**
-    This capability allows getting additional information about the source of a meta item. For now, it is intended for allowing the playlist to display a little emblem to let users know if a track is a Magnatune preview track, a lastfm stream or so on...
-
-        @author Nikolaj Hald Nielsen <nhn at kde.org>
-    */
-    class AMAROK_EXPORT SourceInfoCapability : public Meta::Capability{
-    public:
-        Q_OBJECT
-        public:
-            /**
-             * Constructor
-             */
-            SourceInfoCapability();
-            /**
-             * Destructor
-             */
-            virtual ~SourceInfoCapability();
-
-            /**
-             * Get the human readable name of the source, for instance "Magnatune.com"
-             * @return The name of the source
-             */
-            virtual QString sourceName() = 0;
-            /**
-             * Get a brief human readable description or the source
-             * @return The source description
-             */
-            virtual QString sourceDescription() = 0;
-            /**
-             * Get a small 16x16 pixle emblem that represents the source.
-             * @return The source emblem
-             */
-            virtual QPixmap emblem() = 0;
-
-            /**
-             * Get a path to a scalable (svg) version of the source emblem.
-             */
-            virtual QString scalableEmblem() = 0;
-
-            /**
-             * Get the capabilityInterfaceType of this capability
-             * @return The capabilityInterfaceType ( always Meta::Capability::SourceInfo; )
-             */
-            static Type capabilityInterfaceType() { return Meta::Capability::SourceInfo; }
-
-    };
-
-}
-
-#endif
diff --git a/src/meta/capabilities/StatisticsCapability.cpp b/src/meta/capabilities/StatisticsCapability.cpp
deleted file mode 100644
index 36db9e1..0000000
--- a/src/meta/capabilities/StatisticsCapability.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Seb Ruiz <ruiz at kde.org>                                           *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "StatisticsCapability.h"
-
-Meta::StatisticsCapability::~StatisticsCapability()
-{
-    //nothing to do
-}
-
-#include "StatisticsCapability.moc"
diff --git a/src/meta/capabilities/StatisticsCapability.h b/src/meta/capabilities/StatisticsCapability.h
deleted file mode 100644
index 6424bba..0000000
--- a/src/meta/capabilities/StatisticsCapability.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Seb Ruiz <ruiz at kde.org>                                           *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_STATISTICSCAPABILITY_H
-#define AMAROK_STATISTICSCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-namespace Meta
-{
-    class AMAROK_EXPORT StatisticsCapability : public Meta::Capability
-    {
-        Q_OBJECT
-        public:
-            virtual ~StatisticsCapability();
-
-            static Type capabilityInterfaceType() { return Meta::Capability::Importable; }
-
-            virtual void setScore( const int score ) = 0;
-            virtual void setRating( const int rating ) = 0;
-            virtual void setFirstPlayed( const uint time ) = 0;
-            virtual void setLastPlayed( const uint time ) = 0;
-            virtual void setPlayCount( const int playcount ) = 0;
-
-            /** The track object should not store changed meta data immediately but cache the
-            changes until endStatisticsUpdate() or abortStatisticsUpdate() is called */
-            virtual void beginStatisticsUpdate() = 0;
-            /** All meta data has been updated and the object should commit the changed */
-            virtual void endStatisticsUpdate() = 0;
-            /** Abort the meta data update without committing the changes */
-            virtual void abortStatisticsUpdate() = 0;
-    };
-}
-
-#endif
diff --git a/src/meta/capabilities/StreamInfoCapability.cpp b/src/meta/capabilities/StreamInfoCapability.cpp
deleted file mode 100644
index ed8fb76..0000000
--- a/src/meta/capabilities/StreamInfoCapability.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Dan Meltzer <parallelgrapefruit at gmail.com>                        *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
- //Stupid cmake.
-#include "StreamInfoCapability.h"
-#include "StreamInfoCapability.moc"
diff --git a/src/meta/capabilities/StreamInfoCapability.h b/src/meta/capabilities/StreamInfoCapability.h
deleted file mode 100644
index 2781db3..0000000
--- a/src/meta/capabilities/StreamInfoCapability.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Dan Meltzer <parallelgrapefruit at gmail.com>                        *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#ifndef STREAMINFOCAPABILITY_H
-#define STREAMINFOCAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-#include <QString>
-namespace Meta
-{
-
-    /**
-     * This capability is designed to provide additional information
-     * about streaming metadata. For meta types that provide multiple
-     * tracks within the same stream (lastfm, shoutcast, etc )
-     * this capability is designed to return stream metadata,
-     * where the properties in the Meta::Track class refers to the track
-     * being played within the stream.
-
-        @author Dan Meltzer <parallelgrapefruit at gmail.com>
-    */
-    class AMAROK_EXPORT StreamInfoCapability : public Meta::Capability
-    {
-        Q_OBJECT
-        public:
-            StreamInfoCapability() {};
-            virtual ~StreamInfoCapability() {};
-
-            /**
-             * The human readable name of this stream
-             * @return A string representing the name of this stream.
-             */
-            virtual QString streamName() const = 0;
-            /**
-             * The source this stream belongs to.
-             * @return The name of the owning source.
-             */
-            virtual QString streamSource() const { return QString(); }
-            static Type capabilityInterfaceType() { return Meta::Capability::StreamInfo; }
-
-    };
-
-}
-
-#endif
diff --git a/src/meta/capabilities/TimecodeLoadCapability.cpp b/src/meta/capabilities/TimecodeLoadCapability.cpp
deleted file mode 100644
index 178c910..0000000
--- a/src/meta/capabilities/TimecodeLoadCapability.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Casey Link <unnamedrambler at gmail.com>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "TimecodeLoadCapability.h"
-
-namespace Meta
-{
-TimecodeLoadCapability::~TimecodeLoadCapability()
-{}
-}
-
diff --git a/src/meta/capabilities/TimecodeLoadCapability.h b/src/meta/capabilities/TimecodeLoadCapability.h
deleted file mode 100644
index a2fb9b8..0000000
--- a/src/meta/capabilities/TimecodeLoadCapability.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Casey Link <unnamedrambler at gmail.com>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef TIMECODELOADCAPABILITY_H
-#define TIMECODELOADCAPABILITY_H
-
-#include "amarok_export.h"
-#include "meta/Meta.h"
-#include "capabilities/Capability.h"
-#include "amarokurls/AmarokUrl.h"
-
-#include <KSharedPtr>
-
-#include <QList>
-
-namespace Meta {
-
-typedef QList<AmarokUrlPtr> BookmarkList;
-typedef KSharedPtr<AmarokUrl> AmarokUrlPtr;
-/**
-* This capability determines whether a track has timecodes
-* that can be loaded from it, and supplies them if it can.
-* @author Casey Link
-*/
-class AMAROK_EXPORT TimecodeLoadCapability : public Capability
-{
-    Q_OBJECT
-public:
-    virtual ~TimecodeLoadCapability();
-
-    /**
-     * @return true if the track has timecodes, false if not
-     */
-    virtual bool hasTimecodes() = 0 ;
-
-    /**
-     * @return a QList of AmarokUrlPtrs representing the track's timecodes. Might return an empty list.
-     */
-    virtual BookmarkList loadTimecodes()  = 0;
-
-    /**
-    * Get the capabilityInterfaceType of this capability
-    * @return The capabilityInterfaceType ( always Meta::Capability::LoadTimecode; )
-    */
-    static Type capabilityInterfaceType()
-    {
-        return Meta::Capability::LoadTimecode;
-    }
-};
-
-}
-
-#endif // TIMECODELOADCAPABILITY_H
diff --git a/src/meta/capabilities/TimecodeWriteCapability.cpp b/src/meta/capabilities/TimecodeWriteCapability.cpp
deleted file mode 100644
index 93eb2bc..0000000
--- a/src/meta/capabilities/TimecodeWriteCapability.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Casey Link <unnamedrambler at gmail.com>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "TimecodeWriteCapability.h"
-
-#include "amarokurls/AmarokUrl.h"
-#include "amarokurls/AmarokUrlHandler.h"
-#include "amarokurls/PlayUrlGenerator.h"
-#include "amarokurls/BookmarkModel.h"
-#include "Debug.h"
-#include "ProgressWidget.h"
-#include "EngineController.h"
-#include "TimecodeLoadCapability.h"
-
-namespace Meta
-{
-
-TimecodeWriteCapability::~TimecodeWriteCapability()
-{}
-
-bool TimecodeWriteCapability::writeTimecode( qint64 miliseconds, Meta::TrackPtr track )
-{
-    DEBUG_BLOCK
-    AmarokUrl url = PlayUrlGenerator::instance()->createTrackBookmark( track, miliseconds );
-
-    // lets see if we are bookmarking the currently playing track, if so
-    // we need to update the slider with another icon
-    Meta::TrackPtr currtrack = The::engineController()->currentTrack();
-    if( currtrack  == track )
-    {
-        debug() << " current track";
-        debug() << "adding at seconds: " << miliseconds;
-        The::amarokUrlHandler()->paintNewTimecode( url.name(), miliseconds );
-
-    }
-
-    url.saveToDb();
-    BookmarkModel::instance()->reloadFromDb(); //Update bookmark manager view.
-    return true;
-}
-
-bool Meta::TimecodeWriteCapability::writeAutoTimecode( qint64 miliseconds, Meta::TrackPtr track )
-{
-    DEBUG_BLOCK
-
-    //first up, find and delete any previously added auto timecodes for this track
-
-    debug() << "deleting old auto timecodes";
-    if( track->hasCapabilityInterface( Meta::Capability::LoadTimecode ) )
-    {
-        TimecodeLoadCapability *tcl = track->create<TimecodeLoadCapability>();
-        BookmarkList list = tcl->loadTimecodes();
-        foreach( AmarokUrlPtr oldUrl, list )
-        {
-            if( oldUrl->command() == "play"  ) {
-                if( oldUrl->customValue() == "auto timecode" ) {
-                    debug() << "deleting: " << oldUrl->name();
-                    oldUrl->removeFromDb();
-                }
-            }
-        }
-    }
-
-    //create url
-    AmarokUrl url = PlayUrlGenerator::instance()->createTrackBookmark( track, miliseconds );
-
-    // lets see if we are bookmarking the currently playing track, if so
-    // we need to update the slider with another icon
-
-    Meta::TrackPtr currtrack = The::engineController()->currentTrack();
-    if( currtrack == track )
-    {
-        debug() << " current track";
-        QMap<QString, QString> args = url.args();
-        if ( args.keys().contains( "pos" ) )
-        {
-            int pos = args.value( "pos" ).toInt();
-            The::amarokUrlHandler()->paintNewTimecode( url.name(), pos * 1000 );
-        }
-    }
-
-    //change the name a little bit
-    url.setCustomValue( "auto timecode" );
-
-    QString date = QDateTime::currentDateTime().toString( "dd.MM.yyyy" );
-    url.setName( i18n( "%1 - Stopped %2", track->prettyName(), date ) );
-
-    debug() << "creating new auto timecode: " << url.name();
-
-    //put in custom group to ensure that we do not clutter the list of bookmarks.
-    BookmarkGroupPtr parentPtr = BookmarkGroupPtr( new BookmarkGroup( i18n( "Playback Ended Markers" ), "auto_markers" ) );
-    url.reparent( parentPtr );
-
-    //save it
-    url.saveToDb();
-    BookmarkModel::instance()->reloadFromDb(); //Update bookmark manager view.
-    return true;
-}
-
-}
-
-
-
-
diff --git a/src/meta/capabilities/TimecodeWriteCapability.h b/src/meta/capabilities/TimecodeWriteCapability.h
deleted file mode 100644
index d0c4e81..0000000
--- a/src/meta/capabilities/TimecodeWriteCapability.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Casey Link <unnamedrambler at gmail.com>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef TIMECODEWRITECAPABILITY_H
-#define TIMECODEWRITECAPABILITY_H
-
-#include "amarok_export.h"
-#include "meta/Meta.h"
-#include "capabilities/Capability.h"
-
-namespace Meta
-{
-/**
- * This capability determines whether a track can have a timecode
- * written to it.
- * @author Casey Link
- */
-class AMAROK_EXPORT TimecodeWriteCapability : public Capability
-{
-    Q_OBJECT
-public:
-
-    virtual ~TimecodeWriteCapability();
-
-    /**
-     * Stores a timecode for the track
-     * @param seconds the position in seconds at which the timecide should be stored.
-     * @return  true if the write was successful, false if not.
-     */
-    virtual bool writeTimecode ( qint64 miliseconds ) = 0;
-
-    /**
-     * Stores an auto timecode for the track and deletes any previously added auto timecodes
-     * @param seconds the position in seconds at which the timecide should be stored.
-     * @return  true if the write was successful, false if not.
-     */
-    virtual bool writeAutoTimecode ( qint64 miliseconds ) = 0;
-
-    /**
-    * Get the capabilityInterfaceType of this capability
-    * @return The capabilityInterfaceType ( always Meta::Capability::WriteTimecode; )
-    */
-    static Type capabilityInterfaceType()
-    {
-        return Meta::Capability::WriteTimecode;
-    }
-
-protected:
-
-    bool writeTimecode( qint64 miliseconds, Meta::TrackPtr track );
-    bool writeAutoTimecode( qint64 miliseconds, Meta::TrackPtr track );
-};
-
-#endif // TIMECODEWRITECAPABILITY_H
-}
diff --git a/src/meta/capabilities/UpdateCapability.cpp b/src/meta/capabilities/UpdateCapability.cpp
deleted file mode 100644
index 066fc53..0000000
--- a/src/meta/capabilities/UpdateCapability.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "UpdateCapability.h"
-
-Meta::UpdateCapability::~UpdateCapability()
-{
-}
-
-#include "UpdateCapability.moc"
diff --git a/src/meta/capabilities/UpdateCapability.h b/src/meta/capabilities/UpdateCapability.h
deleted file mode 100644
index b194105..0000000
--- a/src/meta/capabilities/UpdateCapability.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_UPDATECAPABILITY_H
-#define AMAROK_UPDATECAPABILITY_H
-
-#include "amarok_export.h"
-#include "capabilities/Capability.h"
-
-namespace Meta
-{
-    /**
-      * Do not use this capability. Ever. If you really need to emit Collection::updated()
-      * from outside the collection (which is wrong) use Collection::collectionUpdated(),
-      * e.g. track->collection()->collectionUpdated().
-      *
-      * The proper solution is to add code to the collection that allows it figure out on its
-      * own whether it has been changed.
-      */
-    class AMAROK_EXPORT UpdateCapability : public Meta::Capability
-    {
-        Q_OBJECT
-        public:
-            virtual ~UpdateCapability();
-
-            static Type capabilityInterfaceType() { return Meta::Capability::Updatable; }
-        // simply should emit track's collection's updated signal
-            virtual void collectionUpdated() const = 0;
-
-    };
-}
-
-#endif
diff --git a/src/meta/capabilities/WriteLabelCapability.cpp b/src/meta/capabilities/WriteLabelCapability.cpp
deleted file mode 100644
index 3c65c98..0000000
--- a/src/meta/capabilities/WriteLabelCapability.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-    Copyright (C) 2009 Dan Meltzer <parallelgrapefruit at gmail.com>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "WriteLabelCapability.h"
-
diff --git a/src/meta/capabilities/WriteLabelCapability.h b/src/meta/capabilities/WriteLabelCapability.h
deleted file mode 100644
index cdd1b66..0000000
--- a/src/meta/capabilities/WriteLabelCapability.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-    Copyright (C) 2009 Dan Meltzer <parallelgrapefruit at gmail.com>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#ifndef WRITELABELCAPABILITY_H
-#define WRITELABELCAPABILITY_H
-
-#include "capabilities/Capability.h"
-#include "meta/Meta.h"
-#include "amarok_export.h"
-
-namespace Meta
-{
-
-class AMAROK_EXPORT WriteLabelCapability : public Meta::Capability
-{
-    Q_OBJECT
-    public:
-        static Type capabilityInterfaceType() { return Meta::Capability::WriteLabel; }
-
-        //Implementors
-        virtual void setLabels( const QStringList &removedLabels, const QStringList &labels ) = 0;
-
-};
-
-}
-#endif // READLABELCAPABILITY_H
diff --git a/src/meta/impl/cdda/AudioCdTrackProvider.cpp b/src/meta/impl/cdda/AudioCdTrackProvider.cpp
deleted file mode 100644
index 702e324..0000000
--- a/src/meta/impl/cdda/AudioCdTrackProvider.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "CDDAManager.h"
-#include "CDDAManager_p.h"
-
-CDDAManager::CDDAManager( QObject *parent )
-    : QObject( parent )
-    , d( new Private() )
-{
-}
-
-CDDAManager::~CDDAManager()
-{
-    delete d;
-}
-
-QStringList
-CDDAManager::audioCdUdis() const
-{
-    return QStringList();
-}
-
-QString
-CDDAManager::audioCdName( const QString &udi ) const
-{
-    return QString();
-}
-
-void
-CDDAManager::playAudioCd( const QString &udi ) const
-{
-}
-
-#include "CDDAManager.moc"
-
diff --git a/src/meta/impl/cdda/AudioCdTrackProvider.h b/src/meta/impl/cdda/AudioCdTrackProvider.h
deleted file mode 100644
index 6db2568..0000000
--- a/src/meta/impl/cdda/AudioCdTrackProvider.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AUDIOCDTRACKPROVIDER_H
-#define AUDIOCDTRACKPROVIDER_H
-
-#include "meta.h"
-
-#include <QObject>
-#include <QStringList>
-
-/**
- * This manager handles audio cds. Audio CDs require special treatment because
- * we are not operating on files, instead we tell the engine to play the cd directly.
- * Therefore CollectionManager::trackForUrl cannot be used.
- */
-class CDDAManager : public QObject
-{
-    Q_OBJECT
-    public:
-        CDDAManager( QObject *parent );
-        ~CDDAManager();
-
-        QStringList audioCdUdis() const;
-        QString audioCdName( const QString &udi ) const;
-        void playAudioCd( const QString &udi ) const;
-
-    private:
-        class Private;
-        Private * const d;
-};
-
-#endif
diff --git a/src/meta/impl/cdda/AudioCdTrackProvider_p.cpp b/src/meta/impl/cdda/AudioCdTrackProvider_p.cpp
deleted file mode 100644
index cede185..0000000
--- a/src/meta/impl/cdda/AudioCdTrackProvider_p.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "AudioCdTrackProvider_p.h"
-
-#include "Debug.h"
-
-#include <solid/block.h>
-#include <solid/device.h>
-#include <solid/deviceinterface.h>
-#include <solid/devicenotifier.h>
-#include <solid/storagevolume.h>
-
-#include <kcompactdisc.h>
-
-#include <QList>
-
-AudioCdTrackProvider::Private::Private()
-    : QObejct()
-{
-    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceAdded( const QString ) ), SLOT( deviceAdded( const QString ) ) );
-    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceRemoved( const QString ) ), SLOT( deviceRemoved( const QString ) ) );
-    QList<Solid::Device> devices = Solid::Device::listFromType( Solid::DeviceInterface::OpticalDisc );
-    foreach( const Solid::Device &device, devices )
-    {
-        Solid::OpticalDisc *od = device.as<Solid::OpticalDisc>();
-        if( od->availableContent() != Solid::OpticalDisc::Audio )
-        {
-            continue;
-        }
-        if( device.is<Solid::StorageVolume>() )
-        {
-            Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
-            if( sv->isIgnored() )
-            {
-                continue;
-            }
-        }
-        if( device.is<Solid::Block>() )
-        {
-            //does this actually work on windows???
-            Solid::Block *sb = devie.as>Solid::Block>();
-            m_cddaDevices.insert( device.udi(), sb->device() );
-        }
-    }
-}
-
-AudioCdTrackProvider::Private::~Private()
-{
-}
-
-void
-AudioCdTrackProvider::Private::deviceAdded( const QString &udi )
-{
-    Solid::Device device( udi );
-    if( !device.is<Solid::OpticalDisc>() )
-    {
-        return;
-    }
-    if( device.is<Solid::StorageVolume>() )
-    {
-        Solid::StorageVolume *sv = device.as<Solid::StorageVolume>();
-        if( sv->isIgnored() )
-        {
-            return;
-        }
-    }
-    if( device.is<Solid::Block>() )
-    {
-            //does this actually work on windows???
-        Solid::Block *sb = devie.as>Solid::Block>();
-        m_cddaDevices.insert( device.udi(), sb->device() );
-        KCompactDisc cd;
-        cd.setDevice( sb->device() );
-        QList<unsigned> signature = cd.discSignature();
-        if( signature.isEmpty() )
-        {
-            warning() << "Could not get CDDB disc signature for " << sb->device();
-            return;
-        }
-    }
-}
-
-void
-AudioCdTrackProvider::Private::deviceRemoved( const QString &udi )
-{
-    m_cddaDevices.remove( udi );
-}
-
-bool
-AudioCdTrackProvider::Private::isPathOnCd( const QString &path ) const
-{
-    const QStringList paths = m_cdMountPaths.values();
-    foreach( const QString &mountPoint, paths )
-    {
-        //path can be entered by the user, therefore we cannot make any assumptions about the case
-        //of the path on windows -> d:/ and D:/ are equivalent
-#ifdef Q_WS_WIN
-        if( path.startsWith( mountPoint, Qt::CaseInsensitive ) );
-#else
-        if( path.startsWith( mountPoint ) )
-#endif
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-#include "AudioCdTrackProvider_p.moc"
diff --git a/src/meta/impl/cdda/AudioCdTrackProvider_p.h b/src/meta/impl/cdda/AudioCdTrackProvider_p.h
deleted file mode 100644
index 17ce27e..0000000
--- a/src/meta/impl/cdda/AudioCdTrackProvider_p.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_AUDIOCDTRACKPROVIDER_P_H
-#define AMAROK_AUDIOCDTRACKPROVIDER_P_H
-
-#include <QMap>
-#include <QObject>
-#include <QString>
-
-class AudioCdTrackProvider::Private : public QObject
-{
-    Q_OBJECT
-    public:
-        Private();
-        ~Private();
-
-        bool isPathOnCd( const QString &path ) const;
-        
-
-    public slots:
-        void deviceAdded( const QString &udi );
-        void deviceRemoved( const QString &udi );
-
-    private:
-        QMap<QString, QString> m_cddaDevices;
-};
-
-#endif
diff --git a/src/meta/impl/cue/Cue.cpp b/src/meta/impl/cue/Cue.cpp
deleted file mode 100644
index 12b036b..0000000
--- a/src/meta/impl/cue/Cue.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Casey Link <unnamedrambler at gmail.com>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "Cue.h"
-#include "Cue_p.h"
-#include "Cue_p.moc"
-
-#include "Debug.h"
-#include "Meta.h"
-#include "capabilities/TimecodeLoadCapability.h"
-#include "amarokurls/PlayUrlRunner.h"
-#include "amarokurls/PlayUrlGenerator.h"
-#include "amarokurls/BookmarkMetaActions.h"
-
-#include <KEncodingProber>
-
-#include <QAction>
-#include <QDir>
-#include <QFile>
-#include <QMapIterator>
-#include <QPointer>
-#include <QTextCodec>
-
-using namespace MetaCue;
-
-namespace MetaCue {
-
-class TimecodeLoadCapabilityImpl : public Meta::TimecodeLoadCapability
-{
-    public:
-        TimecodeLoadCapabilityImpl( Track *track )
-        : Meta::TimecodeLoadCapability()
-        , m_track( track )
-        {}
-
-        virtual bool hasTimecodes()
-        {
-            if ( loadTimecodes().size() > 0 )
-                return true;
-            return false;
-        }
-
-        virtual BookmarkList loadTimecodes()
-        {
-            DEBUG_BLOCK
-
-            CueFileItemMap map = m_track->cueItems();
-            debug() << " cue has " << map.size() << " entries";
-            QMapIterator<long, CueFileItem> it( map );
-            BookmarkList list;
-
-            while ( it.hasNext() )
-            {
-                it.next();
-                debug() << " seconds : " << it.key();
-
-                AmarokUrl aUrl;
-                rUrl = PlayUrlGenerator::instance()->createTrackBookmark( Meta::TrackPtr( m_track.data() ), it.key(), it.value().getTitle() );
-                AmarokUrlPtr url( new AmarokUrl( aUrl.url() ) );
-                url->setName( aUrl.name() ); // TODO AmarokUrl should really have a copy constructor
-
-                list << url;
-            }
-
-            return list;
-        }
-
-    private:
-        KSharedPtr<Track> m_track;
-};
-}
-Track::Track ( const KUrl &url, const KUrl &cuefile )
-    : MetaFile::Track ( url )
-    , EngineObserver ( The::engineController() )
-    , m_cuefile ( cuefile )
-    , m_lastSeekPos ( -1 )
-    , m_cueitems()
-    , d ( new Track::Private ( this ) )
-{
-    DEBUG_BLOCK
-
-    d->url = url;
-    d->artistPtr = Meta::ArtistPtr ( new CueArtist ( QPointer<Track::Private> ( d ) ) );
-    d->albumPtr = Meta::AlbumPtr ( new CueAlbum ( QPointer<Track::Private> ( d ) ) );
-
-    setTitle ( MetaFile::Track::name() );
-    setArtist ( MetaFile::Track::artist()->name() );
-    setAlbum ( MetaFile::Track::album()->name() );
-    setTrackNumber ( MetaFile::Track::trackNumber() );
-
-    m_cueitems = CueFileSupport::loadCueFile( this );
-}
-
-Track::~Track()
-{
-    delete d;
-}
-
-CueFileItemMap Track::cueItems() const
-{
-    return m_cueitems;
-}
-
-void Track::subscribe ( Meta::Observer *observer )
-{
-    DEBUG_BLOCK
-    debug() << "Adding observer: " << observer;
-    m_observers.insert ( observer );
-}
-
-void Track::unsubscribe ( Meta::Observer *observer )
-{
-    DEBUG_BLOCK
-    debug() << "Removing observer: " << observer;
-    m_observers.remove ( observer );
-}
-
-void Track::notify() const
-{
-    foreach ( Meta::Observer *observer, m_observers )
-    {
-//         debug() << "Notifying observer: " << observer;
-        observer->metadataChanged ( Meta::TrackPtr ( Meta::TrackPtr ( const_cast<MetaCue::Track*> ( d->track ) ) ) );
-    }
-}
-
-void Track::engineTrackPositionChanged( qint64 position, bool userSeek )
-{
-    Meta::TrackPtr currentTrack = The::engineController()->currentTrack();
-    if ( !currentTrack || currentTrack->playableUrl().url() != MetaFile::Track::playableUrl().url() )
-        return;
-//     debug() << "userSeek: " << userSeek << " pos: " << position << " lastseekPos: " << m_lastSeekPos;
-    if ( userSeek || position > m_lastSeekPos )
-    {
-        CueFileItemMap::Iterator it = m_cueitems.end();
-        while ( it != m_cueitems.begin() )
-        {
-            --it;
-//             debug() << "Checking " << position << " against pos " << it.key()/1000 << " title " << (*it).getTitle() << endl;
-            if ( it.key() <= position )
-            {
-//                 debug() << "\tcurr: " << currentTrack->artist()->name() << " " << currentTrack->album()->name() << " " <<  currentTrack->name() << " "<< currentTrack->trackNumber();
-//                 debug() << "\titer: " << (*it).getArtist() << " " << (*it).getAlbum() << " " << (*it).getTitle()<< " " << (*it).getTrackNumber();
-                bool artistCheck = currentTrack->artist() && currentTrack->artist()->name() != ( *it ).getArtist();
-                bool albumCheck = currentTrack->album() && currentTrack->album()->name() != ( *it ).getAlbum();
-                bool titleCheck = ( *it ).getTitle() != currentTrack->name();
-                bool trackNumCheck = ( *it ).getTrackNumber() != currentTrack->trackNumber();
-                if ( artistCheck || albumCheck || titleCheck || trackNumCheck )
-                {
-                    setTitle ( ( *it ).getTitle() );
-                    setArtist ( ( *it ).getArtist() );
-                    setAlbum ( ( *it ).getAlbum() );
-                    setTrackNumber ( ( *it ).getTrackNumber() );
-
-                    long length = ( *it ).getLength();
-                    if ( length == -1 ) // need to calculate
-                    {
-                        ++it;
-                        long nextKey = it == m_cueitems.end() ? currentTrack->length() : it.key();
-                        --it;
-                        length = qMax ( nextKey - it.key(), 0L );
-                    }
-                    //emit newCuePoint( position, it.key() / 1000, ( it.key() + length ) / 1000 );
-                    notify();
-                }
-                break;
-            }
-        }
-    }
-
-    m_lastSeekPos = position;
-}
-
-
-QString
-Track::name() const
-{
-    return d->title;
-}
-
-QString
-Track::prettyName() const
-{
-    return name();
-}
-
-QString
-Track::fullPrettyName() const
-{
-    return name();
-}
-
-QString
-Track::sortableName() const
-{
-    return name();
-}
-
-Meta::AlbumPtr
-Track::album() const
-{
-    return d->albumPtr;
-}
-
-Meta::ArtistPtr
-Track::artist() const
-{
-    return d->artistPtr;
-}
-
-
-void
-Track::setAlbum ( const QString &newAlbum )
-{
-    d->album = newAlbum;
-}
-
-void
-Track::setArtist ( const QString& newArtist )
-{
-    d->artist = newArtist;
-}
-
-void
-Track::setTitle ( const QString &newTitle )
-{
-    d->title = newTitle;
-}
-
-int
-Track::trackNumber() const
-{
-    return d->tracknumber;
-}
-
-void
-Track::setTrackNumber ( int newTrackNumber )
-{
-    d->tracknumber = newTrackNumber;
-}
-
-qint64
-Track::length() const
-{
-    return d->length;
-}
-
-bool
-Track::hasCapabilityInterface( Meta::Capability::Type type ) const
-{
-    return type == Meta::Capability::LoadTimecode;
-}
-
-Meta::Capability*
-Track::createCapabilityInterface( Meta::Capability::Type type )
-{
-    switch( type )
-    {
-        case Meta::Capability::LoadTimecode:
-            return new MetaCue::TimecodeLoadCapabilityImpl( this );
-        default:
-            return 0;
-    }
-}
-
diff --git a/src/meta/impl/cue/Cue.h b/src/meta/impl/cue/Cue.h
deleted file mode 100644
index e44498e..0000000
--- a/src/meta/impl/cue/Cue.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Casey Link <unnamedrambler at gmail.com>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_META_CUE_H
-#define AMAROK_META_CUE_H
-
-#include "../file/File.h"
-#include "CueFileSupport.h"
-#include "EngineController.h"
-#include "EngineObserver.h"
-
-#include <QMap>
-#include <QSet>
-
-/*
-Method for locating cue files:
-
-if ( track.url.isLocalFile() )
-{
-    QString path    = track.url().path();
-    QString cueFile = path.left( path.findRev('.') ) + ".cue";
-
-    // other stuff
-}*/
-
-namespace MetaCue
-{
-
-class AMAROK_EXPORT Track : public MetaFile::Track, public EngineObserver
-{
-    public:
-        class Private;
-
-        Track ( const KUrl &url, const KUrl &cuefile );
-        virtual ~Track();
-
-        virtual CueFileItemMap cueItems() const;
-
-        virtual void engineTrackPositionChanged ( qint64 /*position*/, bool /*userSeek*/ );
-
-        virtual void subscribe ( Meta::Observer *observer );
-        virtual void unsubscribe ( Meta::Observer *observer );
-
-        //methods inherited from Meta::MetaBase
-        virtual QString name() const;
-        virtual QString prettyName() const;
-        virtual QString fullPrettyName() const;
-        virtual QString sortableName() const;
-
-        virtual int trackNumber() const;
-        virtual qint64 length() const;
-
-        virtual Meta::AlbumPtr album() const;
-        virtual Meta::ArtistPtr artist() const;
-
-
-        virtual void setAlbum ( const QString &newAlbum );
-        virtual void setArtist ( const QString &newArtist );
-        virtual void setTitle ( const QString &newTitle );
-        virtual void setTrackNumber ( int newTrackNumber );
-
-        virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
-        virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
-
-    private:
-        typedef KSharedPtr<Track> TrackPtr;
-
-        void notify() const;
-
-        KUrl m_cuefile;
-        int m_lastSeekPos; // in seconds
-        CueFileItemMap m_cueitems;
-        QSet<Meta::Observer*> m_observers;
-
-        Private * const d;
-};
-
-}
-
-#endif  // end include guard
diff --git a/src/meta/impl/cue/CueFileSupport.cpp b/src/meta/impl/cue/CueFileSupport.cpp
deleted file mode 100644
index defd2ab..0000000
--- a/src/meta/impl/cue/CueFileSupport.cpp
+++ /dev/null
@@ -1,444 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.com>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Pulic License for more details.              *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-
-#include "CueFileSupport.h"
-
-#include "Debug.h"
-#include "timecode/TimecodeMeta.h"
-
-#include <KEncodingProber>
-
-#include <QDir>
-#include <QFile>
-#include <QTextCodec>
-
-using namespace MetaCue;
-
-/**
-* Parses a cue sheet file into CueFileItems and inserts them in a QMap
-* @return a map of CueFileItems. If the cue file was not successfully loaded
-*         the map is empty.
-* @author (C) 2005 by Martin Ehmke <ehmke at gmx.de>
-*/
-
-CueFileItemMap CueFileSupport::loadCueFile( Meta::TrackPtr track )
-{
-
-    //attempt to find cue file, return empty map if not found or invalid
-    KUrl cuefile = locateCueSheet( track->playableUrl() );
-    if( cuefile.isEmpty() )
-    {
-        debug() << "No cue file found for track " << track->playableUrl();
-        return CueFileItemMap();
-    }
-
-    return loadCueFile( cuefile, track->length() );
-}
-
-
-CueFileItemMap CueFileSupport::loadCueFile( const KUrl &cuefile, qint64 mediaLength  )
-{
-
-    DEBUG_BLOCK
-
-    CueFileItemMap cueItems;
-    
-    debug() << "CUEFILE: " << cuefile.pathOrUrl();
-    if ( QFile::exists ( cuefile.pathOrUrl() ) )
-    {
-        debug() << "  EXISTS!";
-        QFile file ( cuefile.pathOrUrl() );
-        int track = 0;
-        QString defaultArtist;
-        QString defaultAlbum;
-        QString artist;
-        QString title;
-        long length = 0;
-        long prevIndex = -1;
-        bool index00Present = false;
-        long index = -1;
-
-        int mode = BEGIN;
-        if ( file.open ( QIODevice::ReadOnly ) )
-        {
-            QTextStream stream ( &file );
-            QString line;
-            KEncodingProber prober;
-
-            KEncodingProber::ProberState result = prober.feed( file.readAll() );
-            file.seek( 0 );
-
-            if( result != KEncodingProber::NotMe )
-                stream.setCodec( QTextCodec::codecForName( prober.encoding() ) );
-
-            debug() << "Encoding: " << prober.encoding();
-
-            while ( !stream.atEnd() )
-            {
-                line = stream.readLine().simplified();
-
-                if ( line.startsWith ( "title", Qt::CaseInsensitive ) )
-                {
-                    title = line.mid ( 6 ).remove ( '"' );
-                    if ( mode == BEGIN )
-                    {
-                        defaultAlbum = title;
-                        title.clear();
-                        debug() << "Album: " << defaultAlbum;
-                    }
-                    else
-                        debug() << "Title: " << title;
-                }
-
-                else if ( line.startsWith ( "performer", Qt::CaseInsensitive ) )
-                {
-                    artist = line.mid ( 10 ).remove ( '"' );
-                    if ( mode == BEGIN )
-                    {
-                        defaultArtist = artist;
-                        artist.clear();
-                        debug() << "Album Artist: " << defaultArtist;
-                    }
-                    else
-                        debug() << "Artist: " << artist;
-                }
-
-                else if ( line.startsWith ( "track", Qt::CaseInsensitive ) )
-                {
-                    if ( mode == TRACK_FOUND )
-                    {
-                        // not valid, because we have to have an index for the previous track
-                        file.close();
-                        debug() << "Mode is TRACK_FOUND, abort.";
-                        return CueFileItemMap();
-                    }
-                    if ( mode == INDEX_FOUND )
-                    {
-                        if ( artist.isNull() )
-                            artist = defaultArtist;
-
-                        debug() << "Inserting item: " << title << " - " << artist << " on " << defaultAlbum << " (" << track << ")";
-                        // add previous entry to map
-                        cueItems.insert ( index, CueFileItem ( title, artist, defaultAlbum, track, index ) );
-                        prevIndex = index;
-                        title.clear();
-                        artist.clear();
-                        track  = 0;
-                    }
-                    track = line.section ( ' ',1,1 ).toInt();
-                    debug() << "Track: " << track;
-                    mode = TRACK_FOUND;
-                }
-                else if ( line.startsWith ( "index", Qt::CaseInsensitive ) )
-                {
-                    if ( mode == TRACK_FOUND )
-                    {
-                        int indexNo = line.section ( ' ',1,1 ).toInt();
-
-                        if ( indexNo == 1 )
-                        {
-                            QStringList time = line.section ( ' ', -1, -1 ).split ( ':' );
-
-                            index = time[0].toLong() *60*1000 + time[1].toLong() *1000 + time[2].toLong() *1000/75; //75 frames per second
-
-                            if ( prevIndex != -1 && !index00Present ) // set the prev track's length if there is INDEX01 present, but no INDEX00
-                            {
-                                length = index - prevIndex;
-                                debug() << "Setting length of track " << cueItems[prevIndex].getTitle() << " to " << length << " msecs.";
-                                cueItems[prevIndex].setLength ( length );
-                            }
-
-                            index00Present = false;
-                            mode = INDEX_FOUND;
-                            length = 0;
-                        }
-
-                        else if ( indexNo == 0 ) // gap, use to calc prev track length
-                        {
-                            QStringList time = line.section ( ' ', -1, -1 ).split ( ':' );
-
-                            length = time[0].toLong() * 60 * 1000 + time[1].toLong() * 1000 + time[2].toLong() *1000/75; //75 frames per second
-
-                            if ( prevIndex != -1 )
-                            {
-                                length -= prevIndex; //this[prevIndex].getIndex();
-                                debug() << "Setting length of track " << cueItems[prevIndex].getTitle() << " to " << length << " msecs.";
-                                cueItems[prevIndex].setLength ( length );
-                                index00Present = true;
-                            }
-                            else
-                                length =  0;
-                        }
-                        else
-                        {
-                            debug() << "Skipping unsupported INDEX " << indexNo;
-                        }
-                    }
-                    else
-                    {
-                        // not valid, because we don't have an associated track
-                        file.close();
-                        debug() << "Mode is not TRACK_FOUND but encountered INDEX, abort.";
-                        return CueFileItemMap();
-                    }
-                    debug() << "index: " << index;
-                }
-            }
-
-            if ( artist.isNull() )
-                artist = defaultArtist;
-
-            debug() << "Inserting item: " << title << " - " << artist << " on " << defaultAlbum << " (" << track << ")";
-            // add previous entry to map
-            cueItems.insert ( index, CueFileItem ( title, artist, defaultAlbum, track, index ) );
-            file.close();
-        }
-
-        /**
-        *  Because there is no way to set the length for the last track in a normal way,
-        *  we have to do some magic here. Having the total length of the media file given
-        *  we can set the lenth for the last track after all the cue file was loaded into array.
-        */
-
-        cueItems[index].setLength ( mediaLength - index );
-        debug() << "Setting length of track " << cueItems[index].getTitle() << " to " << mediaLength - index << " msecs.";
-
-        return cueItems;
-    }
-    return CueFileItemMap();
-}
-
-KUrl CueFileSupport::locateCueSheet ( const KUrl &trackurl )
-{
-    if ( !trackurl.isValid() || !trackurl.isLocalFile() )
-        return KUrl();
-    // look for the cue file that matches the media file
-    QString path    = trackurl.path();
-    QString cueFile = path.left ( path.lastIndexOf ( '.' ) ) + ".cue";
-
-    if ( validateCueSheet ( cueFile ) )
-    {
-        debug() << "[CUEFILE]: " << cueFile << " - Shoot blindly, found and loaded. ";
-        return KUrl ( cueFile );
-    }
-    debug() << "[CUEFILE]: " << cueFile << " - Shoot blindly and missed, searching for other cue files.";
-
-    bool foundCueFile = false;
-    QDir dir ( trackurl.directory() );
-    QStringList filters;
-    filters << "*.cue" << "*.CUE";
-    dir.setNameFilters ( filters );
-
-    QStringList cueFilesList = dir.entryList();
-
-    if ( !cueFilesList.empty() )
-        for ( QStringList::Iterator it = cueFilesList.begin(); it != cueFilesList.end() && !foundCueFile; ++it )
-        {
-            QFile file ( dir.filePath ( *it ) );
-            if ( file.open ( QIODevice::ReadOnly ) )
-            {
-                debug() << "[CUEFILE]: " << *it << " - Opened, looking for the matching FILE stanza." << endl;
-                QTextStream stream ( &file );
-                QString line;
-
-                while ( !stream.atEnd() && !foundCueFile )
-                {
-                    line = stream.readLine().simplified();
-
-                    if ( line.startsWith ( "file", Qt::CaseInsensitive ) )
-                    {
-                        line = line.mid ( 5 ).remove ( '"' );
-
-                        if ( line.contains ( trackurl.fileName(), Qt::CaseInsensitive ) )
-                        {
-                            cueFile = dir.filePath ( *it );
-
-                            if ( validateCueSheet ( cueFile ) )
-                            {
-                                debug() << "[CUEFILE]: " << cueFile << " - Looked inside cue files, found and loaded proper one" << endl;
-                                foundCueFile = true;
-                            }
-                        }
-                    }
-                }
-
-                file.close();
-            }
-        }
-
-    if ( foundCueFile )
-        return KUrl ( cueFile );
-    debug() << "[CUEFILE]: - Didn't find any matching cue file." << endl;
-    return KUrl();
-}
-
-bool CueFileSupport::validateCueSheet ( const QString& cuefile )
-{
-    if ( !QFile::exists ( cuefile ) )
-        return false;
-
-    QFile file ( cuefile );
-    int track = 0;
-    QString defaultArtist;
-    QString defaultAlbum;
-    QString artist;
-    QString title;
-    long length = 0;
-    long prevIndex = -1;
-    bool index00Present = false;
-    long index = -1;
-
-    int mode = BEGIN;
-    if ( file.open ( QIODevice::ReadOnly ) )
-    {
-        QTextStream stream ( &file );
-        QString line;
-
-        while ( !stream.atEnd() )
-        {
-            line = stream.readLine().simplified();
-
-            if ( line.startsWith ( "title", Qt::CaseInsensitive ) )
-            {
-                title = line.mid ( 6 ).remove ( '"' );
-                if ( mode == BEGIN )
-                {
-                    defaultAlbum = title;
-                    title.clear();
-                    debug() << "Album: " << defaultAlbum;
-                }
-                else
-                    debug() << "Title: " << title;
-            }
-
-            else if ( line.startsWith ( "performer", Qt::CaseInsensitive ) )
-            {
-                artist = line.mid ( 10 ).remove ( '"' );
-                if ( mode == BEGIN )
-                {
-                    defaultArtist = artist;
-                    artist.clear();
-                    debug() << "Album Artist: " << defaultArtist;
-                }
-                else
-                    debug() << "Artist: " << artist;
-            }
-
-            else if ( line.startsWith ( "track", Qt::CaseInsensitive ) )
-            {
-                if ( mode == TRACK_FOUND )
-                {
-                    // not valid, because we have to have an index for the previous track
-                    file.close();
-                    debug() << "Mode is TRACK_FOUND, abort.";
-                    return false;
-                }
-                if ( mode == INDEX_FOUND )
-                {
-                    if ( artist.isNull() )
-                        artist = defaultArtist;
-
-                    prevIndex = index;
-                    title.clear();
-                    artist.clear();
-                    track  = 0;
-                }
-                track = line.section ( ' ',1,1 ).toInt();
-                debug() << "Track: " << track;
-                mode = TRACK_FOUND;
-            }
-            else if ( line.startsWith ( "index", Qt::CaseInsensitive ) )
-            {
-                if ( mode == TRACK_FOUND )
-                {
-                    int indexNo = line.section ( ' ',1,1 ).toInt();
-
-                    if ( indexNo == 1 )
-                    {
-                        QStringList time = line.section ( ' ', -1, -1 ).split ( ':' );
-
-                        index = time[0].toLong() *60*1000 + time[1].toLong() *1000 + time[2].toLong() *1000/75; //75 frames per second
-
-                        if ( prevIndex != -1 && !index00Present ) // set the prev track's length if there is INDEX01 present, but no INDEX00
-                        {
-                            length = index - prevIndex;
-                        }
-
-                        index00Present = false;
-                        mode = INDEX_FOUND;
-                        length = 0;
-                    }
-
-                    else if ( indexNo == 0 ) // gap, use to calc prev track length
-                    {
-                        QStringList time = line.section ( ' ', -1, -1 ).split ( ':' );
-
-                        length = time[0].toLong() *60*1000 + time[1].toLong() *1000 + time[2].toLong() *1000/75; //75 frames per second
-
-                        if ( prevIndex != -1 )
-                        {
-                            length -= prevIndex; //this[prevIndex].getIndex();
-                            index00Present = true;
-                        }
-                        else
-                            length =  0;
-                    }
-                    else
-                    {
-                        debug() << "Skipping unsupported INDEX " << indexNo;
-                    }
-                }
-                else
-                {
-                    // not valid, because we don't have an associated track
-                    file.close();
-                    debug() << "Mode is not TRACK_FOUND but encountered INDEX, abort.";
-                    return false;
-                }
-                debug() << "index: " << index;
-            }
-        }
-
-        if ( artist.isNull() )
-            artist = defaultArtist;
-
-        file.close();
-    }
-    return true;
-}
-
-
-Meta::TrackList
-CueFileSupport::generateTimeCodeTracks( Meta::TrackPtr baseTrack, CueFileItemMap itemMap )
-{
-    Meta::TrackList trackList;
-
-    foreach( CueFileItem item, itemMap )
-    {
-        Meta::TimecodeTrack * track = new Meta::TimecodeTrack( item.getTitle(), baseTrack->playableUrl().url(), item.getIndex(), item.getIndex() + item.getLength() );
-        track->beginMetaDataUpdate();
-        track->setArtist( item.getArtist() );
-        track->setAlbum( item.getAlbum() );
-        track->setTrackNumber( item.getTrackNumber() );
-        track->endMetaDataUpdate();
-
-        trackList << Meta::TrackPtr( track );
-    }
-
-    return trackList;
-    
-}
diff --git a/src/meta/impl/cue/CueFileSupport.h b/src/meta/impl/cue/CueFileSupport.h
deleted file mode 100644
index 99e095b..0000000
--- a/src/meta/impl/cue/CueFileSupport.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.com>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Pulic License for more details.              *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-
-#ifndef CUEFILESUPPORT_H
-#define CUEFILESUPPORT_H
-
-#include "meta/Meta.h"
-
-#include <KUrl>
-
-#include <QFile>
-#include <QSet>
-#include <QString>
-
-namespace MetaCue
-{
-
-class CueFileItem
-{
-public:
-    CueFileItem ( const QString& title, const QString& artist, const QString& album, const int trackNumber, const long index )
-            : m_title ( title )
-            , m_artist ( artist )
-            , m_album ( album )
-            , m_trackNumber ( trackNumber )
-            , m_index ( index )
-            , m_length ( -1 )
-    {}
-
-    CueFileItem()
-            : m_title( )
-            , m_artist( )
-            , m_album( )
-            , m_trackNumber ( -1 )
-            , m_index ( -1 )
-            , m_length ( -1 )
-    {}
-    void setLength ( const long length )
-    {
-        m_length = length;
-    }
-    const QString getTitle () const
-    {
-        return m_title;
-    }
-    const QString getArtist () const
-    {
-        return m_artist;
-    }
-    const QString getAlbum () const
-    {
-        return m_album;
-    }
-    int getTrackNumber () const
-    {
-        return m_trackNumber;
-    }
-    long getIndex () const
-    {
-        return m_index;
-    }
-    long getLength () const
-    {
-        return m_length;
-    }
-
-private:
-    QString m_title;
-    QString m_artist;
-    QString m_album;
-    int     m_trackNumber;
-    long    m_index;
-    long    m_length;
-
-    //QSet<Meta::Observer*> observers;
-    KUrl m_url;
-};
-
-typedef QMap<long, CueFileItem> CueFileItemMap;
-
-
-class CueFileSupport
-{
-
-    public:
-
-    enum Markers
-    {
-        BEGIN = 0,
-        TRACK_FOUND, // track found, index not yet found
-        INDEX_FOUND
-    };
-        
-     static CueFileItemMap loadCueFile( Meta::TrackPtr track );
-
-     static CueFileItemMap loadCueFile( const KUrl &cuefile, qint64 mediaLength );
-        
-     /**
-     * Used to locate a cue sheet for a local track.
-     * @return A KUrl containing the url for the cue sheet
-     *         if a valid one was located
-     */
-    static KUrl locateCueSheet ( const KUrl &trackurl );
-
-    /**
-     * Attempts to load and parse a cue sheet.
-     * @return true if the cue sheet is valid
-     *         false if the cue sheet is invalid
-     */
-    static bool validateCueSheet ( const QString& cuefile );
-
-    static Meta::TrackList generateTimeCodeTracks( Meta::TrackPtr baseTrack, CueFileItemMap itemMap );
-};
-
-}
-
-#endif // CUEFILESUPPORT_H
diff --git a/src/meta/impl/cue/Cue_p.h b/src/meta/impl/cue/Cue_p.h
deleted file mode 100644
index 8c0413e..0000000
--- a/src/meta/impl/cue/Cue_p.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007-2008 Maximilian Kossick <maximilian.kossick at googlemail.com>       *
- * Copyright (c) 2008 Mark Kretschmann <kretschmann at kde.org>                            *
- * Copyright (c) 2008 Casey Link <unnamedrambler at gmail.com>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_CUE_P_H
-#define AMAROK_CUE_P_H
-
-#include "Debug.h"
-#include "EngineController.h"
-#include "EngineObserver.h"
-#include "Meta.h"
-#include "meta/support/MetaConstants.h"
-
-#include <QList>
-#include <QObject>
-
-using namespace MetaCue;
-
-class MetaCue::Track::Private : public QObject//, public EngineObserver
-{
-    Q_OBJECT
-public:
-    Private ( Track *t )
-    //      : EngineObserver( The::engineController() )
-            : title()
-            , artist()
-            , album()
-            , tracknumber( 0 )
-            , length( 0 )
-            , track ( t )
-    {}
-
-    QSet<Meta::Observer*> observers;
-    KUrl url;
-    QString title;
-    QString artist;
-    QString album;
-    int tracknumber;
-    qint64 length;
-
-    Meta::ArtistPtr artistPtr;
-    Meta::AlbumPtr albumPtr;
-    Meta::GenrePtr genrePtr;
-    Meta::ComposerPtr composerPtr;
-    Meta::YearPtr yearPtr;
-
-//    private:
-    Track *track;
-};
-
-
-// internal helper classes
-
-class CueArtist : public Meta::Artist
-{
-public:
-    CueArtist ( MetaCue::Track::Private *dptr )
-            : Meta::Artist()
-            , d ( dptr )
-    {}
-
-    Meta::TrackList tracks()
-    {
-        return Meta::TrackList();
-    }
-
-    Meta::AlbumList albums()
-    {
-        return Meta::AlbumList();
-    }
-
-    QString name() const
-    {
-        if ( d )
-            return d->artist;
-        return QString();
-    }
-
-    QString prettyName() const
-    {
-        return name();
-    }
-
-    bool operator==( const Meta::Artist &other ) const {
-        return name() == other.name();
-    }
-
-    MetaCue::Track::Private * const d;
-};
-
-class CueAlbum : public Meta::Album
-{
-public:
-    CueAlbum ( MetaCue::Track::Private *dptr )
-            : Meta::Album()
-            , d ( dptr )
-    {}
-
-    bool isCompilation() const
-    {
-        return false;
-    }
-
-    bool hasAlbumArtist() const
-    {
-        return false;
-    }
-
-    Meta::ArtistPtr albumArtist() const
-    {
-        return Meta::ArtistPtr();
-    }
-
-    Meta::TrackList tracks()
-    {
-        return Meta::TrackList();
-    }
-
-    QString name() const
-    {
-        if ( d )
-            return d->album;
-        return QString();
-    }
-
-    QString prettyName() const
-    {
-        return name();
-    }
-
-    QPixmap image ( int size )
-    {
-        return Meta::Album::image ( size );
-    }
-
-    bool operator==( const Meta::Album &other ) const {
-        return name() == other.name();
-    }
-
-    MetaCue::Track::Private * const d;
-};
-
-
-#endif
diff --git a/src/meta/impl/default/DefaultMetaTypes.h b/src/meta/impl/default/DefaultMetaTypes.h
deleted file mode 100644
index 206bb80..0000000
--- a/src/meta/impl/default/DefaultMetaTypes.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) version 3 or        *
- * any later version accepted by the membership of KDE e.V. (or its successor approved  *
- * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of  *
- * version 3 of the license.                                                            *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef DEFAULTMETATYPES_H
-#define DEFAULTMETATYPES_H
-
-#include "amarok_export.h"
-#include "Debug.h"
-#include "Meta.h"
-
-#include <KLocale>
-
-
-namespace Meta
-{
-
-class AMAROK_EXPORT DefaultArtist : public Meta::Artist
-{
-    public:
-
-        DefaultArtist() {};
-        virtual ~DefaultArtist() {};
-
-        virtual QString name() const { return i18nc( "The value is not known", "Unknown" ); }
-        virtual QString prettyName() const { return name(); };
-
-        virtual TrackList tracks() { return TrackList(); }
-        virtual AlbumList albums() { return AlbumList(); }
-
-};
-
-class AMAROK_EXPORT DefaultAlbum : public Meta::Album
-{
-    public:
-
-        DefaultAlbum()
-            : Meta::Album()
-            , m_albumArtist( new DefaultArtist() ) {}
-        virtual ~DefaultAlbum() {};
-
-        virtual bool hasAlbumArtist() const { return true; }
-        virtual ArtistPtr albumArtist() const { return m_albumArtist; }
-
-        virtual bool isCompilation() const { return false; }
-
-        virtual QString name() const { return i18nc( "The Value is not known", "Unknown" ); }
-        virtual QString prettyName() const { return name(); };
-
-        virtual TrackList tracks() { return TrackList(); }
-
-    private:
-        Meta::ArtistPtr m_albumArtist;
-
-};
-
-
-class AMAROK_EXPORT DefaultComposer : public Meta::Composer
-{
-    public:
-
-        DefaultComposer() {};
-        virtual ~DefaultComposer() {};
-        
-        virtual QString name() const { return i18nc( "The value is not known", "Unknown" ); }
-        virtual QString prettyName() const { return name(); };
-
-        virtual TrackList tracks() { return TrackList(); }
-
-    private:
-
-        static ComposerPtr s_instance;
-
-};
-
-class AMAROK_EXPORT DefaultGenre : public Meta::Genre
-{
-    public:
-
-        DefaultGenre() {};
-        virtual ~DefaultGenre() {};
-        
-        virtual QString name() const { return i18nc( "The value is not known", "Unknown" ); }
-        virtual QString prettyName() const { return name(); };
-
-        virtual TrackList tracks() { return TrackList(); }
-
-};
-class AMAROK_EXPORT DefaultYear : public Meta::Year
-{
-    public:
-
-        DefaultYear() {};
-        virtual ~DefaultYear() {};
-        
-        virtual QString name() const { return "0"; }
-        virtual QString prettyName() const { return name(); };
-
-        virtual TrackList tracks() { return TrackList(); }
-
-};
-
-}
-
-#endif
-
-
diff --git a/src/meta/impl/file/File.cpp b/src/meta/impl/file/File.cpp
deleted file mode 100644
index cbd3d5f..0000000
--- a/src/meta/impl/file/File.cpp
+++ /dev/null
@@ -1,705 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- * Copyright (c) 2008 Seb Ruiz <ruiz at kde.org>                                           *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "File.h"
-#include "File_p.h"
-
-#include "Amarok.h"
-#include "amarokurls/BookmarkMetaActions.h"
-#include "browsers/filebrowser/FileBrowser.h"
-#include <config-amarok.h>
-#include "MainWindow.h"
-#include "meta/Meta.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "capabilities/EditCapability.h"
-#include "capabilities/FindInSourceCapability.h"
-#include "capabilities/StatisticsCapability.h"
-#include "capabilities/TimecodeWriteCapability.h"
-#include "capabilities/TimecodeLoadCapability.h"
-#include "statistics/providers/url/PermanentUrlStatisticsProvider.h"
-#include "meta/support/MetaUtility.h"
-#include "amarokurls/PlayUrlRunner.h"
-
-#include <QAction>
-#include <QList>
-#include <QPointer>
-#include <QString>
-
-#ifdef HAVE_LIBLASTFM
-  #include "LastfmReadLabelCapability.h"
-#endif
-using namespace MetaFile;
-
-class EditCapabilityImpl : public Meta::EditCapability
-{
-    Q_OBJECT
-    public:
-        EditCapabilityImpl( MetaFile::Track *track )
-            : Meta::EditCapability()
-            , m_track( track )
-        {}
-
-        virtual bool isEditable() const { return m_track->isEditable(); }
-        virtual void setAlbum( const QString &newAlbum ) { m_track->setAlbum( newAlbum ); }
-        virtual void setArtist( const QString &newArtist ) { m_track->setArtist( newArtist ); }
-        virtual void setComposer( const QString &newComposer ) { m_track->setComposer( newComposer ); }
-        virtual void setGenre( const QString &newGenre ) { m_track->setGenre( newGenre ); }
-        virtual void setYear( const QString &newYear ) { m_track->setYear( newYear ); }
-        virtual void setBpm( const float newBpm ) { m_track->setBpm( newBpm ); }
-        virtual void setTitle( const QString &newTitle ) { m_track->setTitle( newTitle ); }
-        virtual void setComment( const QString &newComment ) { m_track->setComment( newComment ); }
-        virtual void setTrackNumber( int newTrackNumber ) { m_track->setTrackNumber( newTrackNumber ); }
-        virtual void setDiscNumber( int newDiscNumber ) { m_track->setDiscNumber( newDiscNumber ); }
-        virtual void beginMetaDataUpdate() { m_track->beginMetaDataUpdate(); }
-        virtual void endMetaDataUpdate() { m_track->endMetaDataUpdate(); }
-        virtual void abortMetaDataUpdate() { m_track->abortMetaDataUpdate(); }
-
-    private:
-        KSharedPtr<MetaFile::Track> m_track;
-};
-
-class StatisticsCapabilityImpl : public Meta::StatisticsCapability
-{
-    public:
-        StatisticsCapabilityImpl( MetaFile::Track *track )
-            : Meta::StatisticsCapability()
-            , m_track( track )
-        {}
-
-        virtual void setScore( const int score ) { m_track->setScore( score ); }
-        virtual void setRating( const int rating ) { m_track->setRating( rating ); }
-        virtual void setFirstPlayed( const uint time ) { m_track->setFirstPlayed( time ); }
-        virtual void setLastPlayed( const uint time ) { m_track->setLastPlayed( time ); }
-        virtual void setPlayCount( const int playcount ) { m_track->setPlayCount( playcount ); }
-        virtual void beginStatisticsUpdate() {};
-        virtual void endStatisticsUpdate() {};
-        virtual void abortStatisticsUpdate() {};
-
-    private:
-        KSharedPtr<MetaFile::Track> m_track;
-};
-
-class TimecodeWriteCapabilityImpl : public Meta::TimecodeWriteCapability
-{
-    public:
-        TimecodeWriteCapabilityImpl( MetaFile::Track *track )
-            : Meta::TimecodeWriteCapability()
-            , m_track( track )
-        {}
-
-    virtual bool writeTimecode ( qint64 miliseconds )
-    {
-        DEBUG_BLOCK
-        return Meta::TimecodeWriteCapability::writeTimecode( miliseconds, Meta::TrackPtr( m_track.data() ) );
-    }
-
-    virtual bool writeAutoTimecode ( qint64 miliseconds )
-    {
-        DEBUG_BLOCK
-        return Meta::TimecodeWriteCapability::writeAutoTimecode( miliseconds, Meta::TrackPtr( m_track.data() ) );
-    }
-
-    private:
-        KSharedPtr<MetaFile::Track> m_track;
-};
-
-class TimecodeLoadCapabilityImpl : public Meta::TimecodeLoadCapability
-{
-    public:
-        TimecodeLoadCapabilityImpl( MetaFile::Track *track )
-        : Meta::TimecodeLoadCapability()
-        , m_track( track )
-        {}
-
-        virtual bool hasTimecodes()
-        {
-            if ( loadTimecodes().size() > 0 )
-                return true;
-            return false;
-        }
-
-        virtual BookmarkList loadTimecodes()
-        {
-            BookmarkList list = PlayUrlRunner::bookmarksFromUrl( m_track->playableUrl() );
-            return list;
-        }
-
-    private:
-        KSharedPtr<MetaFile::Track> m_track;
-};
-
-
-class FindInSourceCapabilityImpl : public Meta::FindInSourceCapability
-{
-public:
-    FindInSourceCapabilityImpl( MetaFile::Track *track )
-        : Meta::FindInSourceCapability()
-        , m_track( track )
-        {}
-        
-    virtual void findInSource()
-    {
-        //first show the filebrowser
-        AmarokUrl url;
-        url.setCommand( "navigate" );
-        url.setPath( "files" );
-        url.run();
-
-        //then navigate to the correct directory
-        BrowserCategory * fileCategory = The::mainWindow()->browserWidget()->list()->activeCategoryRecursive();
-        if( fileCategory )
-        {
-            FileBrowser * fileBrowser = dynamic_cast<FileBrowser *>( fileCategory );
-            if( fileBrowser )
-            {
-                //get the path of the parent directory of the file
-                KUrl playableUrl = m_track->playableUrl();
-                fileBrowser->setDir( playableUrl.directory() );       
-            }
-        }
-    }
-
-private:
-    KSharedPtr<MetaFile::Track> m_track;
-};
-
-
-Track::Track( const KUrl &url )
-    : Meta::Track()
-    , d( new Track::Private( this ) )
-{
-    d->url = url;
-    d->provider = new PermanentUrlStatisticsProvider( url.url() );
-    d->readMetaData();
-    d->album = Meta::AlbumPtr( new MetaFile::FileAlbum( QPointer<MetaFile::Track::Private>( d ) ) );
-    d->artist = Meta::ArtistPtr( new MetaFile::FileArtist( QPointer<MetaFile::Track::Private>( d ) ) );
-    d->genre = Meta::GenrePtr( new MetaFile::FileGenre( QPointer<MetaFile::Track::Private>( d ) ) );
-    d->composer = Meta::ComposerPtr( new MetaFile::FileComposer( QPointer<MetaFile::Track::Private>( d ) ) );
-    d->year = Meta::YearPtr( new MetaFile::FileYear( QPointer<MetaFile::Track::Private>( d ) ) );
-}
-
-Track::~Track()
-{
-    delete d->provider;
-    delete d;
-}
-
-QString
-Track::name() const
-{
-    if( d )
-    {
-        const QString trackName = d->m_data.title;
-        return trackName;
-    }
-    return "This is a bug!";
-}
-
-QString
-Track::prettyName() const
-{
-    return name();
-}
-
-QString
-Track::fullPrettyName() const
-{
-    return name();
-}
-
-QString
-Track::sortableName() const
-{
-    return name();
-}
-
-
-KUrl
-Track::playableUrl() const
-{
-    return d->url;
-}
-
-QString
-Track::prettyUrl() const
-{
-    if(d->url.isLocalFile())
-    {
-        return d->url.toLocalFile();
-    }
-    else
-    {
-        return d->url.path();
-    }
-}
-
-QString
-Track::uidUrl() const
-{
-    return d->url.url();
-}
-
-bool
-Track::isPlayable() const
-{
-    //simple implementation, check Internet connectivity or ping server?
-    return true;
-}
-
-bool
-Track::isEditable() const
-{
-    DEBUG_BLOCK
-
-    //note this probably needs more work on *nix
-    QFile::Permissions p;
-    if(d->url.isLocalFile())
-    {
-        p = QFile::permissions( d->url.toLocalFile() );
-    }
-    else
-    {
-        p = QFile::permissions( d->url.path() );
-    }
-    const bool editable = ( p & QFile::WriteUser ) || ( p & QFile::WriteGroup ) || ( p & QFile::WriteOther );
-
-    debug() << d->url.path() << " editable: " << editable;
-    return editable;
-}
-
-Meta::AlbumPtr
-Track::album() const
-{
-    return d->album;
-}
-
-Meta::ArtistPtr
-Track::artist() const
-{
-    return d->artist;
-}
-
-Meta::GenrePtr
-Track::genre() const
-{
-    return d->genre;
-}
-
-Meta::ComposerPtr
-Track::composer() const
-{
-    return d->composer;
-}
-
-Meta::YearPtr
-Track::year() const
-{
-    return d->year;
-}
-
-void
-Track::setAlbum( const QString &newAlbum )
-{
-    DEBUG_BLOCK
-    d->changes.insert( Meta::Field::ALBUM, QVariant( newAlbum ) );
-    debug() << "CHANGES HERE: " << d->changes;
-    if( !d->batchUpdate )
-    {
-        d->m_data.album = newAlbum;
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-void
-Track::setArtist( const QString& newArtist )
-{
-    d->changes.insert( Meta::Field::ARTIST, QVariant( newArtist ) );
-    if( !d->batchUpdate )
-    {
-        d->m_data.artist = newArtist;
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-void
-Track::setGenre( const QString& newGenre )
-{
-    d->changes.insert( Meta::Field::GENRE, QVariant( newGenre ) );
-    if( !d->batchUpdate )
-    {
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-void
-Track::setComposer( const QString& newComposer )
-{
-    d->changes.insert( Meta::Field::COMPOSER, QVariant( newComposer ) );
-    if( !d->batchUpdate )
-    {
-        d->m_data.composer = newComposer;
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-void
-Track::setYear( const QString& newYear )
-{
-    d->changes.insert( Meta::Field::YEAR, QVariant( newYear ) );
-    if( !d->batchUpdate )
-    {
-        d->m_data.year = newYear.toInt();
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-void
-Track::setTitle( const QString &newTitle )
-{
-    d->changes.insert( Meta::Field::TITLE, QVariant( newTitle ) );
-    if( !d->batchUpdate )
-    {
-        d->m_data.title = newTitle;
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-void
-Track::setBpm( const float newBpm )
-{
-    d->changes.insert( Meta::Field::BPM, QVariant( newBpm ) );
-    if( !d->batchUpdate )
-    {
-        d->m_data.bpm = newBpm;
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-float
-Track::bpm() const
-{
-    const float bpm = d->m_data.bpm;
-    return bpm;
-}
-
-QString
-Track::comment() const
-{
-    const QString commentName = d->m_data.comment;
-    if( !commentName.isEmpty() )
-        return commentName;
-    return QString();
-}
-
-void
-Track::setComment( const QString& newComment )
-{
-    d->changes.insert( Meta::Field::COMMENT, QVariant( newComment ) );
-    if( !d->batchUpdate )
-    {
-        d->m_data.comment = newComment;
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-double
-Track::score() const
-{
-
-    if( d->provider )
-        return d->provider->score();
-    else
-        return 0.0;
-}
-
-void
-Track::setScore( double newScore )
-{
-    if( d->provider )
-        d->provider->setScore( newScore );
-}
-
-int
-Track::rating() const
-{
-    if( d->provider )
-        return d->provider->rating();
-    else
-        return 0;
-}
-
-void
-Track::setRating( int newRating )
-{
-    if( d->provider )
-        d->provider->setRating( newRating );
-}
-
-int
-Track::trackNumber() const
-{
-    return d->m_data.trackNumber;
-}
-
-void
-Track::setTrackNumber( int newTrackNumber )
-{
-    d->changes.insert( Meta::Field::TRACKNUMBER, QVariant( newTrackNumber ) );
-    if( !d->batchUpdate )
-    {
-        d->m_data.trackNumber = newTrackNumber;
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-int
-Track::discNumber() const
-{
-    return d->m_data.discNumber;
-}
-
-void
-Track::setDiscNumber( int newDiscNumber )
-{
-    d->changes.insert( Meta::Field::DISCNUMBER, QVariant ( newDiscNumber ) );
-    if( !d->batchUpdate )
-    {
-        d->m_data.discNumber = newDiscNumber;
-        d->writeMetaData();
-        notifyObservers();
-    }
-}
-
-qint64
-Track::length() const
-{
-    qint64 length = d->m_data.length;
-    if( length == -2 /*Undetermined*/ )
-        length = 0;
-    return length;
-}
-
-int
-Track::filesize() const
-{
-    return d->m_data.fileSize;
-}
-
-int
-Track::sampleRate() const
-{
-    int sampleRate = d->m_data.sampleRate;
-    if( sampleRate == -2 /*Undetermined*/ )
-        sampleRate = 0;
-    return sampleRate;
-}
-
-int
-Track::bitrate() const
-{
-   int bitrate = d->m_data.bitRate;
-   if( bitrate == -2 /*Undetermined*/ )
-       bitrate = 0;
-   return bitrate;
-}
-
-QDateTime
-Track::createDate() const
-{
-    return d->m_data.created;
-}
-
-uint
-Track::lastPlayed() const
-{
-    if( d->provider )
-        return d->provider->lastPlayed().toTime_t();
-    else
-        return 0;
-}
-
-void
-Track::setLastPlayed( uint newTime )
-{
-    if( d->provider )
-        d->provider->setLastPlayed( QDateTime::fromTime_t( newTime ) );
-}
-
-uint
-Track::firstPlayed() const
-{
-    if( d->provider )
-        return d->provider->firstPlayed().toTime_t();
-    else
-        return 0;
-}
-
-void
-Track::setFirstPlayed( uint newTime )
-{
-    if( d->provider )
-        d->provider->setFirstPlayed( QDateTime::fromTime_t( newTime ) );
-}
-
-int
-Track::playCount() const
-{
-    if( d->provider )
-        return d->provider->playCount();
-    else
-        return 0;
-}
-
-void
-Track::setPlayCount( int newCount )
-{
-    if( d->provider )
-        d->provider->setPlayCount( newCount );
-}
-
-qreal
-Track::replayGain( Meta::Track::ReplayGainMode mode ) const
-{
-    if ( mode == Meta::Track::AlbumReplayGain )
-        return d->m_data.trackGain;
-    return d->m_data.albumGain;
-}
-
-qreal
-Track::replayPeakGain( Meta::Track::ReplayGainMode mode ) const
-{
-    if ( mode == Meta::Track::AlbumReplayGain )
-        return d->m_data.trackPeak;
-    return d->m_data.albumPeak;
-}
-
-QString
-Track::type() const
-{
-    return Amarok::extension( d->url.fileName() );
-}
-
-void
-Track::beginMetaDataUpdate()
-{
-    d->batchUpdate = true;
-}
-
-void
-Track::endMetaDataUpdate()
-{
- DEBUG_LINE_INFO
-    debug() << "CHANGES HERE: " << d->changes;
-    d->writeMetaData();
-    d->batchUpdate = false;
-    notifyObservers();
-}
-
-void
-Track::abortMetaDataUpdate()
-{
-    d->changes.clear();
-    d->batchUpdate = false;
-}
-
-void
-Track::finishedPlaying( double playedFraction )
-{
-    if( d->provider )
-        d->provider->played( playedFraction );
-}
-
-bool
-Track::inCollection() const
-{
-    return false;
-}
-
-Amarok::Collection*
-Track::collection() const
-{
-    return 0;
-}
-
-bool
-Track::hasCapabilityInterface( Meta::Capability::Type type ) const
-{
-    bool readlabel = false;
-#ifdef HAVE_LIBLASTFM
-    readlabel = true;
-#endif
-    return type == Meta::Capability::Editable ||
-           type == Meta::Capability::Importable ||
-           type == Meta::Capability::CurrentTrackActions ||
-           type == Meta::Capability::WriteTimecode ||
-           type == Meta::Capability::LoadTimecode ||
-           ( type == Meta::Capability::ReadLabel && readlabel ) ||
-           type == Meta::Capability::FindInSource;
-}
-
-Meta::Capability*
-Track::createCapabilityInterface( Meta::Capability::Type type )
-{
-    switch( type )
-    {
-        case Meta::Capability::Editable:
-            return new EditCapabilityImpl( this );
-
-        case Meta::Capability::Importable:
-            return new StatisticsCapabilityImpl( this );
-
-        case Meta::Capability::CurrentTrackActions:
-            {
-                QList< QAction * > actions;
-                QAction* flag = new BookmarkCurrentTrackPositionAction( 0 );
-                actions << flag;
-                debug() << "returning bookmarkcurrenttrack action";
-                return new Meta::CurrentTrackActionsCapability( actions );
-            }
-
-        case Meta::Capability::WriteTimecode:
-            return new TimecodeWriteCapabilityImpl( this );
-
-        case Meta::Capability::LoadTimecode:
-            return new TimecodeLoadCapabilityImpl( this );
-
-        case Meta::Capability::FindInSource:
-            return new FindInSourceCapabilityImpl( this );
-
-#if HAVE_LIBLASTFM
-       case Meta::Capability::ReadLabel:
-           if( !d->readLabelCapability )
-               d->readLabelCapability = new Meta::LastfmReadLabelCapability( this );
-#endif
-
-        default: // fall-through
-
-
-        return 0;
-    }
-}
-
-#include "File.moc"
diff --git a/src/meta/impl/file/File.h b/src/meta/impl/file/File.h
deleted file mode 100644
index 46cdab1..0000000
--- a/src/meta/impl/file/File.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_META_FILE_H
-#define AMAROK_META_FILE_H
-
-#include "meta/Meta.h"
-
-
-namespace MetaFile
-{
-    class Track;
-
-    typedef KSharedPtr<Track> TrackPtr;
-
-    class AMAROK_EXPORT Track : public Meta::Track
-    {
-        public:
-            Track( const KUrl &url );
-            virtual ~Track();
-
-        //methods inherited from Meta::MetaBase
-            virtual QString name() const;
-            virtual QString prettyName() const;
-            virtual QString fullPrettyName() const;
-            virtual QString sortableName() const;
-
-        //methods inherited from Meta::Track
-            virtual KUrl playableUrl() const;
-            virtual QString prettyUrl() const;
-            virtual QString uidUrl() const;
-
-            virtual bool isPlayable() const;
-            virtual bool isEditable() const;
-
-            virtual Meta::AlbumPtr album() const;
-            virtual Meta::ArtistPtr artist() const;
-            virtual Meta::GenrePtr genre() const;
-            virtual Meta::ComposerPtr composer() const;
-            virtual Meta::YearPtr year() const;
-
-            virtual void setAlbum( const QString &newAlbum );
-            virtual void setArtist( const QString &newArtist );
-            virtual void setGenre( const QString &newGenre );
-            virtual void setComposer( const QString &newComposer );
-            virtual void setYear( const QString &newYear );
-
-            virtual void setTitle( const QString &newTitle );
-
-            virtual void setBpm( const float newBpm );
-            virtual float bpm() const;
-
-            virtual QString comment() const;
-            virtual void setComment( const QString &newComment );
-
-            virtual double score() const;
-            virtual void setScore( double newScore );
-
-            virtual int rating() const;
-            virtual void setRating( int newRating );
-
-            virtual int trackNumber() const;
-            virtual void setTrackNumber( int newTrackNumber );
-
-            virtual int discNumber() const;
-            virtual void setDiscNumber( int newDiscNumber );
-
-            virtual qint64 length() const;
-            virtual int filesize() const;
-            virtual int sampleRate() const;
-            virtual int bitrate() const;
-            virtual QDateTime createDate() const;
-            virtual uint lastPlayed() const;
-            virtual void setLastPlayed( uint newTime );
-            virtual uint firstPlayed() const;
-            virtual void setFirstPlayed( uint newTime );
-            virtual int playCount() const;
-            virtual void setPlayCount( int newCount );
-
-            virtual qreal replayGain( ReplayGainMode mode ) const;
-            virtual qreal replayPeakGain( ReplayGainMode mode ) const;
-
-            virtual QString type() const;
-
-            virtual void beginMetaDataUpdate();
-            virtual void endMetaDataUpdate();
-            virtual void abortMetaDataUpdate();
-
-            virtual void finishedPlaying( double playedFraction );
-
-            virtual bool inCollection() const;
-            virtual Amarok::Collection *collection() const;
-
-            virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
-            virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
-
-            class Private;
-
-        private:
-            Private * const d;
-    };
-}
-
-#endif
diff --git a/src/meta/impl/file/File_p.h b/src/meta/impl/file/File_p.h
deleted file mode 100644
index 75da4f1..0000000
--- a/src/meta/impl/file/File_p.h
+++ /dev/null
@@ -1,535 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007-2009 Maximilian Kossick <maximilian.kossick at googlemail.com>       *
- * Copyright (c) 2008 Peter ZHOU <peterzhoulei at gmail.com>                               *
- * Copyright (c) 2008 Seb Ruiz <ruiz at kde.org>                                           *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_META_FILE_P_H
-#define AMAROK_META_FILE_P_H
-
-#include "amarokconfig.h"
-#include "Debug.h"
-#include "meta/Meta.h"
-#include "meta/support/MetaUtility.h"
-#include "meta/impl/file/TagLibUtils.h"
-#include "shared/MetaReplayGain.h"
-#include "statistics/StatisticsProvider.h"
-
-#include <QDateTime>
-#include <QFile>
-#include <QFileInfo>
-#include <QObject>
-#include <QPointer>
-#include <QSet>
-#include <QString>
-#include <QTextCodec>
-
-#include <KEncodingProber>
-#include <KLocale>
-
-// Taglib Includes
-#include <fileref.h>
-#include <tag.h>
-#include <flacfile.h>
-#include <id3v1tag.h>
-#include <id3v2tag.h>
-#include <mpcfile.h>
-#include <mpegfile.h>
-#include <oggfile.h>
-#include <oggflacfile.h>
-#include <tlist.h>
-#include <tstring.h>
-#include <vorbisfile.h>
-#include <mp4file.h>
-
-namespace Meta
-{
-    class LastfmReadLabelCapability;
-}
-
-namespace MetaFile
-{
-
-//d-pointer implementation
-
-struct MetaData
-{
-    MetaData()
-        : discNumber( 0 )
-        , trackNumber( 0 )
-        , length( 0 )
-        , fileSize( 0 )
-        , sampleRate( 0 )
-        , bitRate( 0 )
-        , year( 0 )
-        , bpm( 0.0 )
-        , trackGain( 0.0 )
-        , trackPeak( 0.0 )
-        , albumGain( 0.0 )
-        , albumPeak( 0.0 )
-    { }
-    QString title;
-    QString artist;
-    QString album;
-    QString comment;
-    QString composer;
-    QString genre;
-    QDateTime created;
-    int discNumber;
-    int trackNumber;
-    qint64 length;
-    int fileSize;
-    int sampleRate;
-    int bitRate;
-    int year;
-    float bpm;
-    qreal trackGain;
-    qreal trackPeak;
-    qreal albumGain;
-    qreal albumPeak;
-
-};
-
-class Track::Private : public QObject
-{
-public:
-    Private( Track *t )
-        : QObject()
-        , url()
-        , batchUpdate( false )
-        , album()
-        , artist()
-        , provider( 0 )
-        , track( t )
-    {}
-
-public:
-    KUrl url;
-    bool batchUpdate;
-    Meta::AlbumPtr album;
-    Meta::ArtistPtr artist;
-    Meta::GenrePtr genre;
-    Meta::ComposerPtr composer;
-    Meta::YearPtr year;
-    Meta::StatisticsProvider *provider;
-    QPointer<Meta::LastfmReadLabelCapability> readLabelCapability;
-
-    void readMetaData();
-    QVariantMap changes;
-
-    void writeMetaData() { DEBUG_BLOCK Meta::Field::writeFields( getFileRef(), changes ); changes.clear(); readMetaData(); }
-    MetaData m_data;
-
-private:
-    TagLib::FileRef getFileRef();
-    Track *track;
-};
-
-TagLib::FileRef
-Track::Private::getFileRef()
-{
-#ifdef COMPLEX_TAGLIB_FILENAME
-    const wchar_t * encodedName;
-    if(url.isLocalFile())
-    {
-        encodedName = reinterpret_cast<const wchar_t *>(url.toLocalFile().utf16());
-    }
-    else
-    {
-        encodedName = reinterpret_cast<const wchar_t *>(url.path().utf16());
-    }
-#else
-    QByteArray fileName;
-    if(url.isLocalFile())
-    {
-        fileName = QFile::encodeName( url.toLocalFile() );
-    }
-    else
-    {
-        fileName = QFile::encodeName( url.path() );
-    }
-    const char * encodedName = fileName.constData(); // valid as long as fileName exists
-#endif
-    return TagLib::FileRef( encodedName, true, TagLib::AudioProperties::Fast );
-}
-
-void Track::Private::readMetaData()
-{
-    QFileInfo fi( url.isLocalFile() ? url.toLocalFile() : url.path() );
-    m_data.created = fi.created();
-
-#define strip( x ) TStringToQString( x ).trimmed()
-    TagLib::FileRef fileRef = getFileRef();
-
-    TagLib::Tag *tag = 0;
-    if( !fileRef.isNull() )
-        tag = fileRef.tag();
-
-    if( tag )
-    {
-        m_data.title = strip( tag->title() );
-        m_data.artist = strip( tag->artist() );
-        m_data.album = strip( tag->album() );
-        m_data.comment = strip( tag->comment() );
-        m_data.genre = strip( tag->genre() );
-        m_data.trackNumber = tag->track();
-        m_data.year = tag->year();
-    }
-    if( !fileRef.isNull() )
-    {
-        if( fileRef.audioProperties() )
-        {
-            m_data.bitRate = fileRef.audioProperties()->bitrate();
-            m_data.sampleRate = fileRef.audioProperties()->sampleRate();
-            m_data.length = fileRef.audioProperties()->length() * 1000;
-        }
-
-        Meta::ReplayGainTagMap map = Meta::readReplayGainTags( fileRef );
-        if ( map.contains( Meta::ReplayGain_Track_Gain ) )
-            m_data.trackGain = map[Meta::ReplayGain_Track_Gain];
-        if ( map.contains( Meta::ReplayGain_Track_Peak ) )
-            m_data.trackPeak = map[Meta::ReplayGain_Track_Peak];
-        if ( map.contains( Meta::ReplayGain_Album_Gain ) )
-            m_data.albumGain = map[Meta::ReplayGain_Album_Gain];
-        else
-            m_data.albumGain = m_data.trackGain;
-        if ( map.contains( Meta::ReplayGain_Album_Peak ) )
-            m_data.albumPeak = map[Meta::ReplayGain_Album_Peak];
-        else
-            m_data.albumPeak = m_data.trackPeak;
-    }
-    //This is pretty messy...
-    QString disc;
-    m_data.bpm = -1.0;
-    if( TagLib::MPEG::File *file = dynamic_cast<TagLib::MPEG::File *>( fileRef.file() ) )
-    {
-        if( file->ID3v2Tag() )
-        {
-            const TagLib::ID3v2::FrameListMap flm = file->ID3v2Tag()->frameListMap();
-            if( !flm[ "TPOS" ].isEmpty() )
-                disc = strip( flm[ "TPOS" ].front()->toString() );
-
-            if( !flm[ "TCOM" ].isEmpty() )
-                m_data.composer = strip( flm[ "TCOM" ].front()->toString() );
-
-            if( !flm[ "TPE2" ].isEmpty() )
-                m_data.artist = strip( flm[ "TPE2" ].front()->toString() );
-
-            if( !flm[ "TBPM" ].isEmpty() )
-                m_data.bpm = TStringToQString( flm[ "TBPM" ].front()->toString() ).toFloat();
-
-
-
-        }
-        if( AmarokConfig::useCharsetDetector() && tag )
-        {
-            TagLib::String metaData = tag->title() + tag->artist() + tag->album() + tag->comment();
-            const char* buf = metaData.toCString();
-            size_t len = strlen( buf );
-            KEncodingProber prober;
-            KEncodingProber::ProberState result = prober.feed( buf, len );
-            QString track_encoding( prober.encoding() );
-            if ( result != KEncodingProber::NotMe )
-            {
-                /*  for further information please refer to:
-                    http://doc.trolltech.com/4.4/qtextcodec.html
-                    http://www.mozilla.org/projects/intl/chardet.html
-                */
-                if ( ( track_encoding.toUtf8() == "gb18030" ) || ( track_encoding.toUtf8() == "big5" )
-                    || ( track_encoding.toUtf8() == "euc-kr" ) || ( track_encoding.toUtf8() == "euc-jp" )
-                    || ( track_encoding.toUtf8() == "koi8-r" ) )
-                {
-                    debug () << "Final Codec Name:" << track_encoding.toUtf8();
-                    QTextCodec *codec = QTextCodec::codecForName( track_encoding.toUtf8() );
-                    QTextCodec* utf8codec = QTextCodec::codecForName( "UTF-8" );
-                    QTextCodec::setCodecForCStrings( utf8codec );
-                    if ( codec != 0 )
-                    {
-                        m_data.title = codec->toUnicode( m_data.title.toLatin1() );
-                        m_data.artist = codec->toUnicode( m_data.artist.toLatin1() );
-                        m_data.album = codec->toUnicode( m_data.album.toLatin1() );
-                        m_data.comment = codec->toUnicode( m_data.comment.toLatin1() );
-                        debug() << "track Info Decoded!";
-                    }
-                }
-                else
-                {
-                    debug() << "possible encoding: " << track_encoding.toUtf8();
-                    debug() << "encoding decoded as UTF-8";
-                }
-            }
-        }
-    }
-
-    else if( TagLib::Ogg::Vorbis::File *file = dynamic_cast< TagLib::Ogg::Vorbis::File *>( fileRef.file() ) )
-    {
-        if( file->tag() )
-        {
-            const TagLib::Ogg::FieldListMap flm = file->tag()->fieldListMap();
-            if( !flm[ "COMPOSER" ].isEmpty() )
-                m_data.composer = strip( flm[ "COMPOSER" ].front() );
-            if( !flm[ "DISCNUMBER" ].isEmpty() )
-                disc = strip( flm[ "DISCNUMBER" ].front() );
-            if( !flm[ "BPM" ].isEmpty() )
-                m_data.bpm = TStringToQString( flm[ "BPM" ].front() ).toFloat();
-        }
-    }
-
-    else if( TagLib::FLAC::File *file = dynamic_cast< TagLib::FLAC::File *>( fileRef.file() ) )
-    {
-        if( file->xiphComment() )
-        {
-            const TagLib::Ogg::FieldListMap flm = file->xiphComment()->fieldListMap();
-            if( !flm[ "COMPOSER" ].isEmpty() )
-                m_data.composer = strip( flm[ "COMPOSER" ].front() );
-            if( !flm[ "DISCNUMBER" ].isEmpty() )
-                disc = strip( flm[ "DISCNUMBER" ].front() );
-            if( !flm[ "BPM" ].isEmpty() )
-                m_data.bpm = TStringToQString( flm[ "BPM" ].front() ).toFloat();
-        }
-    }
-    else if( TagLib::MP4::File *file = dynamic_cast<TagLib::MP4::File *>( fileRef.file() ) )
-    {
-        TagLib::MP4::Tag *mp4tag = dynamic_cast< TagLib::MP4::Tag *>( file->tag() );
-        if( mp4tag )
-        {
-            if ( mp4tag->itemListMap().contains( "\xA9wrt" ) )
-                m_data.composer = strip( mp4tag->itemListMap()["\xA9wrt"].toStringList().front() );
-
-            if ( mp4tag->itemListMap().contains( "disk" ) )
-                disc = QString::number( mp4tag->itemListMap()["disk"].toIntPair().first );
-
-            if ( mp4tag->itemListMap().contains( "tmpo" ) )
-                m_data.bpm = mp4tag->itemListMap()["tmpo"].toIntPair().first;
-        }
-    }
-    if( !disc.isEmpty() )
-    {
-        int i = disc.indexOf( '/' );
-        if( i != -1 )
-            m_data.discNumber = disc.left( i ).toInt();
-        else
-            m_data.discNumber = disc.toInt();
-    }
-#undef strip
-    if(url.isLocalFile())
-    {
-        m_data.fileSize = QFile( url.toLocalFile() ).size();
-    }
-    else
-    {
-        m_data.fileSize = QFile( url.path() ).size();
-    }
-
-    //as a last ditch effort, use the filename as the title if nothing else has been found
-    if ( m_data.title.isEmpty() )
-    {
-        m_data.title = url.fileName();
-    }
-
-    debug() << "Read metadata from file for: " + m_data.title;
-}
-
-// internal helper classes
-
-class FileArtist : public Meta::Artist
-{
-public:
-    FileArtist( MetaFile::Track::Private *dptr )
-        : Meta::Artist()
-        , d( dptr )
-    {}
-
-    Meta::TrackList tracks()
-    {
-        return Meta::TrackList();
-    }
-
-    Meta::AlbumList albums()
-    {
-        return Meta::AlbumList();
-    }
-
-    QString name() const
-    {
-        const QString artist = d->m_data.artist;
-        return artist;
-    }
-
-    QString prettyName() const
-    {
-        return name();
-    }
-
-    bool operator==( const Meta::Artist &other ) const {
-        return name() == other.name();
-    }
-
-    QPointer<MetaFile::Track::Private> const d;
-};
-
-class FileAlbum : public Meta::Album
-{
-public:
-    FileAlbum( MetaFile::Track::Private *dptr )
-        : Meta::Album()
-        , d( dptr )
-    {}
-
-    bool isCompilation() const
-    {
-        return false;
-    }
-
-    bool hasAlbumArtist() const
-    {
-        return false;
-    }
-
-    Meta::ArtistPtr albumArtist() const
-    {
-        return Meta::ArtistPtr();
-    }
-
-    Meta::TrackList tracks()
-    {
-        return Meta::TrackList();
-    }
-
-    QString name() const
-    {
-        if( d )
-        {
-            const QString albumName = d->m_data.album;
-            return albumName;
-        }
-        else
-            return QString();
-    }
-
-    QString prettyName() const
-    {
-        return name();
-    }
-
-    QPixmap image( int size )
-    {
-        return Meta::Album::image( size );
-    }
-
-    bool operator==( const Meta::Album &other ) const {
-        return name() == other.name();
-    }
-
-    QPointer<MetaFile::Track::Private> const d;
-};
-
-class FileGenre : public Meta::Genre
-{
-public:
-    FileGenre( MetaFile::Track::Private *dptr )
-        : Meta::Genre()
-        , d( dptr )
-    {}
-
-    Meta::TrackList tracks()
-    {
-        return Meta::TrackList();
-    }
-
-    QString name() const
-    {
-        const QString genreName = d->m_data.genre;
-        return genreName;
-    }
-
-    QString prettyName() const
-    {
-        return name();
-    }
-
-    bool operator==( const Meta::Genre &other ) const {
-        return name() == other.name();
-    }
-
-    QPointer<MetaFile::Track::Private> const d;
-};
-
-class FileComposer : public Meta::Composer
-{
-public:
-    FileComposer( MetaFile::Track::Private *dptr )
-        : Meta::Composer()
-        , d( dptr )
-    {}
-
-    Meta::TrackList tracks()
-    {
-        return Meta::TrackList();
-    }
-
-    QString name() const
-    {
-        const QString composer = d->m_data.composer;
-        return composer;
-     }
-
-    QString prettyName() const
-    {
-        return name();
-    }
-
-    bool operator==( const Meta::Composer &other ) const {
-        return name() == other.name();
-    }
-
-    QPointer<MetaFile::Track::Private> const d;
-};
-
-class FileYear : public Meta::Year
-{
-public:
-    FileYear( MetaFile::Track::Private *dptr )
-        : Meta::Year()
-        , d( dptr )
-    {}
-
-    Meta::TrackList tracks()
-    {
-        return Meta::TrackList();
-    }
-
-    QString name() const
-    {
-        const QString year = QString::number( d->m_data.year );
-        return year;
-    }
-
-    QString prettyName() const
-    {
-        return name();
-    }
-
-    bool operator==( const Meta::Year &other ) const {
-        return name() == other.name();
-    }
-
-    QPointer<MetaFile::Track::Private> const d;
-};
-
-
-}
-
-#endif
diff --git a/src/meta/impl/file/TagLibUtils.cpp b/src/meta/impl/file/TagLibUtils.cpp
deleted file mode 100644
index 6677b67..0000000
--- a/src/meta/impl/file/TagLibUtils.cpp
+++ /dev/null
@@ -1,271 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "TagLibUtils.h"
-
-#include "meta/support/MetaConstants.h"
-
-#include <QFile>
-
-// Taglib
-#include <fileref.h>
-#include <tag.h>
-#include <tlist.h>
-#include <tmap.h>
-#include <tstring.h>
-#include <tstringlist.h>
-#include <flacfile.h>
-#include <id3v2tag.h>
-#include <mpegfile.h>
-#include <oggfile.h>
-#include <oggflacfile.h>
-#include <vorbisfile.h>
-#include <textidentificationframe.h>
-#include <xiphcomment.h>
-#include <mp4file.h>
-#include <mp4item.h>
-#include <mp4tag.h>
-#include <asftag.h>
-
-// Local version of taglib's QStringToTString macro. It is here, because taglib's one is
-// not Qt3Support clean (uses QString::utf8()). Once taglib will be clean of qt3support
-// it is safe to use QStringToTString again
-#define Qt4QStringToTString(s) TagLib::String(s.toUtf8().data(), TagLib::String::UTF8)
-
-void
-Meta::Field::writeFields( const QString &filename, const QVariantMap &changes )
-{
-    #ifdef COMPLEX_TAGLIB_FILENAME
-    const wchar_t* encodedName = reinterpret_cast<const wchar_t *>(filename.utf16());
-    #else
-    QByteArray fileName = QFile::encodeName( filename );
-    const char * encodedName = fileName.constData(); // valid as long as fileName exists
-    #endif
-
-    TagLib::FileRef f = TagLib::FileRef( encodedName, true, TagLib::AudioProperties::Fast );
-    return writeFields( f, changes );
-}
-
-void
-Meta::Field::writeFields( TagLib::FileRef fileref, const QVariantMap &changes )
-{
-    if( fileref.isNull() || changes.isEmpty() )
-        return;
-
-    TagLib::Tag *tag = fileref.tag();
-    if( !tag )
-        return;
-
-    // We should avoid rewriting files to disk if there haven't been any changes to the actual data tags
-    // This method could be called when there are only non-tag attributes to change, like score and rating
-    bool shouldSave = false;
-
-    if( changes.contains( Meta::Field::TITLE ) )
-    {
-        shouldSave = true;
-        const TagLib::String title = Qt4QStringToTString( changes.value( Meta::Field::TITLE ).toString() );
-        tag->setTitle( title );
-    }
-
-    if( changes.contains( Meta::Field::ALBUM ) )
-    {
-        shouldSave = true;
-        const TagLib::String album = Qt4QStringToTString( changes.value( Meta::Field::ALBUM ).toString() );
-        tag->setAlbum( album );
-    }
-
-    if( changes.contains( Meta::Field::ARTIST ) )
-    {
-        shouldSave = true;
-        const TagLib::String artist = Qt4QStringToTString( changes.value( Meta::Field::ARTIST ).toString() );
-        tag->setArtist( artist );
-    }
-
-    if( changes.contains( Meta::Field::COMMENT ) )
-    {
-        shouldSave = true;
-        const TagLib::String comment = Qt4QStringToTString( changes.value( Meta::Field::COMMENT ).toString() );
-        tag->setComment( comment );
-    }
-
-    if( changes.contains( Meta::Field::GENRE ) )
-    {
-        shouldSave = true;
-        const TagLib::String genre = Qt4QStringToTString( changes.value( Meta::Field::GENRE ).toString() );
-        tag->setGenre( genre );
-    }
-    if( changes.contains( Meta::Field::YEAR ) )
-    {
-        shouldSave = true;
-        const unsigned int year = changes.value( Meta::Field::YEAR ).toUInt();
-        tag->setYear( year );
-    }
-    if( changes.contains( Meta::Field::TRACKNUMBER ) )
-    {
-        shouldSave = true;
-        const unsigned int trackNumber = changes.value( Meta::Field::TRACKNUMBER ).toUInt();
-        tag->setTrack( trackNumber );
-    }
-    if ( TagLib::MPEG::File *file = dynamic_cast<TagLib::MPEG::File *>( fileref.file() ) )
-    {
-        if( changes.contains( Meta::Field::COMPOSER ) )
-        {
-            shouldSave = true;
-            if ( file->ID3v2Tag() )
-            {
-                file->ID3v2Tag()->removeFrames( "TCOM" );
-            }
-            QString composer = changes.value( Meta::Field::COMPOSER ).toString();
-            if ( !composer.isEmpty() )
-            {
-                TagLib::ID3v2::TextIdentificationFrame* frame =
-                        new TagLib::ID3v2::TextIdentificationFrame( "TCOM" );
-                frame->setText( Qt4QStringToTString( composer ) );
-                file->ID3v2Tag(true)->addFrame( frame );
-            }
-        }
-        if( changes.contains( Meta::Field::DISCNUMBER ) )
-        {
-            shouldSave = true;
-            if( file->ID3v2Tag() )
-                file->ID3v2Tag()->removeFrames( "TPOS" );
-            const QString discNumber = changes.value( Meta::Field::DISCNUMBER ).toString();
-            if( !discNumber.isEmpty() )
-            {
-                TagLib::ID3v2::TextIdentificationFrame *frame =
-                        new TagLib::ID3v2::TextIdentificationFrame( "TPOS" );
-                frame->setText( Qt4QStringToTString( discNumber ) );
-                file->ID3v2Tag(true)->addFrame( frame );
-            }
-        }
-        if( changes.contains( Meta::Field::BPM ) )
-        {
-            shouldSave = true;
-            if( file->ID3v2Tag() )
-                file->ID3v2Tag()->removeFrames( "TBPM" );
-            if (changes.value( Meta::Field::BPM ).toDouble() > 0) {
-                const QString bpm = changes.value( Meta::Field::BPM ).toString();
-                TagLib::ID3v2::TextIdentificationFrame *frame =
-                        new TagLib::ID3v2::TextIdentificationFrame( "TBPM" );
-                frame->setText( Qt4QStringToTString( bpm ) );
-                file->ID3v2Tag(true)->addFrame( frame );
-            }
-        }
-    }
-    else if ( TagLib::Ogg::Vorbis::File *file = dynamic_cast<TagLib::Ogg::Vorbis::File *>( fileref.file() ) )
-    {
-        if( changes.contains( Meta::Field::COMPOSER ) )
-        {
-            shouldSave = true;
-            const TagLib::String composer = Qt4QStringToTString( changes.value( Meta::Field::COMPOSER ).toString() );
-            file->tag()->addField("COMPOSER", composer);
-        }
-        if( changes.contains( Meta::Field::DISCNUMBER ) )
-        {
-            shouldSave = true;
-            const TagLib::String disc = Qt4QStringToTString( changes.value( Meta::Field::DISCNUMBER ).toString() );
-            file->tag()->addField("DISCNUMBER", disc);
-        }
-        if( changes.contains( Meta::Field::BPM ) )
-        {
-            shouldSave = true;
-            if (changes.value( Meta::Field::BPM ).toDouble() > 0) {
-                const TagLib::String bpm = Qt4QStringToTString( changes.value( Meta::Field::BPM ).toString() );
-                file->tag()->addField("BPM", bpm);
-            } else {
-                file->tag()->removeField("BPM");
-            }
-        }
-    }
-    else if ( TagLib::Ogg::FLAC::File *file = dynamic_cast<TagLib::Ogg::FLAC::File *>( fileref.file() ) )
-    {
-        if( changes.contains( Meta::Field::COMPOSER ) )
-        {
-            shouldSave = true;
-            const TagLib::String composer = Qt4QStringToTString( changes.value( Meta::Field::COMPOSER ).toString() );
-            file->tag()->addField("COMPOSER", composer);
-        }
-        if( changes.contains( Meta::Field::DISCNUMBER ) )
-        {
-            shouldSave = true;
-            const TagLib::String disc = Qt4QStringToTString( changes.value( Meta::Field::DISCNUMBER ).toString() );
-            file->tag()->addField("DISCNUMBER", disc);
-        }
-        if( changes.contains( Meta::Field::BPM ) )
-        {
-            shouldSave = true;
-            if (changes.value( Meta::Field::BPM ).toDouble() > 0) {
-                const TagLib::String bpm = Qt4QStringToTString( changes.value( Meta::Field::BPM ).toString() );
-                file->tag()->addField("BPM", bpm);
-            } else {
-                file->tag()->removeField("BPM");
-            }
-        }
-    }
-    else if ( TagLib::FLAC::File *file = dynamic_cast<TagLib::FLAC::File *>( fileref.file() ) )
-    {
-        if( changes.contains( Meta::Field::COMPOSER ) )
-        {
-            shouldSave = true;
-            const TagLib::String composer = Qt4QStringToTString( changes.value( Meta::Field::COMPOSER ).toString() );
-            file->xiphComment()->addField("COMPOSER", composer);
-        }
-        if( changes.contains( Meta::Field::DISCNUMBER ) )
-        {
-            shouldSave = true;
-            const TagLib::String disc = Qt4QStringToTString( changes.value( Meta::Field::DISCNUMBER ).toString() );
-            file->xiphComment()->addField("DISCNUMBER", disc);
-        }
-        if( changes.contains( Meta::Field::BPM ) )
-        {
-            shouldSave = true;
-            if (changes.value( Meta::Field::BPM ).toDouble() > 0) {
-                const TagLib::String bpm = Qt4QStringToTString( changes.value( Meta::Field::BPM ).toString() );
-                file->xiphComment()->addField("BPM", bpm);
-            } else {
-                file->xiphComment()->removeField("BPM");
-            }
-        }
-    }
-    else if ( TagLib::MP4::File *file = dynamic_cast<TagLib::MP4::File *>( fileref.file() ) )
-    {
-        if( changes.contains( Meta::Field::COMPOSER ) )
-        {
-            shouldSave = true;
-            TagLib::MP4::Tag *mp4tag = dynamic_cast<TagLib::MP4::Tag *>( file->tag() );
-            const TagLib::String composer = Qt4QStringToTString( changes.value( Meta::Field::COMPOSER ).toString() );
-            mp4tag->itemListMap()["\xa9wrt"] = TagLib::StringList( composer );
-        }
-        if( changes.contains( Meta::Field::DISCNUMBER ) )
-        {
-            shouldSave = true;
-            TagLib::MP4::Tag *mp4tag = dynamic_cast<TagLib::MP4::Tag *>( file->tag() );
-            int discnumber = changes.value( Meta::Field::DISCNUMBER ).toInt();
-            mp4tag->itemListMap()["disk"] = TagLib::MP4::Item( discnumber, 0 );
-        }
-        if( changes.contains( Meta::Field::BPM ) )
-        {
-            shouldSave = true;
-            TagLib::MP4::Tag *mp4tag = dynamic_cast<TagLib::MP4::Tag *>( file->tag() );
-            int bpm = changes.value( Meta::Field::BPM ).toInt();
-            mp4tag->itemListMap()["bpm"] = TagLib::MP4::Item( bpm, 0 );
-        }
-    }
-    if( shouldSave )
-        fileref.save();
-}
-
-#undef Qt4QStringToTString
diff --git a/src/meta/impl/file/TagLibUtils.h b/src/meta/impl/file/TagLibUtils.h
deleted file mode 100644
index 4329e69..0000000
--- a/src/meta/impl/file/TagLibUtils.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef TAGLIBUTILS_H
-#define TAGLIBUTILS_H
-
-#include "amarok_export.h"
-#include "Meta.h"
-
-#include <QMap>
-#include <QString>
-#include <QVariant>
-
-namespace TagLib
-{
-    class FileRef;
-}
-
-namespace Meta
-{
-    namespace Field
-    {
-        AMAROK_EXPORT void writeFields( const QString &filename, const QVariantMap &changes );
-        AMAROK_EXPORT void writeFields( TagLib::FileRef fileref, const QVariantMap &changes );
-    }
-}
-
-#endif // TAGLIBUTILS_H
diff --git a/src/meta/impl/multi/MultiSourceCapabilityImpl.cpp b/src/meta/impl/multi/MultiSourceCapabilityImpl.cpp
deleted file mode 100644
index 940a163..0000000
--- a/src/meta/impl/multi/MultiSourceCapabilityImpl.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "MultiSourceCapabilityImpl.h"
-
-
-MultiSourceCapabilityImpl::MultiSourceCapabilityImpl(Meta::MultiTrack * track)
-    : Meta::MultiSourceCapability()
-    , m_track( track )
-{
-    //forward from track, as there might  be several instances of MultiSourceCapabilityImpl active for one track.
-    connect( m_track, SIGNAL( urlChanged( const KUrl &) ), this, SIGNAL( urlChanged( const KUrl &) ) );
-}
-
-void MultiSourceCapabilityImpl::setSource( int source )
-{
-    DEBUG_BLOCK
-    m_track->setSource( source );
-    const KUrl url = m_track->playableUrl();
-
-}
-
-
-
-#include "MultiSourceCapabilityImpl.moc"
diff --git a/src/meta/impl/multi/MultiSourceCapabilityImpl.h b/src/meta/impl/multi/MultiSourceCapabilityImpl.h
deleted file mode 100644
index 393f73b..0000000
--- a/src/meta/impl/multi/MultiSourceCapabilityImpl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-
-#ifndef AMAROK_MULTISOURCECAPABILITYIMPL_P_H
-#define AMAROK_MULTISOURCECAPABILITYIMPL_P_H
-
-#include "capabilities/MultiSourceCapability.h"
-
-#include "Debug.h"
-#include "MultiTrack.h"
-
-
-class MultiSourceCapabilityImpl : public Meta::MultiSourceCapability
-{
-    Q_OBJECT
-public:
-    MultiSourceCapabilityImpl( Meta::MultiTrack * track );
-
-
-    virtual KUrl first() { return m_track->first(); }
-    virtual KUrl next() { return m_track->next(); }
-    virtual int current() { return m_track->current(); }
-    virtual QStringList sources() { return m_track->sources(); }
-    virtual void setSource( int source );
-
-private:
-    Meta::MultiTrack * m_track;
-
-};
-
-#endif
-
-
diff --git a/src/meta/impl/multi/MultiTrack.cpp b/src/meta/impl/multi/MultiTrack.cpp
deleted file mode 100644
index 9239086..0000000
--- a/src/meta/impl/multi/MultiTrack.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "MultiTrack.h"
-
-#include "Debug.h"
-#include "MultiSourceCapabilityImpl.h"
-
-namespace Meta {
-
-MultiTrack::MultiTrack( PlaylistPtr playlist )
-    : QObject()
-    , Track()
-    , m_playlist( playlist )
-    , m_index( 0 )
-{
-    DEBUG_BLOCK
-    debug() << "playlist size: " << m_playlist->tracks().count();
-    setSource( 0 );
-}
-
-
-MultiTrack::~MultiTrack()
-{
-}
-
-void Meta::MultiTrack::setSource( int source )
-{
-    if( source >= m_playlist->tracks().count() ) // avaid crash by doing nothing
-        return;
-
-    if( m_currentTrack )
-        unsubscribeFrom( m_currentTrack );
-
-    m_index = source;
-    m_currentTrack = m_playlist->tracks()[ m_index ];
-    subscribeTo( m_currentTrack );
-
-    notifyObservers();
-    emit urlChanged( playableUrl() );
-}
-
-
-KUrl Meta::MultiTrack::first()
-{
-    if( m_currentTrack )
-        unsubscribeFrom( m_currentTrack );
-    
-    m_index = 0;
-    if ( m_playlist->tracks().count() > m_index ) {
-        m_currentTrack = m_playlist->tracks()[ m_index ];
-        subscribeTo( m_currentTrack );
-        return m_currentTrack->playableUrl();
-    }
-
-    return KUrl();
-}
-
-KUrl Meta::MultiTrack::next()
-{
-    if( m_currentTrack )
-        unsubscribeFrom( m_currentTrack );
-    
-    m_index++;
-    
-    if ( m_playlist->tracks().count() > m_index ){
-        m_currentTrack = m_playlist->tracks()[ m_index ];
-        subscribeTo( m_currentTrack );
-        return m_currentTrack->playableUrl();
-    }
-
-    return KUrl();
-}
-
-
-int Meta::MultiTrack::current()
-{
-    return m_index;
-}
-
-QStringList Meta::MultiTrack::sources()
-{
-    QStringList trackNames;
-    foreach ( TrackPtr track, m_playlist->tracks() )
-    {
-        trackNames << track->prettyUrl();
-    }
-
-    return trackNames;
-}
-
-bool Meta::MultiTrack::hasCapabilityInterface(Meta::Capability::Type type) const
-{
-    return type == Meta::Capability::MultiSource;
-}
-
-Meta::Capability * Meta::MultiTrack::createCapabilityInterface(Meta::Capability::Type type)
-{
-    switch( type )
-    {
-        case Meta::Capability::MultiSource:
-            return new MultiSourceCapabilityImpl( this );
-        default:
-            return 0;
-    }
-}
-
-}
-
-void Meta::MultiTrack::metadataChanged( Meta::TrackPtr track )
-{
-    Q_UNUSED( track )
-    //forward changes from active tracks
-    notifyObservers();
-}
-
-
-#include "MultiTrack.moc"
-
diff --git a/src/meta/impl/multi/MultiTrack.h b/src/meta/impl/multi/MultiTrack.h
deleted file mode 100644
index 823b728..0000000
--- a/src/meta/impl/multi/MultiTrack.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef METAMULTITRACK_H
-#define METAMULTITRACK_H
-
-#include "Meta.h"
-#include "Playlist.h"
-#include "capabilities/MultiSourceCapability.h"
-
-namespace Meta {
-
-/**
-A track that wraps a playlist. This is useful, for instance, for adding radio streams with multiple fallback streams to the playlist as a single item
-
-    @author Nikolaj Hald Nielsen <nhn at kde.org>
-*/
-
-class MultiTrack : public QObject, public Track, public Meta::Observer
-{
-    Q_OBJECT
-public:
-    MultiTrack( PlaylistPtr playlist );
-    ~MultiTrack();
-
-    KUrl first();
-    KUrl next();
-
-    int current();
-    QStringList sources();
-    void setSource( int source );
-
-    virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
-    virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
-
-
-    //forward lots of stuff:
-
-    //TODO: sanity checks on m_currentTrack
-    virtual QString name() const { return m_currentTrack->name(); }
-    virtual QString prettyName() const { return m_currentTrack->prettyName(); }
-    virtual KUrl playableUrl() const { return m_currentTrack->playableUrl(); }
-    virtual QString prettyUrl() const { return m_currentTrack->prettyUrl(); }
-    virtual QString uidUrl() const { return m_currentTrack->uidUrl(); }
-
-    virtual AlbumPtr album() const { return m_currentTrack->album(); }
-    virtual ArtistPtr artist() const { return m_currentTrack->artist(); }
-    virtual ComposerPtr composer() const { return m_currentTrack->composer(); }
-    virtual GenrePtr genre() const { return m_currentTrack->genre(); }
-    virtual YearPtr year() const { return m_currentTrack->year(); }
-
-    virtual float bpm() const { return m_currentTrack->bpm(); }
-    virtual QString comment() const { return m_currentTrack->comment(); }
-    virtual double score() const { return m_currentTrack->score(); }
-    virtual void setScore( double newScore ) { m_currentTrack->setScore( newScore ); }
-    virtual int rating() const { return m_currentTrack->rating(); }
-    virtual void setRating( int newRating ) { m_currentTrack->setRating( newRating ); }
-    virtual qint64 length() const { return m_currentTrack->length(); }
-    virtual int filesize() const { return m_currentTrack->filesize(); }
-    virtual int sampleRate() const { return m_currentTrack->sampleRate(); }
-    virtual int bitrate() const { return m_currentTrack->bitrate(); }
-    virtual int trackNumber() const { return m_currentTrack->trackNumber(); }
-    virtual int discNumber() const { return m_currentTrack->discNumber(); }
-    virtual uint lastPlayed() const { return m_currentTrack->lastPlayed(); }
-    virtual int playCount() const { return m_currentTrack->playCount(); }
-
-    virtual bool isPlayable() const { return m_currentTrack->isPlayable(); }
-    virtual QString type() const { return m_currentTrack->type(); }
-
-    using Observer::metadataChanged;
-    virtual void metadataChanged( Meta::TrackPtr track );
-
-
-signals:
-    void urlChanged( const KUrl &url );
-
-private:
-    PlaylistPtr m_playlist;
-    TrackPtr m_currentTrack;
-    int m_index;
-
-};
-
-}
-
-#endif
diff --git a/src/meta/impl/proxy/MetaProxy.cpp b/src/meta/impl/proxy/MetaProxy.cpp
deleted file mode 100644
index 122598b..0000000
--- a/src/meta/impl/proxy/MetaProxy.cpp
+++ /dev/null
@@ -1,488 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "MetaProxy.h"
-#include "MetaProxy_p.h"
-#include "MetaProxy_p.moc"
-
-#include "EditCapability.h"
-
-#include "CollectionManager.h"
-
-#include <QDateTime>
-#include <QObject>
-#include <QPointer>
-#include <QTimer>
-
-#include <KSharedPtr>
-
-using namespace MetaProxy;
-
-class ProxyArtist;
-class ProxyFmAlbum;
-class ProxyGenre;
-class ProxyComposer;
-class ProxyYear;
-
-class EditCapabilityProxy : public Meta::EditCapability
-{
-    public:
-        EditCapabilityProxy( MetaProxy::Track *track )
-            : Meta::EditCapability()
-            , m_track( track ) {}
-
-        virtual bool isEditable() const { return true; }
-        virtual void setTitle( const QString &title ) { m_track->setName( title ); }
-        virtual void setAlbum( const QString &newAlbum ) { m_track->setAlbum( newAlbum ); }
-        virtual void setArtist( const QString &newArtist ) { m_track->setArtist( newArtist ); }
-        virtual void setComposer( const QString &newComposer ) { m_track->setComposer( newComposer ); }
-        virtual void setGenre( const QString &newGenre ) { m_track->setGenre( newGenre ); }
-        virtual void setYear( const QString &newYear ) { m_track->setYear( newYear ); }
-        virtual void setBpm( const float newBpm ) { m_track->setBpm( newBpm ); }
-        virtual void setComment( const QString &newComment ) { Q_UNUSED( newComment ); /*m_track->setComment( newComment );*/ } // Do we want to support this?
-        virtual void setTrackNumber( int newTrackNumber ) { m_track->setTrackNumber( newTrackNumber ); }
-        virtual void setDiscNumber( int newDiscNumber ) { m_track->setDiscNumber( newDiscNumber ); }
-
-        virtual void beginMetaDataUpdate() {}  // Nothing to do, we cache everything
-        virtual void endMetaDataUpdate() {}
-        virtual void abortMetaDataUpdate() {}
-
-    private:
-        KSharedPtr<MetaProxy::Track> m_track;
-};
-
-MetaProxy::Track::Track( const KUrl &url )
-:Meta::Track()
-,d( new Private() )
-{
-	init( url, false );
-}
-
-MetaProxy::Track::Track( const KUrl &url, bool awaitLookupNotification )
-	:Meta::Track()
-	,d( new Private() )
-{
-	init( url, awaitLookupNotification );
-}
-
-void
-MetaProxy::Track::init( const KUrl &url, bool awaitLookupNotification )
-{
-	d->url = url;
-    d->proxy = this;
-    d->cachedLength = 0;
-
-	if( !awaitLookupNotification )
-		QObject::connect( CollectionManager::instance(), SIGNAL( trackProviderAdded( TrackProvider* ) ), d, SLOT( slotNewTrackProvider( TrackProvider* ) ) );
-
-    d->albumPtr = Meta::AlbumPtr( new ProxyAlbum( QPointer<Track::Private>( d ) ) );
-    d->artistPtr = Meta::ArtistPtr( new ProxyArtist( QPointer<Track::Private>( d ) ) );
-    d->genrePtr = Meta::GenrePtr( new ProxyGenre( QPointer<Track::Private>( d ) ) );
-    d->composerPtr = Meta::ComposerPtr( new ProxyComposer( QPointer<Track::Private>( d ) ) );
-    d->yearPtr = Meta::YearPtr( new ProxyYear( QPointer<Track::Private>( d ) ) );
-
-	if( !awaitLookupNotification )
-		QTimer::singleShot( 0, d, SLOT( slotCheckCollectionManager() ) );
-}
-
-MetaProxy::Track::~Track()
-{
-    delete d;
-}
-
-QString
-MetaProxy::Track::name() const
-{
-    if( d->realTrack ) {
-        QString name = d->realTrack->name();
-        return name;
-    }
-    return d->cachedName;
-}
-
-void
-MetaProxy::Track::setName( const QString &name )
-{
-    d->cachedName = name;
-}
-
-QString
-MetaProxy::Track::prettyName() const
-{
-    if( d->realTrack ) {
-        QString prettyName = d->realTrack->prettyName();
-        return prettyName;
-    }
-    return d->cachedName;   //TODO maybe change this?
-}
-
-QString
-MetaProxy::Track::fullPrettyName() const
-{
-    if( d->realTrack ) {
-        QString fullPrettyName = d->realTrack->fullPrettyName();
-        return fullPrettyName;
-    }
-    return d->cachedName;   //TODO maybe change this??
-}
-
-QString
-MetaProxy::Track::sortableName() const
-{
-    if( d->realTrack ) {
-        QString sortableName = d->realTrack->sortableName();
-        return sortableName;
-    }
-    return d->cachedName;   //TODO maybe change this??
-}
-
-KUrl
-MetaProxy::Track::playableUrl() const
-{
-    if( d->realTrack ) {
-        KUrl playableUrl = d->realTrack->playableUrl();
-        return playableUrl;
-    }
-    //return KUrl();
-    return d->url; // Maybe?
-}
-
-QString
-MetaProxy::Track::prettyUrl() const
-{
-    if( d->realTrack ) {
-        QString prettyUrl = d->realTrack->prettyUrl();
-        return prettyUrl;
-    }
-    return d->url.url();
-}
-
-QString
-MetaProxy::Track::uidUrl() const
-{
-    if( d->realTrack ) {
-        QString uidUrl = d->realTrack->uidUrl();
-        return uidUrl;
-    }
-    return d->url.url();
-}
-
-bool
-MetaProxy::Track::isPlayable() const
-{
-    if( d->realTrack ) {
-        bool isPlayable = d->realTrack->isPlayable();
-        return isPlayable;
-    }
-    return false;
-}
-
-Meta::AlbumPtr
-MetaProxy::Track::album() const
-{
-    return d->albumPtr;
-}
-
-void
-MetaProxy::Track::setAlbum( const QString &album )
-{
-    d->cachedAlbum = album;
-}
-
-Meta::ArtistPtr
-MetaProxy::Track::artist() const
-{
-    return d->artistPtr;
-}
-
-void
-MetaProxy::Track::setArtist( const QString &artist )
-{
-    d->cachedArtist = artist;
-}
-
-Meta::GenrePtr
-MetaProxy::Track::genre() const
-{
-    return d->genrePtr;
-}
-
-void
-MetaProxy::Track::setGenre( const QString &genre )
-{
-    d->cachedGenre = genre;
-}
-
-Meta::ComposerPtr
-MetaProxy::Track::composer() const
-{
-    return d->composerPtr;
-}
-
-void
-MetaProxy::Track::setComposer( const QString &composer )
-{
-    d->cachedComposer = composer;
-}
-Meta::YearPtr
-MetaProxy::Track::year() const
-{
-    return d->yearPtr;
-}
-
-void
-MetaProxy::Track::setYear( const QString &year )
-{
-    d->cachedYear = year;
-}
-
-float
-MetaProxy::Track::bpm() const
-{
-    if( d->realTrack )
-        return d->realTrack->bpm();
-    else
-        return d->cachedBpm;
-}
-
-void
-MetaProxy::Track::setBpm( const float bpm )
-{
-    d->cachedBpm = bpm;
-}
-
-QString
-MetaProxy::Track::comment() const
-{
-    if( d->realTrack )
-        return d->realTrack->comment();
-    else
-        return QString();       //do we cache the comment??
-}
-
-double
-MetaProxy::Track::score() const
-{
-    if( d->realTrack )
-        return d->realTrack->score();
-    return 0.0;     //do we cache the score
-}
-
-void
-MetaProxy::Track::setScore( double newScore )
-{
-    if( d->realTrack )
-        d->realTrack->setScore( newScore );
-}
-
-int
-MetaProxy::Track::rating() const
-{
-    if( d->realTrack )
-        return d->realTrack->rating();
-    return 0;
-}
-
-void
-MetaProxy::Track::setRating( int newRating )
-{
-    if( d->realTrack )
-        d->realTrack->setRating( newRating );
-}
-
-int
-MetaProxy::Track::trackNumber() const
-{
-    if( d->realTrack )
-        return d->realTrack->trackNumber();
-    return d->cachedTrackNumber;
-}
-
-void
-MetaProxy::Track::setTrackNumber( int number )
-{
-    d->cachedTrackNumber = number;
-}
-
-int
-MetaProxy::Track::discNumber() const
-{
-    if( d->realTrack )
-        return d->realTrack->discNumber();
-    return d->cachedDiscNumber;
-}
-
-void
-MetaProxy::Track::setDiscNumber( int discNumber )
-{
-    d->cachedDiscNumber = discNumber;
-}
-
-qint64
-MetaProxy::Track::length() const
-{
-    if( d->realTrack )
-        return d->realTrack->length();
-    return d->cachedLength;
-}
-
-int
-MetaProxy::Track::filesize() const
-{
-    if( d->realTrack )
-        return d->realTrack->filesize();
-    return 0;
-}
-
-int
-MetaProxy::Track::sampleRate() const
-{
-    if( d->realTrack )
-        return d->realTrack->sampleRate();
-    return 0;
-}
-
-int
-MetaProxy::Track::bitrate() const
-{
-    if( d->realTrack )
-        return d->realTrack->bitrate();
-    return 0;
-}
-
-QDateTime
-MetaProxy::Track::createDate() const
-{
-    if( d->realTrack )
-        return d->realTrack->createDate();
-    return QDateTime();
-}
-
-uint
-MetaProxy::Track::firstPlayed() const
-{
-    if( d->realTrack )
-        return d->realTrack->firstPlayed();
-    return 0;
-}
-
-uint
-MetaProxy::Track::lastPlayed() const
-{
-    if( d->realTrack )
-        return d->realTrack->lastPlayed();
-    return 0;
-}
-
-int
-MetaProxy::Track::playCount() const
-{
-    if( d->realTrack )
-        return d->realTrack->playCount();
-    return 0;
-}
-
-QString
-MetaProxy::Track::type() const
-{
-    if( d->realTrack )
-        return d->realTrack->type();
-    return QString();       //TODO cache type??
-}
-
-void
-MetaProxy::Track::finishedPlaying( double playedFraction )
-{
-    if( d->realTrack )
-        d->realTrack->finishedPlaying( playedFraction );
-}
-
-bool
-MetaProxy::Track::inCollection() const
-{
-    if( d->realTrack )
-        return d->realTrack->inCollection();
-    return false;
-}
-
-Amarok::Collection*
-MetaProxy::Track::collection() const
-{
-    if( d->realTrack )
-        return d->realTrack->collection();
-    else
-        return 0;
-}
-
-void
-MetaProxy::Track::subscribe( Meta::Observer *observer )
-{
-    if( observer && !d->observers.contains( observer ) )
-        d->observers.append( observer );
-}
-
-void
-MetaProxy::Track::unsubscribe( Meta::Observer *observer )
-{
-    if( observer )
-        d->observers.removeAll( observer );
-}
-
-void
-MetaProxy::Track::lookupTrack( Amarok::TrackProvider *provider )
-{
-	d->slotNewTrackProvider( provider );
-}
-
-void
-MetaProxy::Track::updateTrack( Meta::TrackPtr track )
-{
-    d->slotUpdateTrack( track );
-}
-
-bool
-MetaProxy::Track::hasCapabilityInterface( Meta::Capability::Type type ) const
-{
-    if( d->realTrack )
-        return d->realTrack->hasCapabilityInterface( type );
-    else
-        if( type == Meta::Capability::Editable )
-            return true;
-    return false;
-}
-
-Meta::Capability*
-MetaProxy::Track::createCapabilityInterface( Meta::Capability::Type type )
-{
-    if( d->realTrack )
-        return d->realTrack->createCapabilityInterface( type );
-    else
-        if( type == Meta::Capability::Editable )
-            return new EditCapabilityProxy( this );
-    return 0;
-}
-
-bool
-MetaProxy::Track::operator==( const Meta::Track &track ) const
-{
-    const MetaProxy::Track *proxy = dynamic_cast<const MetaProxy::Track*>( &track );
-    if( proxy && d->realTrack )
-        return d->realTrack == proxy->d->realTrack;
-    else if( proxy )
-        return d->url == proxy->d->url;
-
-    return d->realTrack && d->realTrack.data() == &track;
-}
diff --git a/src/meta/impl/proxy/MetaProxy.h b/src/meta/impl/proxy/MetaProxy.h
deleted file mode 100644
index 99de328..0000000
--- a/src/meta/impl/proxy/MetaProxy.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_METAPROXY_H
-#define AMAROK_METAPROXY_H
-
-#include "Meta.h"
-#include "capabilities/Capability.h"
-
-#include <QObject>
-
-namespace Amarok
-{
-    class TrackProvider;
-}
-
-namespace MetaProxy
-{
-    class Track;
-    typedef KSharedPtr<Track> TrackPtr;
-    class AMAROK_EXPORT Track : public Meta::Track
-    {
-        public:
-            class Private;
-
-            Track( const KUrl &url );
-            virtual ~Track();
-
-        //methods inherited from Meta::MetaBase
-            virtual QString name() const;
-            virtual void setName( const QString &name );
-            virtual QString prettyName() const;
-            virtual QString fullPrettyName() const;
-            virtual QString sortableName() const;
-
-        //methods inherited from Meta::Track
-            virtual KUrl playableUrl() const;
-            virtual QString prettyUrl() const;
-            virtual QString uidUrl() const;
-
-            virtual bool isPlayable() const;
-
-            virtual Meta::AlbumPtr album() const;
-            virtual void setAlbum( const QString &album );
-            virtual Meta::ArtistPtr artist() const;
-            virtual void setArtist( const QString &artist );
-            virtual Meta::GenrePtr genre() const;
-            virtual void setGenre( const QString &genre );
-            virtual Meta::ComposerPtr composer() const;
-            virtual void setComposer( const QString &composer );
-            virtual Meta::YearPtr year() const;
-            virtual void setYear( const QString &year );
-
-            virtual float bpm() const;
-            virtual void setBpm( const float bpm );
-
-            virtual QString comment() const;
-
-            virtual double score() const;
-            virtual void setScore( double newScore );
-
-            virtual int rating() const;
-            virtual void setRating( int newRating );
-
-            virtual int trackNumber() const;
-            virtual void setTrackNumber( int number );
-            virtual int discNumber() const;
-            virtual void setDiscNumber( int discNumber );
-
-            virtual qint64 length() const;
-            virtual int filesize() const;
-            virtual int sampleRate() const;
-            virtual int bitrate() const;
-            virtual QDateTime createDate() const;
-
-            virtual uint firstPlayed() const;
-            virtual uint lastPlayed() const;
-            virtual int playCount() const;
-
-            virtual QString type() const;
-
-            virtual void finishedPlaying( double playedFraction );
-
-            virtual bool inCollection() const;
-            virtual Amarok::Collection *collection() const;
-
-            virtual void subscribe( Meta::Observer *observer );
-            virtual void unsubscribe( Meta::Observer *observer );
-
-            virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const;
-            virtual Meta::Capability* createCapabilityInterface( Meta::Capability::Type type );
-
-            virtual bool operator==( const Meta::Track &track ) const;
-
-		/**
-		 * allows subclasses to create an instance of trackprovider which will only check the TrackProvider
-		 * passed to lookupTrack(TrackProvider*) for the real track.
-		 */
-		Track( const KUrl &url, bool awaitLookupNotification);
-		/**
-		 * MetaProxy will check the given trackprovider if it can provide the track for the proxy's url.
-		 */
-		void lookupTrack(Amarok::TrackProvider *provider);
-
-        /**
-         * MetaProxy will update the proxy with the track.
-         */
-        void updateTrack( Meta::TrackPtr track );
-
-        private:
-			void init( const KUrl &url, bool awaitLookupNotification );
-            Private * const d;
-    };
-
-}
-
-#endif
diff --git a/src/meta/impl/proxy/MetaProxy_p.h b/src/meta/impl/proxy/MetaProxy_p.h
deleted file mode 100644
index 5a096fa..0000000
--- a/src/meta/impl/proxy/MetaProxy_p.h
+++ /dev/null
@@ -1,427 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_METAPROXY_P_H
-#define AMAROK_METAPROXY_P_H
-
-#include "Amarok.h"
-#include "amarokconfig.h"
-#include "Collection.h"
-#include "CollectionManager.h"
-#include "Meta.h"
-
-#include <QImage>
-#include <QList>
-#include <QObject>
-#include <QPixmap>
-#include <QStringList>
-
-#include <kio/job.h>
-#include <kio/jobclasses.h>
-
-
-using namespace MetaProxy;
-
-class MetaProxy::Track::Private : public QObject, public Meta::Observer
-{
-    Q_OBJECT
-
-    public:
-        Track *proxy;
-        KUrl url;
-
-        Meta::TrackPtr realTrack;
-
-        QList<Meta::Observer*> observers;
-
-        QString cachedArtist;
-        QString cachedAlbum;
-        QString cachedName;
-        QString cachedGenre;
-        QString cachedComposer;
-        QString cachedYear;
-        qint64 cachedLength;
-        float  cachedBpm;
-        int cachedTrackNumber;
-        int cachedDiscNumber;
-
-        Meta::ArtistPtr artistPtr;
-        Meta::AlbumPtr albumPtr;
-        Meta::GenrePtr genrePtr;
-        Meta::ComposerPtr composerPtr;
-        Meta::YearPtr yearPtr;
-
-    public:
-        void notifyObservers()
-        {
-            if( proxy )
-            {
-                foreach( Meta::Observer *observer, observers )
-                {
-                    if( observer != this )
-                        observer->metadataChanged( Meta::TrackPtr( const_cast<MetaProxy::Track*>(proxy) ) );
-                }
-            }
-        }
-        using Observer::metadataChanged;
-        void metadataChanged( Meta::TrackPtr track )
-        {
-            Q_UNUSED( track )
-            notifyObservers();
-        }
-
-    public slots:
-        void slotNewTrackProvider( Amarok::TrackProvider *newTrackProvider )
-        {
-            if ( !newTrackProvider )
-            {
-                return;
-            }
-
-            if( newTrackProvider->possiblyContainsTrack( url ) )
-            {
-                Meta::TrackPtr track = newTrackProvider->trackForUrl( url );
-                if( track )
-                {
-                    subscribeTo( track );
-                    realTrack = track;
-                    notifyObservers();
-                    disconnect( CollectionManager::instance(), SIGNAL( trackProviderAdded( Amarok::TrackProvider* ) ), this, SLOT( slotNewTrackProvider( Amarok::TrackProvider* ) ) );
-                }
-            }
-        }
-
-        void slotUpdateTrack( Meta::TrackPtr track )
-        {
-            if( track )
-            {
-                subscribeTo( track );
-                realTrack = track;
-                notifyObservers();
-            }
-        }
-        void slotCheckCollectionManager()
-        {
-            Meta::TrackPtr track = CollectionManager::instance()->trackForUrl( url );
-            if( track )
-                realTrack = track;
-            notifyObservers();
-            disconnect( CollectionManager::instance(), SIGNAL( collectionAdded( Amarok::Collection* ) ), this, SLOT( slotNewCollection( Amarok::Collection* ) ) );
-        }
-};
-
-// internal helper classes
-
-class ProxyArtist : public Meta::Artist
-{
-public:
-    ProxyArtist( MetaProxy::Track::Private *dptr )
-        : Meta::Artist()
-        , d( dptr )
-    {}
-
-    Meta::TrackList tracks()
-    {
-        if( d && d->realTrack )
-            return d->realTrack->artist()->tracks();
-        else
-            return Meta::TrackList();
-    }
-
-    Meta::AlbumList albums()
-    {
-        if( d && d->realTrack )
-            return d->realTrack->artist()->albums();
-        else
-            return Meta::AlbumList();
-    }
-
-    QString name() const
-    {
-        if( d && d->realTrack )
-        {
-            if ( d->realTrack->artist() )
-                return d->realTrack->artist()->name();
-            return QString();
-        } else if( d )
-            return d->cachedArtist;
-        return QString();
-    }
-
-    QString prettyName() const
-    {
-        if( d && d->realTrack )
-            return d->realTrack->artist()->prettyName();
-        else if( d )
-            return d->cachedArtist;
-        return QString();
-    }
-
-    virtual bool operator==( const Meta::Artist &artist ) const
-    {
-        const ProxyArtist *proxy = dynamic_cast<const ProxyArtist*>( &artist );
-        if( proxy )
-        {
-            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->artist() && d->realTrack->artist() == proxy->d->realTrack->artist();
-        }
-        else
-        {
-            return d && d->realTrack && d->realTrack->artist() && d->realTrack->artist().data() == &artist;
-        }
-    }
-
-    MetaProxy::Track::Private * const d;
-};
-
-class ProxyAlbum : public Meta::Album
-{
-public:
-    ProxyAlbum( MetaProxy::Track::Private *dptr )
-        : Meta::Album()
-        , d( dptr )
-    {}
-
-    bool isCompilation() const
-    {
-        if( d && d->realTrack )
-            return d->realTrack->album()->isCompilation();
-        else
-            return false;
-    }
-
-    bool hasAlbumArtist() const
-    {
-        if( d && d->realTrack && d->realTrack->album() )
-            return d->realTrack->album()->hasAlbumArtist();
-        else
-            return false;
-    }
-
-    Meta::ArtistPtr albumArtist() const
-    {
-        if( d && d->realTrack && d->realTrack->album() )
-            return d->realTrack->album()->albumArtist();
-        else
-            return Meta::ArtistPtr();
-    }
-
-    Meta::TrackList tracks()
-    {
-        if( d && d->realTrack )
-            return d->realTrack->album()->tracks();
-        else
-            return Meta::TrackList();
-    }
-
-    QString name() const
-    {
-        if( d && d->realTrack )
-        {
-            if ( d->realTrack->album() )
-                return d->realTrack->album()->name();
-            return QString();
-        }
-        else if ( d )
-              return d->cachedAlbum;
-        else
-            return QString();
-    }
-
-    QString prettyName() const
-    {
-        if( d && d->realTrack && d->realTrack->album() )
-            return d->realTrack->album()->prettyName();
-        else
-            return name();
-    }
-
-    QPixmap image( int size )
-    {
-        if( d && d->realTrack ) {
-            if ( d->realTrack->album() )
-                return d->realTrack->album()->image( size );
-            return Meta::Album::image( size );
-        } else
-            return Meta::Album::image( size );
-    }
-
-    virtual bool operator==( const Meta::Album &album ) const
-    {
-        const ProxyAlbum *proxy = dynamic_cast<const ProxyAlbum*>( &album );
-        if( proxy )
-        {
-            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->album() && ( *d->realTrack->album().data() ) == ( *proxy->d->realTrack->album().data() );
-        }
-        else
-        {
-            return d && d->realTrack && d->realTrack->album() && ( *d->realTrack->album().data() ) == album;
-        }
-    }
-
-    MetaProxy::Track::Private * const d;
-};
-
-class ProxyGenre : public Meta::Genre
-{
-public:
-    ProxyGenre( MetaProxy::Track::Private *dptr )
-        : Meta::Genre()
-        , d( dptr )
-    {}
-
-    QString name() const
-    {
-        if( d && d->realTrack && d->realTrack->genre() )
-            return d->realTrack->genre()->name();
-        else if( d )
-            return d->cachedGenre;
-        else
-            return QString();
-    }
-
-    QString prettyName() const
-    {
-        if( d && d->realTrack && d->realTrack->genre() )
-            return d->realTrack->genre()->prettyName();
-        else
-            return QString();
-    }
-
-    Meta::TrackList tracks()
-    {
-        if( d && d->realTrack && d->realTrack->genre() )
-            return d->realTrack->genre()->tracks();
-        else
-            return Meta::TrackList();
-    }
-
-    virtual bool operator==( const Meta::Genre &genre ) const
-    {
-        const ProxyGenre *proxy = dynamic_cast<const ProxyGenre*>( &genre );
-        if( proxy )
-        {
-            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->genre() && d->realTrack->genre() == proxy->d->realTrack->genre();
-        }
-        else
-        {
-            return d && d->realTrack && d->realTrack->genre() && d->realTrack->genre().data() == &genre;
-        }
-    }
-
-    MetaProxy::Track::Private * const d;
-};
-
-class ProxyComposer : public Meta::Composer
-{
-public:
-    ProxyComposer( MetaProxy::Track::Private *dptr )
-        : Meta::Composer()
-        , d( dptr )
-    {}
-
-    QString name() const
-    {
-        if( d && d->realTrack && d->realTrack->composer() )
-            return d->realTrack->composer()->name();
-        else if ( d )
-            return d->cachedComposer;
-        else
-            return QString();
-    }
-
-    QString prettyName() const
-    {
-        if( d && d->realTrack && d->realTrack->composer())
-            return d->realTrack->composer()->prettyName();
-        else
-            return name();
-    }
-
-    Meta::TrackList tracks()
-    {
-        if( d && d->realTrack && d->realTrack->composer() )
-            return d->realTrack->composer()->tracks();
-        else
-            return Meta::TrackList();
-    }
-
-    virtual bool operator==( const Meta::Composer &composer ) const
-    {
-        const ProxyComposer *proxy = dynamic_cast<const ProxyComposer*>( &composer );
-        if( proxy )
-        {
-            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->composer() && d->realTrack->composer() == proxy->d->realTrack->composer();
-        }
-        else
-        {
-            return d && d->realTrack && d->realTrack->composer() && d->realTrack->composer().data() == &composer;
-        }
-    }
-
-    MetaProxy::Track::Private * const d;
-};
-
-class ProxyYear : public Meta::Year
-{
-public:
-    ProxyYear( MetaProxy::Track::Private *dptr )
-        : Meta::Year()
-        , d( dptr )
-    {}
-
-    QString name() const
-    {
-        if( d && d->realTrack && d->realTrack->year() )
-            return d->realTrack->year()->name();
-        else if( d )
-            return d->cachedYear;
-        else
-            return QString();
-    }
-
-    QString prettyName() const
-    {
-        if( d && d->realTrack && d->realTrack->year() )
-            return d->realTrack->year()->prettyName();
-        else
-            return name();
-    }
-
-    Meta::TrackList tracks()
-    {
-        if( d && d->realTrack && d->realTrack->year() )
-            return d->realTrack->year()->tracks();
-        else
-            return Meta::TrackList();
-    }
-
-    virtual bool operator==( const Meta::Year &year ) const
-    {
-        const ProxyYear *proxy = dynamic_cast<const ProxyYear*>( &year );
-        if( proxy )
-        {
-            return d && proxy->d && d->realTrack && proxy->d->realTrack && d->realTrack->year() && d->realTrack->year() == proxy->d->realTrack->year();
-        }
-        else
-        {
-            return d && d->realTrack && d->realTrack->year() && d->realTrack->year().data() == &year;
-        }
-    }
-
-    MetaProxy::Track::Private * const d;
-};
-
-#endif
diff --git a/src/meta/impl/stream/Stream.cpp b/src/meta/impl/stream/Stream.cpp
deleted file mode 100644
index 36e50cc..0000000
--- a/src/meta/impl/stream/Stream.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007-2008 Maximilian Kossick <maximilian.kossick at googlemail.com>       *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "Stream.h"
-#include "Stream_p.h"
-#include "Stream_p.moc"
-
-#include "Debug.h"
-#include "meta/Meta.h"
-#include "meta/impl/default/DefaultMetaTypes.h"
-
-#include <QPointer>
-#include <QString>
-
-using namespace MetaStream;
-
-Track::Track( const KUrl &url )
-    : Meta::Track()
-    , d( new Track::Private( this ) )
-{
-    DEBUG_BLOCK
-
-    d->url = url;
-    d->artistPtr = Meta::ArtistPtr( new StreamArtist( QPointer<Track::Private>( d ) ) );
-    d->albumPtr = Meta::AlbumPtr( new StreamAlbum( QPointer<Track::Private>( d ) ) );
-    d->genrePtr = Meta::GenrePtr( new Meta::DefaultGenre() );
-    d->composerPtr = Meta::ComposerPtr( new Meta::DefaultComposer() );
-    d->yearPtr = Meta::YearPtr( new Meta::DefaultYear() );
-}
-
-Track::~Track()
-{
-    delete d;
-}
-
-QString
-Track::name() const
-{
-    if( d->title.isEmpty() )
-        return i18n( "Stream (%1)", d->url.url() );
-    return d->title;
-}
-
-QString
-Track::prettyName() const
-{
-    return name();
-}
-
-QString
-Track::fullPrettyName() const
-{
-    return name();
-}
-
-QString
-Track::sortableName() const
-{
-    return name();
-}
-
-
-KUrl
-Track::playableUrl() const
-{
-    return d->url;
-}
-
-QString
-Track::prettyUrl() const
-{
-    return playableUrl().url();
-}
-
-QString
-Track::uidUrl() const
-{
-    return playableUrl().url();
-}
-
-bool
-Track::isPlayable() const
-{
-    //simple implementation, check Internet connectivity or ping server?
-    return true;
-}
-
-bool
-Track::isEditable() const
-{
-    return false;
-}
-
-Meta::AlbumPtr
-Track::album() const
-{
-    return d->albumPtr;
-}
-
-Meta::ArtistPtr
-Track::artist() const
-{
-    return d->artistPtr;
-}
-
-Meta::GenrePtr
-Track::genre() const
-{
-    return d->genrePtr;
-}
-
-Meta::ComposerPtr
-Track::composer() const
-{
-    return d->composerPtr;
-}
-
-Meta::YearPtr
-Track::year() const
-{
-    return d->yearPtr;
-}
-
-void
-Track::setAlbum( const QString &newAlbum )
-{
-    d->album = newAlbum;
-}
-
-void
-Track::setArtist( const QString& newArtist )
-{
-    d->artist = newArtist;
-}
-
-void
-Track::setGenre( const QString& newGenre )
-{
-    Q_UNUSED( newGenre )
-}
-
-void
-Track::setComposer( const QString& newComposer )
-{
-    Q_UNUSED( newComposer )
-}
-
-void
-Track::setYear( const QString& newYear )
-{
-    Q_UNUSED( newYear )
-}
-
-void
-Track::setTitle( const QString &newTitle )
-{
-    //it is sometimes useful to set a title for a stream so it has a nice name
-    //before we actually start playing it
-    d->title = newTitle;
-}
-
-float
-Track::bpm() const
-{
-    return -1.0;
-}
-
-QString
-Track::comment() const
-{
-    return QString();
-}
-
-void
-Track::setComment( const QString& newComment )
-{
-    Q_UNUSED( newComment )
-}
-
-double
-Track::score() const
-{
-    return 0.0;
-}
-
-void
-Track::setScore( double newScore )
-{
-    Q_UNUSED( newScore )
-}
-
-int
-Track::rating() const
-{
-    return 0;
-}
-
-void
-Track::setRating( int newRating )
-{
-    Q_UNUSED( newRating )
-}
-
-int
-Track::trackNumber() const
-{
-    return 0;
-}
-
-void
-Track::setTrackNumber( int newTrackNumber )
-{
-    Q_UNUSED( newTrackNumber )
-}
-
-int
-Track::discNumber() const
-{
-    return 0;
-}
-
-void
-Track::setDiscNumber( int newDiscNumber )
-{
-    Q_UNUSED( newDiscNumber )
-}
-
-qint64
-Track::length() const
-{
-    //TODO
-    return 0;
-}
-
-int
-Track::filesize() const
-{
-    return 0;
-}
-
-int
-Track::sampleRate() const
-{
-    return 0;
-}
-
-int
-Track::bitrate() const
-{
-    return 0;
-}
-
-uint
-Track::lastPlayed() const
-{
-    return 0;
-}
-
-int
-Track::playCount() const
-{
-    return 0;
-}
-
-QString
-Track::type() const
-{
-    return "stream";
-}
-
-void
-Track::beginMetaDataUpdate()
-{
-    //not editable
-}
-
-void
-Track::endMetaDataUpdate()
-{
-    //not editable
-}
-
-void
-Track::abortMetaDataUpdate()
-{
-    //not editable
-}
-
-void
-Track::finishedPlaying( double playedFraction )
-{
-    Q_UNUSED( playedFraction );
-    //TODO
-}
-
-bool
-Track::inCollection() const
-{
-    return false;
-}
-
-Amarok::Collection*
-Track::collection() const
-{
-    return 0;
-}
-
-void
-Track::subscribe( Meta::Observer *observer )
-{
-    DEBUG_BLOCK
-
-    debug() << "Adding observer: " << observer;
-    d->observers.insert( observer );
-}
-
-void
-Track::unsubscribe( Meta::Observer *observer )
-{
-    DEBUG_BLOCK
-
-    debug() << "Removing observer: " << observer;
-    d->observers.remove( observer );
-}
-
-void Track::updateUrl( const KUrl & url )
-{
-    d->url = url;
-    notifyObservers();
-}
-
diff --git a/src/meta/impl/stream/Stream.h b/src/meta/impl/stream/Stream.h
deleted file mode 100644
index bd60ef3..0000000
--- a/src/meta/impl/stream/Stream.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_STREAM_H
-#define AMAROK_STREAM_H
-
-#include "amarok_export.h"
-#include "Meta.h"
-
-
-
-namespace MetaStream
-{
-    class AMAROK_EXPORT Track : public Meta::Track
-    {
-        public:
-            class Private;
-
-            Track( const KUrl &url );
-            virtual ~Track();
-
-        //methods inherited from Meta::MetaBase
-            virtual QString name() const;
-            virtual QString prettyName() const;
-            virtual QString fullPrettyName() const;
-            virtual QString sortableName() const;
-
-        //methods inherited from Meta::Track
-            virtual KUrl playableUrl() const;
-            virtual QString prettyUrl() const;
-            virtual QString uidUrl() const;
-
-            virtual bool isPlayable() const;
-            virtual bool isEditable() const;
-
-            virtual Meta::AlbumPtr album() const;
-            virtual Meta::ArtistPtr artist() const;
-            virtual Meta::GenrePtr genre() const;
-            virtual Meta::ComposerPtr composer() const;
-            virtual Meta::YearPtr year() const;
-
-            virtual void setAlbum( const QString &newAlbum );
-            virtual void setArtist( const QString &newArtist );
-            virtual void setGenre( const QString &newGenre );
-            virtual void setComposer( const QString &newComposer );
-            virtual void setYear( const QString &newYear );
-
-            virtual void setTitle( const QString &newTitle );
-
-            virtual float bpm() const;
-
-            virtual QString comment() const;
-            virtual void setComment( const QString &newComment );
-
-            virtual double score() const;
-            virtual void setScore( double newScore );
-
-            virtual int rating() const;
-            virtual void setRating( int newRating );
-
-            virtual int trackNumber() const;
-            virtual void setTrackNumber( int newTrackNumber );
-
-            virtual int discNumber() const;
-            virtual void setDiscNumber( int newDiscNumber );
-
-            virtual qint64 length() const;
-            virtual int filesize() const;
-            virtual int sampleRate() const;
-            virtual int bitrate() const;
-
-            virtual uint lastPlayed() const;
-            virtual int playCount() const;
-
-            virtual QString type() const;
-
-            virtual void beginMetaDataUpdate();
-            virtual void endMetaDataUpdate();
-            virtual void abortMetaDataUpdate();
-
-            virtual void finishedPlaying( double playedFraction );
-
-            virtual bool inCollection() const;
-            virtual Amarok::Collection *collection() const;
-
-            virtual void subscribe( Meta::Observer *observer );
-            virtual void unsubscribe( Meta::Observer *observer );
-
-            virtual void updateUrl( const KUrl &url );
-
-        private:
-            Private * const d;
-    };
-
-}
-
-#endif
diff --git a/src/meta/impl/stream/Stream_p.h b/src/meta/impl/stream/Stream_p.h
deleted file mode 100644
index 89d038f..0000000
--- a/src/meta/impl/stream/Stream_p.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007-2008 Maximilian Kossick <maximilian.kossick at googlemail.com>       *
- * Copyright (c) 2008 Mark Kretschmann <kretschmann at kde.org>                            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_STREAM_P_H
-#define AMAROK_STREAM_P_H
-
-#include "Debug.h"
-#include "EngineController.h"
-#include "EngineObserver.h"
-#include "Meta.h"
-#include "meta/support/MetaConstants.h"
-
-#include <QList>
-#include <QObject>
-#include <QPixmap>
-
-using namespace MetaStream;
-
-class MetaStream::Track::Private : public QObject, public EngineObserver
-{
-    Q_OBJECT
-    public:
-        Private( Track *t )
-            : EngineObserver( The::engineController() )
-            , track( t )
-        {}
-
-        void notify() const
-        {
-            DEBUG_BLOCK
-
-            foreach( Meta::Observer *observer, observers )
-            {
-                debug() << "Notifying observer: " << observer;
-                observer->metadataChanged( Meta::TrackPtr( const_cast<MetaStream::Track*>( track ) ) );
-            }
-        }
-
-        void engineNewMetaData( const QHash<qint64, QString> &metaData, bool trackChanged )
-        {
-            Q_UNUSED( trackChanged )
-
-            if( metaData.value( Meta::valUrl ) == url.url() )
-            {
-                DEBUG_BLOCK
-                debug() << "Applying new Metadata.";
-
-                if( metaData.contains( Meta::valArtist ) )
-                    artist = metaData.value( Meta::valArtist );
-                if( metaData.contains( Meta::valTitle ) )
-                    title = metaData.value( Meta::valTitle );
-                if( metaData.contains( Meta::valAlbum ) )
-                    album = metaData.value( Meta::valAlbum );
-
-                // Special demangling of artist/title for Shoutcast streams, which usually have "Artist - Title" in the title tag:
-                if( artist.isEmpty() && title.contains( " - " ) ) {
-                    const QStringList artist_title = title.split( " - " );
-                    if( artist_title.size() >= 2 ) {
-                        artist = artist_title[0];
-                        title  = title.remove( 0, artist.length() + 3 );
-                    }
-                }
-
-                notify();
-            }
-        }
-
-        void engineStateChanged( Phonon::State state, Phonon::State oldState )
-        {
-            Q_UNUSED( oldState )
-
-            if ( state ==  Phonon::PlayingState ) {
-                Meta::TrackPtr track = The::engineController()->currentTrack();
-
-                if ( track && track->playableUrl().url() == url.url() )
-                { 
-                    if( track->artist() )
-                        artist = track->artist()->name();
-                    title = track->name();
-                    if( track->album() )
-                        album = track->album()->name();
-
-                        // Special demangling of artist/title for Shoutcast streams, which usually have "Artist - Title" in the title tag:
-                    if( !track->artist() && title.contains( " - " ) ) {
-                        const QStringList artist_title = title.split( " - " );
-                        if( artist_title.size() >= 2 ) {
-                            artist = artist_title[0];
-                            title  = title.remove( 0, artist.length() + 3 );
-                        }
-                    }
-
-                    notify();
-                }
-            }
-        }
-
-    public:
-        QSet<Meta::Observer*> observers;
-        KUrl url;
-        QString title;
-        QString artist;
-        QString album;
-
-        Meta::ArtistPtr artistPtr;
-        Meta::AlbumPtr albumPtr;
-        Meta::GenrePtr genrePtr;
-        Meta::ComposerPtr composerPtr;
-        Meta::YearPtr yearPtr;
-
-    private:
-        Track *track;
-};
-
-
-// internal helper classes
-
-class StreamArtist : public Meta::Artist
-{
-    public:
-        StreamArtist( MetaStream::Track::Private *dptr )
-            : Meta::Artist()
-            , d( dptr )
-            {}
-
-        Meta::TrackList tracks()
-        {
-            return Meta::TrackList();
-        }
-
-        Meta::AlbumList albums()
-        {
-            return Meta::AlbumList();
-        }
-
-        QString name() const
-        {
-            if( d )
-                return d->artist;
-            return QString();
-        }
-
-        QString prettyName() const
-        {
-            return name();
-        }
-
-        bool operator==( const Meta::Artist &other ) const {
-            return name() == other.name();
-        }
-
-        MetaStream::Track::Private * const d;
-};
-
-class StreamAlbum : public Meta::Album
-{
-public:
-    StreamAlbum( MetaStream::Track::Private *dptr )
-        : Meta::Album()
-        , d( dptr )
-    {}
-
-    bool isCompilation() const
-    {
-        return false;
-    }
-
-    bool hasAlbumArtist() const
-    {
-        return false;
-    }
-
-    Meta::ArtistPtr albumArtist() const
-    {
-        return Meta::ArtistPtr();
-    }
-
-    Meta::TrackList tracks()
-    {
-        return Meta::TrackList();
-    }
-
-    QString name() const
-    {
-        if( d )
-            return d->album;
-        return QString();
-    }
-
-    QString prettyName() const
-    {
-        return name();
-    }
-
-    void setImage( const QPixmap &pixmap )
-    {
-        m_cover = pixmap;
-    }
-
-    QPixmap image( int size )
-    {
-        if ( m_cover.isNull() )
-            return Meta::Album::image( size );
-
-        //only cache during session
-        if ( m_coverSizeMap.contains( size ) )
-            return m_coverSizeMap.value( size );
-
-        QPixmap scaled = m_cover.scaled( size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
-
-        m_coverSizeMap.insert( size, scaled );
-        return scaled;
-    }
- 
-    bool operator==( const Meta::Album &other ) const {
-        return name() == other.name();
-    }
-
-    MetaStream::Track::Private * const d;
-    QMap <int, QPixmap> m_coverSizeMap;
-    QPixmap m_cover;
-};
-
-
-#endif
-
diff --git a/src/meta/playlists/Playlist.cpp b/src/meta/playlists/Playlist.cpp
deleted file mode 100644
index eb7c079..0000000
--- a/src/meta/playlists/Playlist.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "Playlist.h"
-
-
-Meta::PlaylistObserver::~PlaylistObserver()
-{
-    foreach( Meta::PlaylistPtr playlist, m_playlistSubscriptions )
-    {
-        playlist->unsubscribe( this );
-    }
-}
-
-void
-Meta::PlaylistObserver::subscribeTo( Meta::PlaylistPtr playlist )
-{
-    if( playlist )
-    {
-        m_playlistSubscriptions.insert( playlist );
-        playlist->subscribe( this );
-    }
-}
-
-void
-Meta::PlaylistObserver::unsubscribeFrom( Meta::PlaylistPtr playlist )
-{
-    if( playlist )
-    {
-        m_playlistSubscriptions.remove( playlist );
-        playlist->unsubscribe( this );
-    }
-}
diff --git a/src/meta/playlists/Playlist.h b/src/meta/playlists/Playlist.h
deleted file mode 100644
index 6143a9b..0000000
--- a/src/meta/playlists/Playlist.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_META_PLAYLIST_H
-#define AMAROK_META_PLAYLIST_H
-
-#include "amarok_export.h"
-#include "meta/Meta.h"
-#include "capabilities/Capability.h"
-
-#include <QList>
-#include <QMetaType>
-#include <QPixmap>
-#include <QSet>
-#include <QSharedData>
-#include <QString>
-#include <QTextStream>
-
-#include <ksharedptr.h>
-#include <kurl.h>
-
-class PlaylistProvider;
-class QTextStream;
-
-namespace Meta
-{
-    class Playlist;
-
-    typedef KSharedPtr<Playlist> PlaylistPtr;
-    typedef QList<PlaylistPtr> PlaylistList;
-
-    enum PlaylistCategory
-    {
-        UserPlaylist = 1,
-        PodcastChannelPlaylist
-    };
-
-    class AMAROK_EXPORT PlaylistObserver
-    {
-        public:
-            void subscribeTo( PlaylistPtr );
-            void unsubscribeFrom( PlaylistPtr );
-
-            /** This method is called when a track has been added to the playlist.
-             */
-            virtual void trackAdded( PlaylistPtr playlist, TrackPtr track, int position ) = 0;
-            /** This method is called when a track is removed from to the playlist.
-             */
-            virtual void trackRemoved( PlaylistPtr playlist, int position ) = 0;
-
-            virtual ~PlaylistObserver();
-
-        private:
-            QSet<PlaylistPtr> m_playlistSubscriptions;
-    };
-
-    class AMAROK_EXPORT Playlist : public virtual QSharedData
-    {
-        public:
-            virtual ~Playlist() {}
-            virtual QString name() const = 0;
-            virtual QString prettyName() const = 0;
-            virtual QString description() const { return QString(); }
-
-            virtual PlaylistProvider *provider() const { return 0; }
-
-            /**override showing just the filename */
-            virtual void setName( const QString &name ) { m_name = name; }
-
-            /** @returns the number of tracks this playlist contains. -1 if this can not
-              * be determined before loading them all.
-              */
-            virtual int trackCount() const { return -1; }
-            /** returns all tracks in this playlist */
-            virtual TrackList tracks() = 0;
-            virtual void addTrack( Meta::TrackPtr track, int position = -1 )
-                    { Q_UNUSED(track); Q_UNUSED(position); }
-            virtual void removeTrack( int position ) { Q_UNUSED(position); }
-
-            virtual void subscribe( PlaylistObserver *observer )
-                    { if( observer ) m_observers.insert( observer ); }
-            virtual void unsubscribe( PlaylistObserver *observer )
-                    { m_observers.remove( observer ); }
-
-            virtual QStringList groups() { return QStringList(); }
-
-            /**
-            * "labels" the playlist as part of a group. In a folder-like hierachy this means adding
-            * the playlist to the folder with name groups.first().
-            * If groups is empty that means removing all groups from the playlist.
-            */
-            virtual void setGroups( const QStringList &groups ) { Q_UNUSED(groups) }
-
-            /* the following has been copied from Meta.h
-            * it is my hope that we can integrate Playlists
-            * better into the rest of the Meta framework someday ~Bart Cerneels
-            * TODO: Playlist : public MetaBase
-            */
-            virtual bool hasCapabilityInterface( Meta::Capability::Type type ) const = 0;
-
-            virtual Capability* createCapabilityInterface( Capability::Type type ) = 0;
-
-            /**
-             * Retrieves a specialized interface which represents a capability of this
-             * MetaBase object.
-             *
-             * @returns a pointer to the capability interface if it exists, 0 otherwise
-             */
-            template <class CapIface> CapIface *create()
-            {
-                Meta::Capability::Type type = CapIface::capabilityInterfaceType();
-                Meta::Capability *iface = createCapabilityInterface(type);
-                return qobject_cast<CapIface *>(iface);
-            }
-
-            /**
-             * Tests if a MetaBase object provides a given capability interface.
-             *
-             * @returns true if the interface is available, false otherwise
-             */
-            template <class CapIface> bool is() const
-            {
-                return hasCapabilityInterface( CapIface::capabilityInterfaceType() );
-            }
-
-            virtual KUrl retrievableUrl() { return KUrl(); }
-
-        protected:
-            inline void notifyObserversTrackAdded( Meta::TrackPtr track, int position )
-            {
-                foreach( Meta::PlaylistObserver *observer, m_observers )
-                {
-                    if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
-                        observer->trackAdded( Meta::PlaylistPtr( this ), track, position );
-                }
-            }
-
-            inline void notifyObserversTrackRemoved( int position )
-            {
-                foreach( Meta::PlaylistObserver *observer, m_observers )
-                {
-                    if( m_observers.contains( observer ) ) // guard against observers removing themselves in destructors
-                        observer->trackRemoved( Meta::PlaylistPtr( this ), position );
-                }
-            }
-
-            QSet<Meta::PlaylistObserver*> m_observers;
-            QString m_name;
-    };
-
-}
-
-Q_DECLARE_METATYPE( Meta::PlaylistPtr )
-Q_DECLARE_METATYPE( Meta::PlaylistList )
-
-#endif
diff --git a/src/meta/playlists/PlaylistProvider.cpp b/src/meta/playlists/PlaylistProvider.cpp
deleted file mode 100644
index 9fb0b36..0000000
--- a/src/meta/playlists/PlaylistProvider.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "PlaylistProvider.h"
-#include "PlaylistProvider.moc"
diff --git a/src/meta/playlists/PlaylistProvider.h b/src/meta/playlists/PlaylistProvider.h
deleted file mode 100644
index aab95d0..0000000
--- a/src/meta/playlists/PlaylistProvider.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_PLAYLISTPROVIDER_H
-#define AMAROK_PLAYLISTPROVIDER_H
-
-#include "amarok_export.h"
-#include "plugin/plugin.h"
-#include "Playlist.h"
-
-#include <QString>
-
-class QAction;
-class KIcon;
-
-class AMAROK_EXPORT PlaylistProvider : public QObject, public Amarok::Plugin
-{
-    Q_OBJECT
-
-    public:
-        virtual ~PlaylistProvider() {}
-
-        /**
-        * @returns A translated string to identify this Provider.
-        */
-        virtual QString prettyName() const = 0;
-
-        virtual KIcon icon() const = 0;
-
-        /**
-         * @returns An unique integer that identifies the category of the offered playlists.
-         * Use the PlaylistManager::PlaylistCategory enum.
-         */
-        virtual int category() const = 0;
-
-        /** @returns the number of playlists this provider has or a negative value if it
-         * can not determine that before loading them all.
-         */
-        virtual int playlistCount() const { return -1; }
-        virtual Meta::PlaylistList playlists() = 0;
-
-        virtual QList<QAction *> providerActions() { return QList<QAction *>(); }
-        virtual QList<QAction *> playlistActions( Meta::PlaylistPtr playlist ) = 0;
-        virtual QList<QAction *> trackActions( Meta::PlaylistPtr playlist,
-                                                  int trackIndex ) = 0;
-
-    signals:
-        void updated();
-
-};
-
-#endif // AMAROK_PLAYLISTPROVIDER_H
diff --git a/src/meta/playlists/impl/dynamic/DynamicPlaylist.cpp b/src/meta/playlists/impl/dynamic/DynamicPlaylist.cpp
deleted file mode 100644
index f42a31b..0000000
--- a/src/meta/playlists/impl/dynamic/DynamicPlaylist.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "DynamicPlaylist.h"
-
-#include <KLocale>
-
-namespace Meta {
-
-DynamicPlaylist::DynamicPlaylist( PlaylistPtr playlist )
- : Playlist()
-{
-    m_tracks = playlist->tracks();
-}
-
-DynamicPlaylist::~DynamicPlaylist()
-{
-}
-
-QString
-DynamicPlaylist::prettyName() const
-{
-    return i18n("Default Dynamic Playlist");
-}
-
-}
diff --git a/src/meta/playlists/impl/dynamic/DynamicPlaylist.h b/src/meta/playlists/impl/dynamic/DynamicPlaylist.h
deleted file mode 100644
index 81373b0..0000000
--- a/src/meta/playlists/impl/dynamic/DynamicPlaylist.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef METADYNAMICPLAYLIST_H
-#define METADYNAMICPLAYLIST_H
-
-#include <Playlist.h>
-
-namespace Meta {
-
-/**
- * Base Class for all dynamic playlists.
- *  @author Bart Cerneels <bart.cerneels at kde.org>
-*/
-class AMAROK_EXPORT DynamicPlaylist : public Playlist
-{
-    public:
-        DynamicPlaylist( PlaylistPtr playlist );
-
-        ~DynamicPlaylist();
-
-        /* Meta::Playlist virtuals */
-        virtual QString name() const { return prettyName(); };
-        virtual QString prettyName() const;
-
-        TrackList tracks() { return m_tracks; };
-
-        void recalculate();
-
-    protected:
-        TrackList m_tracks;
-        TrackPtr m_newestTrack;
-};
-
-}
-
-#endif
diff --git a/src/meta/playlists/impl/file/PlaylistFile.h b/src/meta/playlists/impl/file/PlaylistFile.h
deleted file mode 100644
index cc43af0..0000000
--- a/src/meta/playlists/impl/file/PlaylistFile.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef METAPLAYLISTFILE_H
-#define METAPLAYLISTFILE_H
-
-#include "playlists/Playlist.h"
-
-class PlaylistProvider;
-
-namespace Meta
-{
-
-    class PlaylistFile;
-
-    typedef KSharedPtr<PlaylistFile> PlaylistFilePtr;
-    typedef QList<PlaylistFilePtr> PlaylistFileList;
-
-    /**
-     * Base class for all playlist files
-     *
-     **/
-    class AMAROK_EXPORT PlaylistFile : public Playlist
-    {
-        public:
-            PlaylistFile() : Playlist(), m_provider( 0 ) {}
-            virtual ~PlaylistFile() {}
-
-            virtual bool isWritable() { return false; }
-
-            virtual bool save( const KUrl &url, bool relative )
-                { Q_UNUSED( url ); Q_UNUSED( relative ); return false; }
-            virtual bool load( QTextStream &stream ) { Q_UNUSED( stream ); return false; }
-
-            virtual void setName( const QString &name ) = 0;
-            virtual void setGroups( const QStringList &groups ) { m_groups = groups; }
-            virtual QStringList groups() { return m_groups; }
-
-            //default implementation prevents crashes related to PlaylistFileProvider
-            virtual void setProvider( PlaylistProvider *provider ) { m_provider = provider; }
-
-            /* Playlist Methods */
-            virtual PlaylistProvider *provider() const { return m_provider; }
-
-        protected:
-            PlaylistProvider *m_provider;
-            QStringList m_groups;
-    };
-
-}
-
-Q_DECLARE_METATYPE( Meta::PlaylistFilePtr )
-Q_DECLARE_METATYPE( Meta::PlaylistFileList )
-
-#endif
diff --git a/src/meta/playlists/impl/file/PlaylistFileSupport.cpp b/src/meta/playlists/impl/file/PlaylistFileSupport.cpp
deleted file mode 100644
index c0b8b7d..0000000
--- a/src/meta/playlists/impl/file/PlaylistFileSupport.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Ian Monroe <ian at monroe.nu>                                        *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) version 3 or        *
- * any later version accepted by the membership of KDE e.V. (or its successor approved  *
- * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of  *
- * version 3 of the license.                                                            *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "PlaylistFileSupport.h"
-#include "Debug.h"
-#include "collection/CollectionManager.h"
-#include "statusbar/StatusBar.h"
-#include "playlists/impl/file/xspf/XSPFPlaylist.h"
-#include "playlists/impl/file/pls/PLSPlaylist.h"
-#include "playlists/impl/file/m3u/M3UPlaylist.h"
-
-
-#include <KLocale>
-#include <KTemporaryFile>
-#include <KUrl>
-
-#include <QFile>
-#include <QFileInfo>
-
-namespace Meta {
-
-PlaylistFormat
-getFormat( const KUrl &path )
-{
-    const QString ext = Amarok::extension( path.fileName() );
-
-    if( ext == "m3u" || ext == "m3u8" ) return M3U; //m3u8 is M3U in UTF8
-    if( ext == "pls" ) return PLS;
-    if( ext == "ram" ) return RAM;
-    if( ext == "smil") return SMIL;
-    if( ext == "asx" || ext == "wax" ) return ASX;
-    if( ext == "xml" ) return XML;
-    if( ext == "xspf" ) return XSPF;
-
-    return Unknown;
-}
-
-bool
-isPlaylist( const KUrl &path )
-{
-    return ( getFormat( path ) != Unknown );
-}
-
-PlaylistFilePtr
-loadPlaylistFile( const KUrl &url )
-{
-    //DEBUG_BLOCK
-
-    QFile file;
-    KUrl fileToLoad;
-
-    if( !url.isValid() )
-    {
-        error() << "url is not valid!";
-        return PlaylistFilePtr();
-    }
-
-    if( url.isLocalFile() )
-    {
-        if( !QFileInfo( url.toLocalFile() ).exists() )
-        {
-            error() << QString("Could not load local playlist file %1!").arg( url.toLocalFile() );
-            return PlaylistFilePtr();
-        }
-    }
-
-    if( url.isLocalFile() )
-    {
-        //debug() << "local file";
-
-        file.setFileName( url.toLocalFile() );
-
-        if( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
-        {
-            debug() << "could not read file " << url.path();
-
-            if( The::statusBar() )
-                The::statusBar()->longMessage( i18n( "Cannot read playlist (%1).", url.url() ) );
-
-            return Meta::PlaylistFilePtr( 0 );
-        }
-        fileToLoad = url;
-    }
-    else
-    {
-        //debug() << "remote file: " << url;
-        //FIXME: for now, just do a blocking download... Someone please come up with a better way...
-
-        KTemporaryFile tempFile;
-
-        tempFile.setSuffix(  '.' + Amarok::extension( url.url() ) );
-        tempFile.setAutoRemove( false );  //file will be removed in JamendoXmlParser
-        if( !tempFile.open() )
-        {
-            if( The::statusBar() )
-                The::statusBar()->longMessage( i18n( "Could not create a temporary file to download playlist.") );
-
-            return Meta::PlaylistFilePtr( 0 ); //error
-        }
-
-
-        QString tempFileName = tempFile.fileName();
-        #ifdef Q_WS_WIN
-        // KIO::file_copy faild to overwrite an open file
-        // using KTemporary.close() is not enough here
-        tempFile.remove();
-        #endif
-        KIO::FileCopyJob * job = KIO::file_copy( url , KUrl( tempFileName ), 0774 , KIO::Overwrite | KIO::HideProgressInfo );
-
-        if( The::statusBar() )
-            The::statusBar()->newProgressOperation( job, i18n( "Downloading remote playlist" ) );
-
-        if( !job->exec() ) //Job deletes itself after execution
-        {
-            error() << "error";
-            return Meta::PlaylistFilePtr( 0 );
-        }
-        else
-        {
-            file.setFileName( tempFileName );
-            if( !file.open( QFile::ReadOnly ) )
-            {
-                debug() << "error opening file: " << tempFileName;
-                return Meta::PlaylistFilePtr( 0 );
-            }
-            fileToLoad = KUrl::fromPath( file.fileName() );
-        }
-    }
-
-    PlaylistFormat format = getFormat( fileToLoad );
-    PlaylistFile *playlist = 0;
-    switch( format )
-    {
-        case PLS:
-            playlist = new PLSPlaylist( fileToLoad );
-            break;
-        case M3U:
-            playlist = new M3UPlaylist( fileToLoad );
-            break;
-        case XSPF:
-            playlist = new XSPFPlaylist( fileToLoad );
-            break;
-        default:
-            debug() << "Could not load playlist file " << fileToLoad;
-            break;
-    }
-
-    return PlaylistFilePtr( playlist );
-}
-
-bool
-exportPlaylistFile( const Meta::TrackList &list, const KUrl &path )
-{
-    PlaylistFormat format = getFormat( path );
-    bool result = false;
-    switch( format )
-    {
-        case PLS:
-            result = PLSPlaylist( list ).save( path.path(), true );
-            break;
-        case M3U:
-            result = M3UPlaylist( list ).save( path.path(), true );
-            break;
-        case XSPF:
-            result = XSPFPlaylist( list ).save( path.path(), true );
-            break;
-        default:
-            debug() << "Could not export playlist file " << path;
-            break;
-    }
-    return result;
-}
-
-bool
-canExpand( TrackPtr track )
-{
-    if( !track )
-        return false;
-
-    return Meta::getFormat( track->uidUrl() ) != Meta::NotPlaylist;
-}
-
-PlaylistPtr
-expand( TrackPtr track )
-{
-   //this should really be made asyncrhonous
-   return Meta::PlaylistPtr::dynamicCast( loadPlaylistFile( track->uidUrl() ) );
-}
-
-KUrl
-newPlaylistFilePath( const QString &fileExtension )
-{
-    int trailingNumber = 1;
-    KLocalizedString fileName = ki18n("Playlist_%1");
-    KUrl url( Amarok::saveLocation( "playlists" ) );
-    url.addPath( fileName.subs( trailingNumber ).toString() );
-
-    while( QFileInfo( url.path() ).exists() )
-        url.setFileName( fileName.subs( ++trailingNumber ).toString() );
-
-    return KUrl( QString( "%1.%2" ).arg( url.path() ).arg( fileExtension ) );
-}
-
-}
diff --git a/src/meta/playlists/impl/file/PlaylistFileSupport.h b/src/meta/playlists/impl/file/PlaylistFileSupport.h
deleted file mode 100644
index fb63820..0000000
--- a/src/meta/playlists/impl/file/PlaylistFileSupport.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Ian Monroe <ian at monroe.nu>                                        *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_META_PLAYLISTFILESUPPORT_H
-#define AMAROK_META_PLAYLISTFILESUPPORT_H
-
-#include "amarok_export.h"
-#include "Meta.h"
-#include "PlaylistFile.h"
-
-#include <QString>
-#include <QTextStream>
-
-#include <KUrl>
-#include <kio/job.h>
-#include <kio/jobclasses.h>
-
-class QFile;
-
-namespace Meta
-{
-    enum PlaylistFormat
-    {
-        M3U,
-        PLS,
-        XML,
-        RAM,
-        SMIL,
-        ASX,
-        XSPF,
-        Unknown,
-        NotPlaylist = Unknown
-    };
-    PlaylistFormat getFormat( const KUrl &path );
-    bool isPlaylist( const KUrl &path );
-
-    AMAROK_EXPORT PlaylistFilePtr loadPlaylistFile( const KUrl &url );
-    bool exportPlaylistFile( const Meta::TrackList &list, const KUrl &path );
-
-    /* HACK:
-     * the next two functions are needed to support some services that have no other way
-     * of presenting data to the user than wrapping the url to a playlist in a track.
-     */
-    bool canExpand( Meta::TrackPtr track );
-    PlaylistPtr expand( Meta::TrackPtr track );
-
-    AMAROK_EXPORT KUrl newPlaylistFilePath( const QString& fileExtension );
-
-}
-
-#endif
diff --git a/src/meta/playlists/impl/file/m3u/M3UPlaylist.cpp b/src/meta/playlists/impl/file/m3u/M3UPlaylist.cpp
deleted file mode 100644
index bd5da90..0000000
--- a/src/meta/playlists/impl/file/m3u/M3UPlaylist.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "M3UPlaylist.h"
-
-#include "Amarok.h"
-#include "CollectionManager.h"
-#include "Debug.h"
-#include "PlaylistManager.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
-
-#include <KMimeType>
-#include <KUrl>
-
-#include <QFile>
-#include <QFileInfo>
-#include <QTextStream>
-
-namespace Meta {
-
-M3UPlaylist::M3UPlaylist()
-    : m_url( Meta::newPlaylistFilePath( "m3u" ) )
-    , m_tracksLoaded( false )
-{
-    m_name = m_url.fileName();
-}
-
-M3UPlaylist::M3UPlaylist( Meta::TrackList tracks )
-    : m_url( Meta::newPlaylistFilePath( "m3u" ) )
-    , m_tracksLoaded( true )
-    , m_tracks( tracks )
-{
-    m_name = m_url.fileName();
-}
-
-M3UPlaylist::M3UPlaylist( const KUrl &url )
-    : m_url( url )
-    , m_tracksLoaded( false )
-{
-    //DEBUG_BLOCK
-    //debug() << "url: " << m_url;
-    m_name = m_url.fileName();
-}
-
-M3UPlaylist::~M3UPlaylist()
-{
-}
-
-QString
-M3UPlaylist::description() const
-{
-    KMimeType::Ptr mimeType = KMimeType::mimeType( "audio/x-mpegurl" );
-    return QString( "%1 (%2)").arg( mimeType->name(), "m3u" );
-}
-
-TrackList
-M3UPlaylist::tracks()
-{
-    if( m_tracksLoaded )
-        return m_tracks;
-
-    //check if file is local or remote
-    if ( m_url.isLocalFile() )
-    {
-        QFile file( m_url.toLocalFile() );
-        if( !file.open( QIODevice::ReadOnly ) ) {
-            debug() << "cannot open file";
-            return m_tracks;
-        }
-
-        QString contents( file.readAll() );
-        file.close();
-
-        QTextStream stream;
-        stream.setString( &contents );
-        loadM3u( stream );
-        m_tracksLoaded = true;
-    }
-    else
-    {
-        The::playlistManager()->downloadPlaylist( m_url, PlaylistFilePtr( this ) );
-    }
-    return m_tracks;
-}
-
-bool
-M3UPlaylist::loadM3u( QTextStream &stream )
-{
-    DEBUG_BLOCK
-
-    const QString directory = m_url.directory();
-
-    for( QString line; !stream.atEnd(); )
-    {
-        line = stream.readLine();
-        if( line.startsWith( "#EXTINF" ) )
-        {
-            //const QString extinf = line.section( ':', 1 );
-            //const int length = extinf.section( ',', 0, 0 ).toInt();
-        }
-
-        else if( !line.startsWith( '#' ) && !line.isEmpty() )
-        {
-            line = line.replace( "\\", "/" );
-
-            debug() << "line: " << line;
-            
-            // KUrl::isRelativeUrl() expects absolute URLs to start with a protocol, so prepend it if missing
-            QString url = line;
-            if( url.startsWith( '/' ) )
-                url.prepend( "file://" );
-            // Won't be relative if it begins with a /
-            // Also won't be windows url, so no need to worry about swapping \ for /
-            if( KUrl::isRelativeUrl( url ) )
-            {
-                debug() << "relative url";
-                //Replace \ with / for windows playlists
-                line.replace('\\','/');
-                KUrl kurl( directory );
-                kurl.addPath( line ); // adds directory separator if required
-                kurl.cleanPath();
-                Meta::TrackPtr trackPtr = CollectionManager::instance()->trackForUrl( kurl );
-
-                if ( trackPtr ) {
-                    debug() << "track url: " << trackPtr->prettyUrl();
-                    m_tracks.append( trackPtr );
-                }
-            }
-            else
-            {
-                Meta::TrackPtr trackPtr = CollectionManager::instance()->trackForUrl( KUrl( line ) );
-                if ( trackPtr ) {
-                    m_tracks.append( trackPtr );
-                }
-            }
-        }
-    }
-    return true;
-}
-
-bool
-M3UPlaylist::save( const KUrl &location, bool relative )
-{
-    KUrl savePath = location;
-    //if the location is a directory append the name of this playlist.
-    if( savePath.fileName().isNull() )
-        savePath.setFileName( name() );
-
-    QFile file( savePath.path() );
-
-    if( !file.open( QIODevice::WriteOnly ) )
-    {
-        debug() << "Unable to write to playlist " << savePath.path();
-        return false;
-    }
-
-    QTextStream stream( &file );
-
-    stream << "#EXTM3U\n";
-
-    KUrl::List urls;
-    QStringList titles;
-    QList<int> lengths;
-    foreach( Meta::TrackPtr track, m_tracks )
-    {
-        if( track )
-        {
-            urls << track->playableUrl();
-            titles << track->name();
-            lengths << track->length();
-        }
-    }
-
-    for( int i = 0, n = urls.count(); i < n; ++i )
-    {
-        const KUrl &url = urls[i];
-
-        if( !titles.isEmpty() && !lengths.isEmpty() )
-        {
-            stream << "#EXTINF:";
-            stream << QString::number( lengths[i] );
-            stream << ',';
-            stream << titles[i];
-            stream << '\n';
-        }
-        if (url.protocol() == "file" ) {
-            if ( relative ) {
-                const QFileInfo fi(file);
-                stream << KUrl::relativePath(fi.path(), url.path());
-            } else
-                stream << url.path();
-        } else {
-            stream << url.url();
-        }
-        stream << "\n";
-    }
-
-    return true;
-}
-
-bool
-M3UPlaylist::isWritable()
-{
-    if( m_url.isEmpty() )
-        return false;
-
-    return QFileInfo( m_url.path() ).isWritable();
-}
-
-void
-M3UPlaylist::setName( const QString &name )
-{
-    m_url.setFileName( name );
-}
-
-} //namespace Meta
-
diff --git a/src/meta/playlists/impl/file/m3u/M3UPlaylist.h b/src/meta/playlists/impl/file/m3u/M3UPlaylist.h
deleted file mode 100644
index 413cb3b..0000000
--- a/src/meta/playlists/impl/file/m3u/M3UPlaylist.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef METAM3UPLAYLIST_H
-#define METAM3UPLAYLIST_H
-
-#include "playlists/impl/file/PlaylistFile.h"
-
-class QTextStream;
-class QString;
-class QFile;
-
-namespace Meta {
-
-class M3UPlaylist;
-
-typedef KSharedPtr<M3UPlaylist> M3UPlaylistPtr;
-typedef QList<M3UPlaylistPtr> M3UPlaylistList;
-
-/**
-	@author Bart Cerneels <bart.cerneels at kde.org>
-*/
-class AMAROK_EXPORT_TESTS M3UPlaylist : public PlaylistFile
-{
-    public:
-        M3UPlaylist();
-        M3UPlaylist( Meta::TrackList tracks );
-        M3UPlaylist( const KUrl &url );
-
-        ~M3UPlaylist();
-
-        /* Playlist virtual functions */
-        virtual QString name() const { return prettyName(); }
-        virtual QString prettyName() const { return m_url.fileName(); }
-        virtual QString description() const;
-
-        virtual int trackCount() const { return -1; }
-        /** returns all tracks in this playlist */
-        virtual TrackList tracks();
-
-       /* the following has been copied from Meta.h
-        * it is my hope that we can integrate Playlists
-        * better into the rest of the Meta framework someday ~Bart Cerneels
-        * TODO: Playlist : public MetaBase
-        */
-        bool hasCapabilityInterface( Meta::Capability::Type type ) const { Q_UNUSED( type ); return false; }
-
-        Capability* createCapabilityInterface( Capability::Type type ) { Q_UNUSED( type ); return 0; }
-
-        KUrl retrievableUrl() { return m_url; }
-
-        /* PlaylistFile methods */
-        bool isWritable();
-        void setName( const QString &name );
-
-        bool save( const KUrl &location, bool relative );
-        bool load( QTextStream &stream ) { return loadM3u( stream ); }
-
-    private:
-        bool loadM3u( QTextStream &stream );
-
-        KUrl m_url;
-
-        bool m_tracksLoaded;
-        TrackList m_tracks;
-};
-
-}
-
-Q_DECLARE_METATYPE( Meta::M3UPlaylistPtr )
-Q_DECLARE_METATYPE( Meta::M3UPlaylistList )
-
-#endif
diff --git a/src/meta/playlists/impl/file/pls/PLSPlaylist.cpp b/src/meta/playlists/impl/file/pls/PLSPlaylist.cpp
deleted file mode 100644
index 8c1faf8..0000000
--- a/src/meta/playlists/impl/file/pls/PLSPlaylist.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "PLSPlaylist.h"
-
-#include "CollectionManager.h"
-#include "Debug.h"
-#include "EditCapability.h"
-#include "meta/Meta.h"
-#include "PlaylistManager.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
-
-#include <KMimeType>
-#include <KLocale>
-
-#include <QTextStream>
-#include <QRegExp>
-#include <QString>
-#include <QFile>
-
-namespace Meta {
-
-PLSPlaylist::PLSPlaylist()
-    : m_url( Meta::newPlaylistFilePath( "pls" ) )
-{
-    m_name = m_url.fileName();
-}
-
-PLSPlaylist::PLSPlaylist( TrackList tracks )
-    : m_tracks( tracks )
-    , m_url( Meta::newPlaylistFilePath( "pls" ) )
-{
-    m_name = m_url.fileName();
-}
-
-PLSPlaylist::PLSPlaylist( const KUrl &url )
-    : m_url( url )
-{
-    DEBUG_BLOCK
-    debug() << "url: " << m_url;
-
-    m_name = m_url.fileName();
-
-    //check if file is local or remote
-    if ( m_url.isLocalFile() )
-    {
-        QFile file( m_url.toLocalFile() );
-        if( !file.open( QIODevice::ReadOnly ) ) {
-            debug() << "cannot open file";
-            return;
-        }
-
-        QString contents = QString( file.readAll() );
-        file.close();
-
-        QTextStream stream;
-        stream.setString( &contents );
-        loadPls( stream );
-    }
-    else
-    {
-        The::playlistManager()->downloadPlaylist( m_url, PlaylistFilePtr( this ) );
-    }
-}
-
-PLSPlaylist::~PLSPlaylist()
-{
-}
-
-QString
-PLSPlaylist::description() const
-{
-    KMimeType::Ptr mimeType = KMimeType::mimeType( "audio/x-scpls" );
-    return QString( "%1 (%2)").arg( mimeType->name(), "pls" );
-}
-
-bool
-PLSPlaylist::loadPls( QTextStream &stream )
-{
-    DEBUG_BLOCK
-
-    Meta::TrackPtr currentTrack;
-
-    // Counted number of "File#=" lines.
-    unsigned int entryCnt = 0;
-    // Value of the "NumberOfEntries=#" line.
-    unsigned int numberOfEntries = 0;
-    // Does the file have a "[playlist]" section? (as it's required by the standard)
-    bool havePlaylistSection = false;
-    QString tmp;
-    QStringList lines;
-
-    const QRegExp regExp_NumberOfEntries("^NumberOfEntries\\s*=\\s*\\d+$");
-    const QRegExp regExp_File("^File\\d+\\s*=");
-    const QRegExp regExp_Title("^Title\\d+\\s*=");
-    const QRegExp regExp_Length("^Length\\d+\\s*=\\s*\\d+$");
-    const QRegExp regExp_Version("^Version\\s*=\\s*\\d+$");
-    const QString section_playlist("[playlist]");
-
-    /* Preprocess the input data.
-    * Read the lines into a buffer; Cleanup the line strings;
-    * Count the entries manually and read "NumberOfEntries".
-    */
-    while (!stream.atEnd()) {
-        tmp = stream.readLine();
-        tmp = tmp.trimmed();
-        if (tmp.isEmpty())
-            continue;
-        lines.append(tmp);
-
-        if (tmp.contains(regExp_File)) {
-            entryCnt++;
-            continue;
-        }
-        if (tmp == section_playlist) {
-            havePlaylistSection = true;
-            continue;
-        }
-        if (tmp.contains(regExp_NumberOfEntries)) {
-            numberOfEntries = tmp.section('=', -1).trimmed().toUInt();
-            continue;
-        }
-    }
-    if (numberOfEntries != entryCnt) {
-        warning() << ".pls playlist: Invalid \"NumberOfEntries\" value.  "
-                << "NumberOfEntries=" << numberOfEntries << "  counted="
-                << entryCnt << endl;
-        /* Corrupt file. The "NumberOfEntries" value is
-        * not correct. Fix it by setting it to the manually
-        * counted number and go on parsing.
-        */
-        numberOfEntries = entryCnt;
-    }
-    if (!numberOfEntries)
-        return true;
-
-    unsigned int index;
-    bool ok = false;
-    bool inPlaylistSection = false;
-
-    /* Now iterate through all beautified lines in the buffer
-    * and parse the playlist data.
-    */
-    QStringList::const_iterator i = lines.constBegin(), end = lines.constEnd();
-    for ( ; i != end; ++i) {
-        if (!inPlaylistSection && havePlaylistSection) {
-            /* The playlist begins with the "[playlist]" tag.
-            * Skip everything before this.
-            */
-            if ((*i) == section_playlist)
-                inPlaylistSection = true;
-            continue;
-        }
-        if ((*i).contains(regExp_File)) {
-            // Have a "File#=XYZ" line.
-            index = loadPls_extractIndex(*i);
-            if (index > numberOfEntries || index == 0)
-                continue;
-            tmp = (*i).section('=', 1).trimmed();
-            currentTrack = CollectionManager::instance()->trackForUrl( tmp );
-            if( currentTrack.isNull() )
-            {
-                debug() << "track could not be loaded: " << tmp;
-                continue;
-            }
-            m_tracks.append( currentTrack );
-            continue;
-        }
-        if ((*i).contains(regExp_Title)) {
-            // Have a "Title#=XYZ" line.
-            index = loadPls_extractIndex(*i);
-            if (index > numberOfEntries || index == 0)
-                continue;
-            tmp = (*i).section('=', 1).trimmed();
-
-            if ( currentTrack.data() != 0 && currentTrack->is<Meta::EditCapability>() )
-            {
-                Meta::EditCapability *ec = currentTrack->create<Meta::EditCapability>();
-                if( ec )
-                    ec->setTitle( tmp );
-                delete ec;
-            }
-            continue;
-        }
-        if ((*i).contains(regExp_Length)) {
-            // Have a "Length#=XYZ" line.
-            index = loadPls_extractIndex(*i);
-            if (index > numberOfEntries || index == 0)
-                continue;
-            tmp = (*i).section('=', 1).trimmed();
-            //tracks.append( KUrl(tmp) );
-//             Q_ASSERT(ok);
-            continue;
-        }
-        if ((*i).contains(regExp_NumberOfEntries)) {
-            // Have the "NumberOfEntries=#" line.
-            continue;
-        }
-        if ((*i).contains(regExp_Version)) {
-            // Have the "Version=#" line.
-            tmp = (*i).section('=', 1).trimmed();
-            // We only support Version=2
-            if (tmp.toUInt(&ok) != 2)
-                warning() << ".pls playlist: Unsupported version." << endl;
-//             Q_ASSERT(ok);
-            continue;
-        }
-        warning() << ".pls playlist: Unrecognized line: \"" << *i << "\"" << endl;
-    }
-
-    return true;
-}
-
-bool
-PLSPlaylist::save( const KUrl &location, bool relative )
-{
-    Q_UNUSED( relative );
-
-    KUrl savePath = location;
-    //if the location is a directory append the name of this playlist.
-    if( savePath.fileName().isNull() )
-        savePath.setFileName( name() );
-
-    QFile file( savePath.path() );
-
-    if( !file.open( QIODevice::WriteOnly ) )
-    {
-        debug() << "Unable to write to playlist " << savePath.path();
-        return false;
-    }
-
-    QTextStream stream( &file );
-    stream << "[Playlist]\n";
-    stream << "NumberOfEntries=" << m_tracks.count() << endl;
-    int i = 0;
-    foreach( Meta::TrackPtr track, m_tracks )
-    {
-        stream << "File" << i << "=";
-        stream << KUrl( track->playableUrl() ).path();
-        stream << "\nTitle" << i << "=";
-        stream << track->name();
-        stream << "\nLength" << i << "=";
-        stream << track->length() / 1000;
-        stream << "\n";
-        i++;
-    }
-
-    stream << "Version=2\n";
-    file.close();
-    return true;
-}
-
-unsigned int
-PLSPlaylist::loadPls_extractIndex( const QString &str ) const
-{
-    /* Extract the index number out of a .pls line.
-     * Example:
-    *   loadPls_extractIndex("File2=foobar") == 2
-    */
-    bool ok = false;
-    unsigned int ret;
-    QString tmp(str.section('=', 0, 0));
-    tmp.remove(QRegExp("^\\D*"));
-    ret = tmp.trimmed().toUInt(&ok);
-    Q_ASSERT(ok);
-    return ret;
-}
-
-bool
-PLSPlaylist::isWritable()
-{
-    if( m_url.isEmpty() )
-        return false;
-
-    return QFileInfo( m_url.path() ).isWritable();
-}
-
-void
-PLSPlaylist::setName( const QString &name )
-{
-    m_url.setFileName( name );
-}
-
-}
diff --git a/src/meta/playlists/impl/file/pls/PLSPlaylist.h b/src/meta/playlists/impl/file/pls/PLSPlaylist.h
deleted file mode 100644
index f477fda..0000000
--- a/src/meta/playlists/impl/file/pls/PLSPlaylist.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef METAPLSPLAYLIST_H
-#define METAPLSPLAYLIST_H
-
-#include "playlists/impl/file/PlaylistFile.h"
-
-class QTextStream;
-class QFile;
-
-namespace Meta {
-
-class PLSPlaylist;
-
-typedef KSharedPtr<PLSPlaylist> PLSPlaylistPtr;
-typedef QList<PLSPlaylistPtr> PLSPlaylistList;
-
-/**
-	@author Bart Cerneels <bart.cerneels at kde.org>
-*/
-class AMAROK_EXPORT_TESTS PLSPlaylist : public PlaylistFile
-{
-    public:
-        PLSPlaylist();
-        PLSPlaylist( TrackList tracks );
-        PLSPlaylist( const KUrl &url );
-
-        ~PLSPlaylist();
-
-        /* Playlist virtual functions */
-        virtual QString name() const { return prettyName(); }
-        virtual QString prettyName() const { return m_url.fileName(); }
-        virtual QString description() const;
-
-        /** returns all tracks in this playlist */
-        TrackList tracks() { return m_tracks; }
-
-        bool hasCapabilityInterface( Meta::Capability::Type type ) const { Q_UNUSED( type ); return false; }
-
-        Capability* createCapabilityInterface( Capability::Type type ) { Q_UNUSED( type ); return 0; }
-
-        KUrl retrievableUrl() { return m_url; }
-
-        /* PlaylistFile methods */
-        bool isWritable();
-        void setName( const QString &name );
-        bool save( const KUrl &location, bool relative );
-        bool load( QTextStream &stream ) { return loadPls( stream ); }
-
-    private:
-        bool loadPls( QTextStream &stream );
-        unsigned int loadPls_extractIndex( const QString &str ) const;
-
-        Meta::TrackList m_tracks;
-        KUrl m_url;
-};
-
-}
-
-Q_DECLARE_METATYPE( Meta::PLSPlaylistPtr )
-Q_DECLARE_METATYPE( Meta::PLSPlaylistList )
-
-#endif
diff --git a/src/meta/playlists/impl/file/xspf/XSPFPlaylist.cpp b/src/meta/playlists/impl/file/xspf/XSPFPlaylist.cpp
deleted file mode 100644
index 0eb4a40..0000000
--- a/src/meta/playlists/impl/file/xspf/XSPFPlaylist.cpp
+++ /dev/null
@@ -1,805 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2006 Mattias Fliesberg <mattias.fliesberg at gmail.com>                   *
- * Copyright (c) 2007 Ian Monroe <ian at monroe.nu>                                        *
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "XSPFPlaylist.h"
-
-#include "Debug.h"
-#include "CollectionManager.h"
-#include "MainWindow.h"
-#include "meta/impl/proxy/MetaProxy.h"
-#include "meta/support/MetaUtility.h"
-#include "capabilities/StreamInfoCapability.h"
-#include "meta/impl/stream/Stream.h"
-#include "meta/impl/file/File.h"
-#include "playlist/PlaylistController.h"
-#include "playlist/PlaylistModelStack.h"
-#include "PlaylistManager.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
-
-#include "timecode/TimecodeMeta.h"
-
-#include <kurl.h>
-#include <KMessageBox>
-#include <KMimeType>
-
-#include <QDateTime>
-#include <QDomElement>
-#include <QFile>
-#include <QString>
-
-#include <typeinfo>
-
-namespace Meta
-{
-
-XSPFPlaylist::XSPFPlaylist()
-    : QDomDocument()
-    , m_tracksLoaded( false )
-{
-    QDomElement root = createElement( "playlist" );
-
-    root.setAttribute( "version", 1 );
-    root.setAttribute( "xmlns", "http://xspf.org/ns/1/" );
-
-    root.appendChild( createElement( "trackList" ) );
-
-    appendChild( root );
-}
-
-XSPFPlaylist::XSPFPlaylist( const KUrl &url, bool autoAppend )
-    : QDomDocument()
-    , m_tracksLoaded( false )
-    , m_url( url )
-    , m_autoAppendAfterLoad( autoAppend )
-{
-    DEBUG_BLOCK
-    debug() << "url: " << m_url;
-
-    //check if file is local or remote
-    if ( m_url.isLocalFile() )
-    {
-        QFile file( m_url.toLocalFile() );
-        if( !file.open( QIODevice::ReadOnly ) ) {
-            debug() << "cannot open file";
-            return;
-        }
-
-        QTextStream stream( &file );
-        stream.setAutoDetectUnicode( true );
-
-        loadXSPF( stream );
-    }
-    else
-    {
-        The::playlistManager()->downloadPlaylist( m_url, PlaylistFilePtr( this ) );
-    }
-}
-
-XSPFPlaylist::XSPFPlaylist( Meta::TrackList tracks )
-    : QDomDocument()
-{
-    DEBUG_BLOCK
-
-    QDomElement root = createElement( "playlist" );
-
-    root.setAttribute( "version", 1 );
-    root.setAttribute( "xmlns", "http://xspf.org/ns/0/" );
-
-    root.appendChild( createElement( "trackList" ) );
-
-    appendChild( root );
-
-    setTrackList( tracks );
-
-    m_tracks = tracks;
-    m_tracksLoaded = true;
-}
-
-XSPFPlaylist::~XSPFPlaylist()
-{}
-
-QString
-XSPFPlaylist::description() const
-{
-    if( !annotation().isEmpty() )
-        return annotation();
-
-    KMimeType::Ptr mimeType = KMimeType::mimeType( "application/xspf+xml" );
-    return QString( "%1 (%2)").arg( mimeType->name(), "xspf" );
-}
-
-bool
-XSPFPlaylist::save( const KUrl &location, bool relative )
-{
-    DEBUG_BLOCK
-    Q_UNUSED( relative );
-
-    debug() << "Saving to " << location;
-    m_url = location;
-    //if the location is a directory append the name of this playlist.
-    if( m_url.fileName( KUrl::ObeyTrailingSlash ).isNull() )
-        m_url.setFileName( name() );
-
-    QFile file;
-
-    if( location.isLocalFile() )
-    {
-        file.setFileName( m_url.toLocalFile() );
-    }
-    else
-    {
-        file.setFileName( m_url.path() );
-    }
-
-    if( !file.open( QIODevice::WriteOnly ) )
-    {
-        if( The::mainWindow() ) // MainWindow might already be destroyed at this point (at program shutdown)
-            KMessageBox::sorry( The::mainWindow(), i18n( "Cannot write playlist (%1).", file.fileName() ) );
-        else
-            warning() << QString( "Cannot write playlist (%1)." ).arg( file.fileName() );
-
-        return false;
-    }
-
-    QTextStream stream ( &file );
-    stream.setCodec( "UTF-8" );
-    QDomDocument::save( stream, 2 /*indent*/, QDomNode::EncodingFromTextStream );
-
-    return true;
-}
-
-bool
-XSPFPlaylist::loadXSPF( QTextStream &stream )
-{
-    DEBUG_BLOCK
-    QString errorMsg;
-    int errorLine, errorColumn;
-
-    QString rawText = stream.readAll();
-
-    if ( !setContent( rawText, &errorMsg, &errorLine, &errorColumn ) )
-    {
-        debug() << "[XSPFPlaylist]: Error loading xml file: " "(" << errorMsg << ")"
-                << " at line " << errorLine << ", column " << errorColumn;
-        return false;
-    }
-
-    //FIXME: this needs to be moved to whatever is creating the XSPFPlaylist
-    if( m_autoAppendAfterLoad )
-        The::playlistController()->insertPlaylist( ::Playlist::ModelStack::instance()->source()->rowCount(), Meta::PlaylistPtr( this ) );
-
-    return true;
-}
-
-TrackList
-XSPFPlaylist::tracks()
-{
-    if( m_tracksLoaded )
-        return m_tracks;
-
-    XSPFTrackList xspfTracks = trackList();
-    TrackList tracks;
-
-    foreach( const XSPFTrack &track, xspfTracks )
-    {
-        TrackPtr trackPtr;
-        if( !track.identifier.isEmpty() )
-            trackPtr = CollectionManager::instance()->trackForUrl( track.identifier );
-        else
-            trackPtr = CollectionManager::instance()->trackForUrl( track.location );
-        if ( trackPtr )
-        {
-            if( !trackPtr->isPlayable() )
-                trackPtr = CollectionManager::instance()->trackForUrl( track.identifier );
-        }
-
-        if ( trackPtr )
-        {
-            if ( typeid( * trackPtr.data() ) == typeid( MetaStream::Track ) )
-            {
-                MetaStream::Track * streamTrack = dynamic_cast<MetaStream::Track *> ( trackPtr.data() );
-                if ( streamTrack )
-                {
-                    streamTrack->setTitle( track.title );
-                    streamTrack->setAlbum( track.album );
-                    streamTrack->setArtist( track.creator );
-                }
-            }
-            else if ( typeid( * trackPtr.data() ) == typeid( Meta::TimecodeTrack ) )
-            {
-                Meta::TimecodeTrack * timecodeTrack = dynamic_cast<Meta::TimecodeTrack *> ( trackPtr.data() );
-                if ( timecodeTrack )
-                {
-                    timecodeTrack->beginMetaDataUpdate();
-                    timecodeTrack->setTitle( track.title );
-                    timecodeTrack->setAlbum( track.album );
-                    timecodeTrack->setArtist( track.creator );
-                    timecodeTrack->endMetaDataUpdate();
-                }
-            }
-
-            m_tracks << trackPtr;
-        }
-
-
-        // why do we need this? sqlplaylist is not doing this
-        // we don't want (probably) unplayable tracks
-        // and it causes problems for me (DanielW) as long
-        // amarok not respects Track::isPlayable()
-        /*else {
-
-            MetaProxy::Track *proxyTrack = new MetaProxy::Track( track.location );
-            {
-                //Fill in values from xspf..
-                QVariantMap map;
-                map.insert( Meta::Field::TITLE, track.title );
-                map.insert( Meta::Field::ALBUM, track.album );
-                map.insert( Meta::Field::ARTIST, track.creator );
-                map.insert( Meta::Field::LENGTH, track.duration );
-                map.insert( Meta::Field::TRACKNUMBER, track.trackNum );
-                map.insert( Meta::Field::URL, track.location );
-                Meta::Field::updateTrack( proxyTrack, map );
-            }
-            m_tracks << Meta::TrackPtr( proxyTrack );
-    //         m_tracks << CollectionManager::instance()->trackForUrl( track.location );
-        }*/
-
-    }
-
-    m_tracksLoaded = true;
-    return m_tracks;
-}
-
-void
-XSPFPlaylist::addTrack( Meta::TrackPtr track, int position )
-{
-    TrackList trackList = tracks();
-    int trackPos = position < 0 ? trackList.count() : position;
-    if( trackPos > trackList.count() )
-        trackPos = trackList.count();
-    trackList.insert( trackPos, track );
-    setTrackList( trackList );
-    //also add to cache
-    m_tracks.insert( trackPos, track );
-    //set in case no track was in the playlist before
-    m_tracksLoaded = true;
-}
-
-void
-XSPFPlaylist::removeTrack( int position )
-{
-    TrackList trackList = tracks();
-    if( position < 0  || position > trackList.count() )
-        return;
-
-    trackList.removeAt( position );
-    setTrackList( trackList );
-    //also remove from cache
-    m_tracks.removeAt( position );
-}
-
-QString
-XSPFPlaylist::title() const
-{
-    return documentElement().namedItem( "title" ).firstChild().nodeValue();
-}
-
-QString
-XSPFPlaylist::creator() const
-{
-    return documentElement().namedItem( "creator" ).firstChild().nodeValue();
-}
-
-QString
-XSPFPlaylist::annotation() const
-{
-    return documentElement().namedItem( "annotation" ).firstChild().nodeValue();
-}
-
-KUrl
-XSPFPlaylist::info() const
-{
-    return KUrl( documentElement().namedItem( "info" ).firstChild().nodeValue() );
-}
-
-KUrl
-XSPFPlaylist::location() const
-{
-    return KUrl( documentElement().namedItem( "location" ).firstChild().nodeValue() );
-}
-
-QString
-XSPFPlaylist::identifier() const
-{
-    return documentElement().namedItem( "identifier" ).firstChild().nodeValue();
-}
-
-KUrl
-XSPFPlaylist::image() const
-{
-    return KUrl( documentElement().namedItem( "image" ).firstChild().nodeValue() );
-}
-
-QDateTime
-XSPFPlaylist::date() const
-{
-    return QDateTime::fromString( documentElement().namedItem( "date" ).firstChild().nodeValue(), Qt::ISODate );
-}
-
-KUrl
-XSPFPlaylist::license() const
-{
-    return KUrl( documentElement().namedItem( "license" ).firstChild().nodeValue() );
-}
-
-KUrl::List
-XSPFPlaylist::attribution() const
-{
-    QDomNode node = documentElement().namedItem( "attribution" );
-    KUrl::List list;
-
-    while ( !node.isNull() )
-    {
-        if ( !node.namedItem( "location" ).firstChild().nodeValue().isNull() )
-            list.append( node.namedItem( "location" ).firstChild().nodeValue() );
-        else if ( !node.namedItem( "identifier" ).firstChild().nodeValue().isNull() )
-            list.append( node.namedItem( "identifier" ).firstChild().nodeValue() );
-
-        node = node.nextSibling();
-    }
-
-    return list;
-}
-
-KUrl
-XSPFPlaylist::link() const
-{
-    return KUrl( documentElement().namedItem( "link" ).firstChild().nodeValue() );
-}
-
-void
-XSPFPlaylist::setTitle( const QString &title )
-{
-    QDomNode titleNode = documentElement().namedItem( "title" );
-    if( titleNode.isNull() || !titleNode.hasChildNodes() )
-    {
-        QDomNode node = createElement( "title" );
-        QDomNode subNode = createTextNode( title );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-    {
-        documentElement().namedItem( "title" ).replaceChild( createTextNode( title ),
-                                    documentElement().namedItem( "title" ).firstChild()
-                                );
-    }
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setCreator( const QString &creator )
-{
-    if ( documentElement().namedItem( "creator" ).isNull() )
-    {
-        QDomNode node = createElement( "creator" );
-        QDomNode subNode = createTextNode( creator );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "creator" ).replaceChild( createTextNode( creator ), documentElement().namedItem( "creator" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setAnnotation( const QString &annotation )
-{
-    if ( documentElement().namedItem( "annotation" ).isNull() )
-    {
-        QDomNode node = createElement( "annotation" );
-        QDomNode subNode = createTextNode( annotation );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "annotation" ).replaceChild( createTextNode( annotation ), documentElement().namedItem( "annotation" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setInfo( const KUrl &info )
-{
-    if ( documentElement().namedItem( "info" ).isNull() )
-    {
-        QDomNode node = createElement( "info" );
-        QDomNode subNode = createTextNode( info.url() );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "info" ).replaceChild( createTextNode( info.url() ), documentElement().namedItem( "info" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setLocation( const KUrl &location )
-{
-    if ( documentElement().namedItem( "location" ).isNull() )
-    {
-        QDomNode node = createElement( "location" );
-        QDomNode subNode = createTextNode( location.url() );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "location" ).replaceChild( createTextNode( location.url() ), documentElement().namedItem( "location" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setIdentifier( const QString &identifier )
-{
-    if ( documentElement().namedItem( "identifier" ).isNull() )
-    {
-        QDomNode node = createElement( "identifier" );
-        QDomNode subNode = createTextNode( identifier );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "identifier" ).replaceChild( createTextNode( identifier ), documentElement().namedItem( "identifier" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setImage( const KUrl &image )
-{
-    if ( documentElement().namedItem( "image" ).isNull() )
-    {
-        QDomNode node = createElement( "image" );
-        QDomNode subNode = createTextNode( image.url() );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "image" ).replaceChild( createTextNode( image.url() ), documentElement().namedItem( "image" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setDate( const QDateTime &date )
-{
-    /* date needs timezone info to be compliant with the standard
-    (ex. 2005-01-08T17:10:47-05:00 ) */
-
-    if ( documentElement().namedItem( "date" ).isNull() )
-    {
-        QDomNode node = createElement( "date" );
-        QDomNode subNode = createTextNode( date.toString( "yyyy-MM-ddThh:mm:ss" ) );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "date" ).replaceChild( createTextNode( date.toString( "yyyy-MM-ddThh:mm:ss" ) ), documentElement().namedItem( "date" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setLicense( const KUrl &license )
-{
-    if ( documentElement().namedItem( "license" ).isNull() )
-    {
-        QDomNode node = createElement( "license" );
-        QDomNode subNode = createTextNode( license.url() );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "license" ).replaceChild( createTextNode( license.url() ), documentElement().namedItem( "license" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setAttribution( const KUrl &attribution, bool append )
-{
-    if ( documentElement().namedItem( "attribution" ).isNull() )
-        documentElement().insertBefore( createElement( "attribution" ), documentElement().namedItem( "trackList" ) );
-
-    if ( append )
-    {
-        QDomNode subNode = createElement( "location" );
-        QDomNode subSubNode = createTextNode( attribution.url() );
-        subNode.appendChild( subSubNode );
-        documentElement().namedItem( "attribution" ).insertBefore( subNode, documentElement().namedItem( "attribution" ).firstChild() );
-    }
-    else
-    {
-        QDomNode node = createElement( "attribution" );
-        QDomNode subNode = createElement( "location" );
-        QDomNode subSubNode = createTextNode( attribution.url() );
-        subNode.appendChild( subSubNode );
-        node.appendChild( subNode );
-        documentElement().replaceChild( node, documentElement().namedItem( "attribution" ) );
-    }
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-void
-XSPFPlaylist::setLink( const KUrl &link )
-{
-    if ( documentElement().namedItem( "link" ).isNull() )
-    {
-        QDomNode node = createElement( "link" );
-        QDomNode subNode = createTextNode( link.url() );
-        node.appendChild( subNode );
-        documentElement().insertBefore( node, documentElement().namedItem( "trackList" ) );
-    }
-    else
-        documentElement().namedItem( "link" ).replaceChild( createTextNode( link.url() ), documentElement().namedItem( "link" ).firstChild() );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-XSPFTrackList
-XSPFPlaylist::trackList()
-{
-    DEBUG_BLOCK
-
-    XSPFTrackList list;
-
-    QDomNode trackList = documentElement().namedItem( "trackList" );
-    QDomNode subNode = trackList.firstChild();
-    QDomNode subSubNode;
-
-    while ( !subNode.isNull() )
-    {
-        XSPFTrack track;
-        subSubNode = subNode.firstChild();
-        if ( subNode.nodeName() == "track" )
-        {
-            while ( !subSubNode.isNull() )
-            {
-                if ( subSubNode.nodeName() == "location" )
-                    track.location = subSubNode.firstChild().nodeValue();
-                else if ( subSubNode.nodeName() == "title" )
-                    track.title = subSubNode.firstChild().nodeValue();
-                else if ( subSubNode.nodeName() == "creator" )
-                    track.creator = subSubNode.firstChild().nodeValue();
-                else if ( subSubNode.nodeName() == "duration" )
-                    track.duration = subSubNode.firstChild().nodeValue().toInt();
-                else if ( subSubNode.nodeName() == "annotation" )
-                    track.annotation = subSubNode.firstChild().nodeValue();
-                else if ( subSubNode.nodeName() == "album" )
-                    track.album = subSubNode.firstChild().nodeValue();
-                else if ( subSubNode.nodeName() == "trackNum" )
-                    track.trackNum = (uint)subSubNode.firstChild().nodeValue().toInt();
-                else if ( subSubNode.nodeName() == "identifier" )
-                    track.identifier = subSubNode.firstChild().nodeValue();
-                else if ( subSubNode.nodeName() == "info" )
-                    track.info = subSubNode.firstChild().nodeValue();
-                else if ( subSubNode.nodeName() == "image" )
-                    track.image = subSubNode.firstChild().nodeValue();
-                else if ( subSubNode.nodeName() == "link" )
-                    track.link = subSubNode.firstChild().nodeValue();
-
-                subSubNode = subSubNode.nextSibling();
-            }
-        }
-        list.append( track );
-        subNode = subNode.nextSibling();
-    }
-
-    debug() << "returning " << list.size() << "tracks";
-    return list;
-}
-
-
-//documentation of attributes from http://www.xspf.org/xspf-v1.html
-void
-XSPFPlaylist::setTrackList( Meta::TrackList trackList, bool append )
-{
-    DEBUG_BLOCK
-
-    if ( documentElement().namedItem( "trackList" ).isNull() )
-        documentElement().appendChild( createElement( "trackList" ) );
-
-    QDomNode node = createElement( "trackList" );
-    XSPFTrackList::iterator it;
-
-    Meta::TrackPtr track;
-    foreach( track, trackList ) // krazy:exclude=foreach
-    {
-        QDomNode subNode = createElement( "track" );
-
-        //URI of resource to be rendered.
-        QDomNode location = createElement( "location" );
-
-        //Human-readable name of the track that authored the resource
-        QDomNode title = createElement( "title" );
-
-        //Human-readable name of the entity that authored the resource.
-        QDomNode creator = createElement( "creator" );
-
-        //A human-readable comment on the track.
-        QDomNode annotation = createElement( "annotation" );
-
-        //Human-readable name of the collection from which the resource comes
-        QDomNode album = createElement( "album" );
-
-        //Integer > 0 giving the ordinal position of the media in the album.
-        QDomNode trackNum = createElement( "trackNum" );
-
-        //The time to render a resource, in milliseconds. It MUST be a nonNegativeInteger.
-        QDomNode duration = createElement( "duration" );
-
-        //location-independent name, such as a MusicBrainz identifier. MUST be a legal URI.
-        QDomNode identifier = createElement( "identifier" );
-
-        //info - URI of a place where this resource can be bought or more info can be found.
-        //QDomNode info = createElement( "info" );
-
-        //image - URI of an image to display for the duration of the track.
-        //QDomNode image = createElement( "image" );
-
-        //link - element allows XSPF to be extended without the use of XML namespaces.
-        //QDomNode link = createElement( "link" );
-
-        //QDomNode meta
-        //QDomNode extension
-
-        #define APPENDNODE( X, Y ) \
-        { \
-            X.appendChild( createTextNode( Y ) );    \
-            subNode.appendChild( X ); \
-        }
-
-        if ( !track->playableUrl().url().isEmpty() )
-            APPENDNODE( location, track->playableUrl().url() )
-        else
-            APPENDNODE( location, track->uidUrl() )
-
-        APPENDNODE( identifier, track->uidUrl() )
-
-        Meta::StreamInfoCapability *streamInfo = track->create<Meta::StreamInfoCapability>();
-        if( streamInfo ) // We have a stream, use it's metadata instead of the tracks.
-        {
-            if( !streamInfo->streamName().isEmpty() )
-                APPENDNODE( title, streamInfo->streamName() )
-            if( !streamInfo->streamSource().isEmpty() )
-                APPENDNODE( creator, streamInfo->streamSource() )
-
-            delete streamInfo;
-        }
-        else
-        {
-            if ( !track->name().isEmpty() )
-                APPENDNODE(title, track->name() )
-            if ( track->artist() && !track->artist()->name().isEmpty() )
-                APPENDNODE(creator, track->artist()->name() );
-        }
-        if ( !track->comment().isEmpty() )
-            APPENDNODE(annotation, track->comment() );
-        if ( track->album() && !track->album()->name().isEmpty() )
-            APPENDNODE( album, track->album()->name() );
-        if ( track->trackNumber() > 0 )
-            APPENDNODE( trackNum, QString::number( track->trackNumber() ) );
-        if ( track->length() > 0 )
-            APPENDNODE( duration, QString::number( track->length() ) );
-        node.appendChild( subNode );
-    }
-    #undef APPENDNODE
-
-    if ( append )
-    {
-        while ( !node.isNull() )
-        {
-            documentElement().namedItem( "trackList" ).appendChild( node.firstChild() );
-            node = node.nextSibling();
-        }
-    }
-    else
-        documentElement().replaceChild( node, documentElement().namedItem( "trackList" ) );
-
-    //write changes to file directly if we know where.
-    if( !m_url.isEmpty() )
-        save( m_url, false );
-}
-
-bool
-XSPFPlaylist::hasCapabilityInterface( Capability::Type type ) const
-{
-    switch( type )
-    {
-        case Capability::EditablePlaylist: return true; break;
-        default: return false; break;
-    }
-}
-
-Capability*
-XSPFPlaylist::createCapabilityInterface( Capability::Type type )
-{
-    switch( type )
-    {
-        case Capability::EditablePlaylist: return static_cast<EditablePlaylistCapability *>(this);
-        default: return 0;
-    }
-}
-
-bool
-XSPFPlaylist::isWritable()
-{
-    if( m_url.isEmpty() )
-        return false;
-
-    return QFileInfo( m_url.path() ).isWritable();
-}
-
-void
-XSPFPlaylist::setName( const QString &name )
-{
-    DEBUG_BLOCK
-
-    //can't save to a new file if we don't know where.
-    if( !m_url.isEmpty() && !name.isEmpty() )
-    {
-        if( QFileInfo( m_url.toLocalFile() ).exists() )
-        {
-            debug() << "Deleting old playlist file:" << m_url.toLocalFile();
-            QFile::remove( m_url.toLocalFile() );
-        }
-        m_url.setFileName( name + ( name.endsWith( ".xspf", Qt::CaseInsensitive ) ? "" : ".xspf" ) );
-        debug() << "new url:" << m_url;
-    }
-    //setTitle will save if there is a url.
-    setTitle( name );
-}
-
-} //namespace Meta
diff --git a/src/meta/playlists/impl/file/xspf/XSPFPlaylist.h b/src/meta/playlists/impl/file/xspf/XSPFPlaylist.h
deleted file mode 100644
index 0946900..0000000
--- a/src/meta/playlists/impl/file/xspf/XSPFPlaylist.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Bart Cerneels <bart.cerneels at kde.org>                             *
- * Copyright (c) 2006 Mattias Fliesberg <mattias.fliesberg at gmail.com>                   *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef XSPFPLAYLIST_H
-#define XSPFPLAYLIST_H
-
-#include "playlists/impl/file/PlaylistFile.h"
-#include "capabilities/EditablePlaylistCapability.h"
-
-#include <QDomDocument>
-#include <QTextStream>
-
-class QTextStream;
-class KUrl;
-
-namespace Meta
-{
-class XSPFPlaylist;
-
-typedef KSharedPtr<XSPFPlaylist> XSPFPlaylistPtr;
-typedef QList<XSPFPlaylistPtr> XSPFPlaylistList;
-
-/* convenience struct for internal use */
-typedef struct {
-    KUrl location;
-    QString identifier;
-    QString title;
-    QString creator;
-    QString annotation;
-    KUrl info;
-    KUrl image;
-    QString album;
-    uint trackNum;
-    uint duration;
-    KUrl link;
-} XSPFTrack;
-
-typedef QList<XSPFTrack> XSPFTrackList;
-
-/**
-	@author Bart Cerneels <bart.cerneels at kde.org>
-*/
-class AMAROK_EXPORT XSPFPlaylist : public PlaylistFile, public QDomDocument,
-            public EditablePlaylistCapability
-{
-public:
-    XSPFPlaylist();
-
-    /**
-    * Creates a new XSPFPlaylist and starts loading the xspf file of the url.
-    * @param url The Url of the xspf file to load.
-    * @param autoAppend Should this playlist automatically append itself to the playlist when loaded (useful when loading a remote url as it
-    * allows the caller to do it in a "one shot" way and not have to worry about waiting untill download and parsing is completed.
-    */
-    explicit XSPFPlaylist( const KUrl &url, bool autoAppend = false );
-    XSPFPlaylist( Meta::TrackList list );
-
-    ~XSPFPlaylist();
-
-    virtual QString name() const { return title(); }
-    virtual QString prettyName() const { return name(); }
-    virtual QString description() const;
-
-    /** returns all tracks in this playlist */
-    TrackList tracks();
-    virtual void addTrack( Meta::TrackPtr track, int position = -1 );
-    virtual void removeTrack( int position );
-
-    /* convenience functions */
-    QString title() const;
-    QString creator() const;
-    QString annotation() const;
-    KUrl info() const;
-    KUrl location() const;
-    QString identifier() const;
-    KUrl image() const;
-    QDateTime date() const;
-    KUrl license() const;
-    KUrl::List attribution() const ;
-    KUrl link() const;
-
-    /* EditablePlaylistCapability virtual functions */
-    void setTitle( const QString &title );
-    void setCreator( const QString &creator );
-    void setAnnotation( const QString &annotation );
-    void setInfo( const KUrl &info );
-    void setLocation( const KUrl &location );
-    void setIdentifier( const QString &identifier );
-    void setImage( const KUrl &image );
-    void setDate( const QDateTime &date );
-    void setLicense( const KUrl &license );
-    void setAttribution( const KUrl &attribution, bool append = true );
-    void setLink( const KUrl &link );
-    void setTrackList( TrackList trackList, bool append = false );
-
-    //TODO: implement these
-    void beginMetaDataUpdate() {}
-    void endMetaDataUpdate() {}
-    void abortMetaDataUpdate() {}
-
-    bool isEditable() const { return true; }
-
-    /* Meta::Playlist virtual functions */
-    bool hasCapabilityInterface( Capability::Type type ) const;
-
-    KUrl retrievableUrl() { return m_url; }
-
-    Capability* createCapabilityInterface( Capability::Type type );
-
-    /* PlaylistFile methods */
-    bool isWritable();
-    /** Changes both the filename and the title in XML */
-    void setName( const QString &name );
-    bool load( QTextStream &stream ) { return loadXSPF( stream ); }
-    /** save to location, relative is unused since XSPF mandates absolute paths */
-    bool save( const KUrl &location, bool relative );
-
-private:
-    XSPFTrackList trackList();
-    bool loadXSPF( QTextStream& );
-    bool m_tracksLoaded;
-    //cache for the tracklist since a tracks() is a called *a lot*.
-    TrackList m_tracks;
-
-    KUrl m_url;
-    bool m_autoAppendAfterLoad;
-};
-
-}
-
-Q_DECLARE_METATYPE( Meta::XSPFPlaylistPtr )
-Q_DECLARE_METATYPE( Meta::XSPFPlaylistList )
-
-#endif
diff --git a/src/meta/playlists/providers/user/UserPlaylistProvider.cpp b/src/meta/playlists/providers/user/UserPlaylistProvider.cpp
deleted file mode 100644
index 7bf1bea..0000000
--- a/src/meta/playlists/providers/user/UserPlaylistProvider.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Alejandro Wainzinger <aikawarazuni at gmail.com>                     *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "UserPlaylistProvider.h"
-
-
-UserPlaylistProvider::~UserPlaylistProvider()
-{
-}
-
-int
-UserPlaylistProvider::category() const
-{
-     return Meta::UserPlaylist;
-}
-
-bool
-UserPlaylistProvider::supportsEmptyGroups()
-{
-    return false;
-}
-
-QList<QAction *>
-UserPlaylistProvider::playlistActions( Meta::PlaylistPtr playlist )
-{
-    Q_UNUSED( playlist );
-    return QList<QAction *>();
-}
-
-QList<QAction *>
-UserPlaylistProvider::trackActions( Meta::PlaylistPtr playlist, int trackIndex )
-{
-    Q_UNUSED( playlist );
-    Q_UNUSED( trackIndex );
-    return QList<QAction *>();
-}
-
-#include "UserPlaylistProvider.moc"
diff --git a/src/meta/playlists/providers/user/UserPlaylistProvider.h b/src/meta/playlists/providers/user/UserPlaylistProvider.h
deleted file mode 100644
index 92210a8..0000000
--- a/src/meta/playlists/providers/user/UserPlaylistProvider.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- * Copyright (c) 2008 Bart Cerneels <bart.cerneels at kde.org>                             *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef USERPLAYLISTPROVIDER_H
-#define USERPLAYLISTPROVIDER_H
-
-#include "playlists/Playlist.h"
-#include "playlists/PlaylistProvider.h"
-
-class QAction;
-
-/**
-    @author Bart Cerneels <bart.cerneels at kde.org>
-*/
-class AMAROK_EXPORT UserPlaylistProvider : public PlaylistProvider
-{
-    Q_OBJECT
-    public:
-        virtual ~UserPlaylistProvider();
-
-        /* PlaylistProvider functions */
-        virtual int category() const;
-
-        /* UserPlaylistProvider functions */
-        /**
-            @returns true if this provider supports - and is currently able to - save playlists
-        **/
-        virtual bool canSavePlaylists() = 0;
-
-        /**
-            Save a list of tracks as a playlist in the database.
-            @returns a non-null Meta::PlaylistPtr if successful
-        **/
-        virtual Meta::PlaylistPtr save( const Meta::TrackList &tracks ) = 0;
-
-        virtual Meta::PlaylistPtr save( const Meta::TrackList &tracks, const QString& name ) = 0;
-
-        virtual bool supportsEmptyGroups();
-
-        virtual QList<QAction *> playlistActions( Meta::PlaylistPtr playlist );
-        virtual QList<QAction *> trackActions( Meta::PlaylistPtr playlist,
-                                                  int trackIndex );
-
-        // UserPlaylistProvider-specific
-
-        virtual bool isWritable() { return false; }
-        virtual void rename( Meta::PlaylistPtr playlist, const QString &newName ) {Q_UNUSED( playlist ) Q_UNUSED(newName)}
-        virtual void deletePlaylists( Meta::PlaylistList playlistlist ) { Q_UNUSED( playlistlist ) }
-
-    signals:
-            void updated();
-};
-
-#endif
diff --git a/src/meta/statistics/StatisticsProvider.cpp b/src/meta/statistics/StatisticsProvider.cpp
deleted file mode 100644
index 86e98f0..0000000
--- a/src/meta/statistics/StatisticsProvider.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "StatisticsProvider.h"
-
-#include "Amarok.h"
-#include "Debug.h"
-
-Meta::StatisticsProvider::StatisticsProvider()
-        : m_score( 0.0 )
-        , m_rating( 0 )
-        , m_playCount( 0 )
-{
-}
-
-Meta::StatisticsProvider::~StatisticsProvider()
-{
-}
-
-void
-Meta::StatisticsProvider::played( double playedFraction )
-{
-    DEBUG_BLOCK
-
-    debug() << "called with playedFraction = " << playedFraction;
-    m_lastPlayed = QDateTime::currentDateTime();
-    if( !m_firstPlayed.isValid() )
-    {
-        m_firstPlayed = QDateTime::currentDateTime();
-    }
-    m_playCount++;
-    m_score = Amarok::computeScore( m_score, m_playCount, playedFraction );
-    save();
-}
-
-QDateTime
-Meta::StatisticsProvider::firstPlayed() const
-{
-    return m_firstPlayed;
-}
-
-void
-Meta::StatisticsProvider::setFirstPlayed( const QDateTime &dt )
-{
-    m_firstPlayed = dt;
-    save();
-}
-
-QDateTime
-Meta::StatisticsProvider::lastPlayed() const
-{
-    return m_lastPlayed;
-}
-
-void
-Meta::StatisticsProvider::setLastPlayed( const QDateTime &dt )
-{
-    m_lastPlayed = dt;
-    save();
-}
-
-int
-Meta::StatisticsProvider::playCount() const
-{
-    return m_playCount;
-}
-
-void
-Meta::StatisticsProvider::setPlayCount( int playCount )
-{
-    m_playCount = playCount;
-    save();
-}
-
-int
-Meta::StatisticsProvider::rating() const
-{
-    return m_rating;
-}
-
-double
-Meta::StatisticsProvider::score() const
-{
-    return m_score;
-}
-
-void
-Meta::StatisticsProvider::setRating( int newRating )
-{
-    m_rating = newRating;
-    save();
-}
-
-void
-Meta::StatisticsProvider::setScore( double newScore )
-{
-    m_score = newScore;
-    save();
-}
diff --git a/src/meta/statistics/StatisticsProvider.h b/src/meta/statistics/StatisticsProvider.h
deleted file mode 100644
index bb1fce8..0000000
--- a/src/meta/statistics/StatisticsProvider.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef META_STATISTICSPROVIDER_H
-#define META_STATISTICSPROVIDER_H
-
-#include "amarok_export.h"
-
-#include <QDateTime>
-
-namespace Meta
-{
-    class AMAROK_EXPORT StatisticsProvider
-    {                
-        public:
-            StatisticsProvider();
-            virtual ~StatisticsProvider();
-
-             /** Returns the score of this track */
-            double score() const;
-            void setScore( double newScore );
-            /** Returns the rating of this track */
-            int rating() const;
-            void setRating( int newRating );
-            /** Returns the time the song was last played, or 0 if it has not been played yet */
-            QDateTime lastPlayed() const;
-            void setLastPlayed( const QDateTime &dt );
-            /** Returns the time the song was first played, or 0 if it has not been played yet */
-            QDateTime firstPlayed() const;
-            void setFirstPlayed( const QDateTime &dt );
-
-            /** Returns the number of times the track was played (what about unknown?)*/
-            int playCount() const;
-            void setPlayCount( int playCount );
-            /** indicate to the statistics provider that a song was played */
-            void played( double playedFraction );
-
-        protected:
-            virtual void save() = 0;
-
-            QDateTime m_lastPlayed;
-            QDateTime m_firstPlayed;
-            double m_score;
-            int m_rating;
-            int m_playCount;
-    };
-}
-
-#endif
diff --git a/src/meta/statistics/providers/tag/TagStatisticsProvider.cpp b/src/meta/statistics/providers/tag/TagStatisticsProvider.cpp
deleted file mode 100644
index 3e6749a..0000000
--- a/src/meta/statistics/providers/tag/TagStatisticsProvider.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "TagStatisticsProvider.h"
-
-#include "collection/CollectionManager.h"
-#include "collection/SqlStorage.h"
-
-TagStatisticsProvider::TagStatisticsProvider( const QString &name, const QString &artist, const QString &album )
-        : StatisticsProvider()
-        , m_name( name )
-        , m_artist( artist )
-        , m_album( album )
-{
-    SqlStorage *sql = CollectionManager::instance()->sqlStorage();
-
-    const QString query = "SELECT firstPlayed, lastPlayed, score, rating, playcount FROM "
-                          "statistics_tag WHERE name = '%1' AND artist = '%2' AND album = '%3'";
-    QStringList result = sql->query( query.arg( sql->escape( name ),
-                                                sql->escape( artist ),
-                                                sql->escape( album ) ) );
-    if( !result.isEmpty() )
-    {
-        m_firstPlayed = QDateTime::fromString( result.value( 0 ), "yy-MM-dd hh:mm:ss" );
-        m_lastPlayed = QDateTime::fromString( result.value( 1 ), "yy-MM-dd hh:mm:ss" );
-        m_score = result.value( 2 ).toDouble();
-        m_rating = result.value( 3 ).toInt();
-        m_playCount = result.value( 4 ).toInt();
-    }
-}
-
-void
-TagStatisticsProvider::save()
-{
-    SqlStorage *sql = CollectionManager::instance()->sqlStorage();
-
-    const QString check = "SELECT COUNT(*) FROM statistics_tag WHERE name = '%1' "
-                          "AND artist = '%2' AND album = '%3'";
-    QStringList rsCheck = sql->query( check.arg( sql->escape( m_name ),
-                                                 sql->escape( m_artist ),
-                                                 sql->escape( m_album ) ) );
-    if( !rsCheck.isEmpty() )
-    {
-        QString sqlString;
-        if( rsCheck.first().toInt() )
-        {
-            sqlString = "UPDATE statistics_tag SET firstPlayed = '%1',lastPlayed = '%2',"
-                        "score = %3,rating = %4,playcount=%5 WHERE name = '%6' "
-                        "AND artist = '%7' AND album = '%8'";
-        }
-        else
-        {
-            sqlString = "INSERT INTO statistics_tag(firstPlayed,lastPlayed,score,"
-                        "rating,playcount,name,artist,album) "
-                        "VALUE ('%1','%2',%3,%4,%5,'%6','%7','%8')";
-        }
-        sqlString = sqlString.arg( m_firstPlayed.toString( "yy-MM-dd hh:mm:ss" ),
-                                   m_lastPlayed.toString( "yy-MM-dd hh:mm:ss" ),
-                                   QString::number( m_score ),
-                                   QString::number( m_rating ),
-                                   QString::number( m_playCount ),
-                                   sql->escape( m_name ),
-                                   sql->escape( m_artist ),
-                                   sql->escape( m_album ) );
-        sql->query( sqlString );
-    }
-}
-
diff --git a/src/meta/statistics/providers/tag/TagStatisticsProvider.h b/src/meta/statistics/providers/tag/TagStatisticsProvider.h
deleted file mode 100644
index 487294a..0000000
--- a/src/meta/statistics/providers/tag/TagStatisticsProvider.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef TAGSTATISTICSPROVIDER_H
-#define TAGSTATISTICSPROVIDER_H
-
-#include "statistics/StatisticsProvider.h"
-
-#include "Amarok.h"
-
-#include <QString>
-
-class AMAROK_EXPORT TagStatisticsProvider : public Meta::StatisticsProvider
-{
-public:
-    TagStatisticsProvider( const QString &name, const QString &artist, const QString &album );
-
-protected:
-    virtual void save();
-
-private:
-    QString m_name;
-    QString m_artist;
-    QString m_album;
-};
-
-#endif // PERMANENTURLSTATISTICSPROVIDER_H
diff --git a/src/meta/statistics/providers/url/PermanentUrlStatisticsProvider.cpp b/src/meta/statistics/providers/url/PermanentUrlStatisticsProvider.cpp
deleted file mode 100644
index 99b3c3f..0000000
--- a/src/meta/statistics/providers/url/PermanentUrlStatisticsProvider.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "PermanentUrlStatisticsProvider.h"
-
-#include "collection/CollectionManager.h"
-#include "collection/SqlStorage.h"
-
-#include "Debug.h"
-
-PermanentUrlStatisticsProvider::PermanentUrlStatisticsProvider( const QString &permanentUrl )
-        : StatisticsProvider()
-        , m_permanentUrl( permanentUrl )
-{
-    SqlStorage *sql = CollectionManager::instance()->sqlStorage();
-    if( !sql )
-    {
-        debug() << "Could not get SqlStorage, aborting" << endl;
-        return;
-    }
-
-
-    const QString query = "SELECT firstplayed, lastplayed, score, rating, playcount FROM "
-                          "statistics_permanent WHERE url = '%1'";
-    QStringList result = sql->query( query.arg( sql->escape( permanentUrl ) ) );
-    if( !result.isEmpty() )
-    {
-        m_firstPlayed = QDateTime::fromString( result.value( 0 ), "yy-MM-dd hh:mm:ss" );
-        m_lastPlayed = QDateTime::fromString( result.value( 1 ), "yy-MM-dd hh:mm:ss" );
-        m_score = result.value( 2 ).toDouble();
-        m_rating = result.value( 3 ).toInt();
-        m_playCount = result.value( 4 ).toInt();
-    }
-}
-
-void
-PermanentUrlStatisticsProvider::save()
-{
-    SqlStorage *sql = CollectionManager::instance()->sqlStorage();
-    if( !sql )
-    {
-        debug() << "Could not get SqlStorage, aborting" << endl;
-        return;
-    }
-
-    const QString check = "SELECT COUNT(*) FROM statistics_permanent WHERE url = '%1'";
-    QStringList rsCheck = sql->query( check.arg( sql->escape( m_permanentUrl ) ) );
-    if( !rsCheck.isEmpty() )
-    {
-        QString sqlString;
-        if( rsCheck.first().toInt() )
-        {
-            sqlString = "UPDATE statistics_permanent SET firstplayed = '%1',lastplayed = '%2',"
-                        "score = %3,rating = %4,playcount=%5 WHERE url = '%6'";
-        }
-        else
-        {
-            sqlString = "INSERT INTO statistics_permanent(firstplayed,lastplayed,score,"
-                        "rating,playcount,url) VALUE ('%1','%2',%3,%4,%5,'%6')";
-        }
-        sqlString = sqlString.arg( m_firstPlayed.toString( "yy-MM-dd hh:mm:ss" ),
-                                   m_lastPlayed.toString( "yy-MM-dd hh:mm:ss" ),
-                                   QString::number( m_score ),
-                                   QString::number( m_rating ),
-                                   QString::number( m_playCount ),
-                                   sql->escape( m_permanentUrl ) );
-        sql->query( sqlString );
-    }
-}
-
diff --git a/src/meta/statistics/providers/url/PermanentUrlStatisticsProvider.h b/src/meta/statistics/providers/url/PermanentUrlStatisticsProvider.h
deleted file mode 100644
index 592e635..0000000
--- a/src/meta/statistics/providers/url/PermanentUrlStatisticsProvider.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2009 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef PERMANENTURLSTATISTICSPROVIDER_H
-#define PERMANENTURLSTATISTICSPROVIDER_H
-
-#include "statistics/StatisticsProvider.h"
-
-#include "amarok_export.h"
-
-#include <QString>
-
-class AMAROK_EXPORT PermanentUrlStatisticsProvider : public Meta::StatisticsProvider
-{
-public:
-    PermanentUrlStatisticsProvider( const QString &permanentUrl );
-
-protected:
-    virtual void save();
-
-private:
-    QString m_permanentUrl;
-};
-
-#endif // PERMANENTURLSTATISTICSPROVIDER_H
diff --git a/src/meta/support/MetaConstants.h b/src/meta/support/MetaConstants.h
deleted file mode 100644
index b17a76e..0000000
--- a/src/meta/support/MetaConstants.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_METACONSTANTS_H
-#define AMAROK_METACONSTANTS_H
-
-#include <QtGlobal>
-
-namespace Meta
-{
-    //track metadata
-    static const qint64 valUrl          = 1LL << 0;
-    static const qint64 valTitle        = 1LL << 1;
-    static const qint64 valArtist       = 1LL << 2;
-    static const qint64 valAlbum        = 1LL << 3;
-    static const qint64 valGenre        = 1LL << 4;
-    static const qint64 valComposer     = 1LL << 5;
-    static const qint64 valYear         = 1LL << 6;
-    static const qint64 valComment      = 1LL << 7;
-    static const qint64 valTrackNr      = 1LL << 8;
-    static const qint64 valDiscNr       = 1LL << 9;
-    static const qint64 valBpm          = 1LL << 10;
-    //track data
-    static const qint64 valLength       = 1LL << 11;
-    static const qint64 valBitrate      = 1LL << 12;
-    static const qint64 valSamplerate   = 1LL << 13;
-    static const qint64 valFilesize     = 1LL << 14;
-    static const qint64 valFormat       = 1LL << 15;
-    static const qint64 valCreateDate   = 1LL << 16;
-    //statistics
-    static const qint64 valScore        = 1LL << 17;
-    static const qint64 valRating       = 1LL << 18;
-    static const qint64 valFirstPlayed  = 1LL << 19;
-    static const qint64 valLastPlayed   = 1LL << 20;
-    static const qint64 valPlaycount    = 1LL << 21;
-    static const qint64 valUniqueId     = 1LL << 22;
-    //replay gain
-    static const qint64 valTrackGain    = 1LL << 23;
-    static const qint64 valTrackGainPeak= 1LL << 24;
-    static const qint64 valAlbumGain    = 1LL << 25;
-    static const qint64 valAlbumGainPeak= 1LL << 26;
-
-    static const qint64 valAlbumArtist  = 1LL << 27;
-
-    namespace Field
-    {
-        //actual string values are not final yet
-        static const QString ALBUM          = "xesam:album";
-        static const QString ARTIST         = "xesam:author";
-        static const QString BITRATE        = "xesam:audioBitrate";
-        static const QString BPM            = "xesam:audioBPM";
-        static const QString CODEC          = "xesam:audioCodec";
-        static const QString COMMENT        = "xesam:comment";
-        static const QString COMPOSER       = "xesam:composer";
-        static const QString DISCNUMBER     = "xesam:discNumber";
-        static const QString FILESIZE       = "xesam:size";
-        static const QString GENRE          = "xesam:genre";
-        static const QString LENGTH         = "xesam:mediaDuration";
-        static const QString RATING         = "xesam:userRating";
-        static const QString SAMPLERATE     = "xesam:audioSampleRate";
-        static const QString TITLE          = "xesam:title";
-        static const QString TRACKNUMBER    = "xesam:trackNumber";
-        static const QString URL            = "xesam:url";
-        static const QString YEAR           = "xesam:contentCreated";
-        static const QString ALBUMGAIN      = "xesam:albumGain";
-        static const QString ALBUMPEAKGAIN  = "xesam:albumPeakGain";
-        static const QString TRACKGAIN      = "xesam:trackGain";
-        static const QString TRACKPEAKGAIN  = "xesam:trackPeakGain";
-
-        static const QString SCORE          = "xesam:autoRating";
-        static const QString PLAYCOUNT      = "xesam:useCount";
-        static const QString FIRST_PLAYED   = "xesam:firstUsed";
-        static const QString LAST_PLAYED    = "xesam:lastUsed";
-
-        static const QString UNIQUEID       = "xesam:id";
-    }
-}
-
-#endif
diff --git a/src/meta/support/MetaUtility.cpp b/src/meta/support/MetaUtility.cpp
deleted file mode 100644
index 379e54b..0000000
--- a/src/meta/support/MetaUtility.cpp
+++ /dev/null
@@ -1,382 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "meta/support/MetaUtility.h"
-
-#include "Debug.h"
-#include "Meta.h"
-#include "capabilities/Capability.h"
-#include "capabilities/EditCapability.h"
-
-#include <QChar>
-#include <QFile>
-
-#include <klocale.h>
-#include <kio/global.h>
-
-        static const QString XESAM_ALBUM          = "http://freedesktop.org/standards/xesam/1.0/core#album";
-        static const QString XESAM_ARTIST         = "http://freedesktop.org/standards/xesam/1.0/core#artist";
-        static const QString XESAM_BITRATE        = "http://freedesktop.org/standards/xesam/1.0/core#audioBitrate";
-        static const QString XESAM_BPM            = "http://freedesktop.org/standards/xesam/1.0/core#audioBPM";
-        static const QString XESAM_CODEC          = "http://freedesktop.org/standards/xesam/1.0/core#audioCodec";
-        static const QString XESAM_COMMENT        = "http://freedesktop.org/standards/xesam/1.0/core#comment";
-        static const QString XESAM_COMPOSER       = "http://freedesktop.org/standards/xesam/1.0/core#composer";
-        static const QString XESAM_DISCNUMBER     = "http://freedesktop.org/standards/xesam/1.0/core#discNumber";
-        static const QString XESAM_FILESIZE       = "http://freedesktop.org/standards/xesam/1.0/core#size";
-        static const QString XESAM_GENRE          = "http://freedesktop.org/standards/xesam/1.0/core#genre";
-        static const QString XESAM_LENGTH         = "http://freedesktop.org/standards/xesam/1.0/core#mediaDuration";
-        static const QString XESAM_RATING         = "http://freedesktop.org/standards/xesam/1.0/core#userRating";
-        static const QString XESAM_SAMPLERATE     = "http://freedesktop.org/standards/xesam/1.0/core#audioSampleRate";
-        static const QString XESAM_TITLE          = "http://freedesktop.org/standards/xesam/1.0/core#title";
-        static const QString XESAM_TRACKNUMBER    = "http://freedesktop.org/standards/xesam/1.0/core#trackNumber";
-        static const QString XESAM_URL            = "http://freedesktop.org/standards/xesam/1.0/core#url";
-        static const QString XESAM_YEAR           = "http://freedesktop.org/standards/xesam/1.0/core#contentCreated";
-
-        static const QString XESAM_SCORE          = "http://freedesktop.org/standards/xesam/1.0/core#autoRating";
-        static const QString XESAM_PLAYCOUNT      = "http://freedesktop.org/standards/xesam/1.0/core#useCount";
-        static const QString XESAM_FIRST_PLAYED   = "http://freedesktop.org/standards/xesam/1.0/core#firstUsed";
-        static const QString XESAM_LAST_PLAYED    = "http://freedesktop.org/standards/xesam/1.0/core#lastUsed";
-
-        static const QString XESAM_ID             = "http://freedesktop.org/standards/xesam/1.0/core#id";
-        //static bool conversionMapsInitialised = false;
-
-QVariantMap
-Meta::Field::mapFromTrack( const Meta::TrackPtr track )
-{
-    //note: track does not support first_played yet
-    QVariantMap map;
-    if( !track )
-        return map;
-
-    if( track->name().isEmpty() )
-        map.insert( Meta::Field::TITLE, QVariant( track->prettyName() ) );
-    else
-        map.insert( Meta::Field::TITLE, QVariant( track->name() ) );
-    if( track->artist() && !track->artist()->name().isEmpty() )
-        map.insert( Meta::Field::ARTIST, QVariant( track->artist()->name() ) );
-    if( track->album() && !track->album()->name().isEmpty() )
-        map.insert( Meta::Field::ALBUM, QVariant( track->album()->name() ) );
-    if( track->filesize() )
-        map.insert( Meta::Field::FILESIZE, QVariant( track->filesize() ) );
-    if( track->genre() && !track->genre()->name().isEmpty() )
-        map.insert( Meta::Field::GENRE, QVariant( track->genre()->name() ) );
-    if( track->composer() && !track->composer()->name().isEmpty() )
-        map.insert( Meta::Field::COMPOSER, QVariant( track->composer()->name() ) );
-    if( track->year() && !track->year()->name().isEmpty() )
-        map.insert( Meta::Field::YEAR, QVariant( track->year()->name() ) );
-    if( !track->comment().isEmpty() )
-        map.insert( Meta::Field::COMMENT, QVariant( track->comment() ) );
-    if( track->trackNumber() )
-        map.insert( Meta::Field::TRACKNUMBER, QVariant( track->trackNumber() ) );
-    if( track->discNumber() )
-        map.insert( Meta::Field::DISCNUMBER, QVariant( track->discNumber() ) );
-    if( track->bitrate() )
-        map.insert( Meta::Field::BITRATE, QVariant( track->bitrate() ) );
-    if( track->length() )
-        map.insert( Meta::Field::LENGTH, QVariant( track->length() ) );
-    if( track->sampleRate() )
-        map.insert( Meta::Field::SAMPLERATE, QVariant( track->sampleRate() ) );
-    if( track->bpm() >= 0.0)
-        map.insert( Meta::Field::BPM, QVariant( track->bpm() ) );
-
-    map.insert( Meta::Field::UNIQUEID, QVariant( track->uidUrl() ) );
-    map.insert( Meta::Field::URL, QVariant( track->prettyUrl() ) );
-    map.insert( Meta::Field::RATING, QVariant( track->rating() ) );
-    map.insert( Meta::Field::SCORE, QVariant( track->score() ) );
-    map.insert( Meta::Field::PLAYCOUNT, QVariant( track->playCount() ) );
-    map.insert( Meta::Field::LAST_PLAYED, QVariant( track->lastPlayed() ) );
-
-    return map;
-}
-
-QVariantMap
-Meta::Field::mprisMapFromTrack( const Meta::TrackPtr track )
-{
-    QVariantMap map;
-    if( track )
-    {
-        // MANDATORY:
-        map["location"] = track->playableUrl().url();
-        // INFORMATIONAL:
-        map["title"] = track->prettyName();
-
-        if( track->artist() )
-            map["artist"] = track->artist()->name();
-
-        if( track->album() )
-            map["album"] = track->album()->name();
-
-        map["tracknumber"] = track->trackNumber();
-        map["time"] = track->length() / 1000;
-        map["mtime"] = track->length();
-
-        if( track->genre() )
-            map["genre"] = track->genre()->name();
-
-        map["comment"] = track->comment();
-        map["rating"] = track->rating()/2;  //out of 5, not 10.
-
-        if( track->year() )
-            map["year"] = track->year()->name();
-
-        if( track->album() )
-            map["arturl"] = track->album()->imageLocation().url();
-
-        //TODO: external service meta info
-
-        // TECHNICAL:
-        map["audio-bitrate"] = track->bitrate();
-        map["audio-samplerate"] = track->sampleRate();
-        //amarok has no video-bitrate
-
-        // EXTRA Amarok specific
-        const QString lyrics = track->cachedLyrics();
-        if( !lyrics.isEmpty() )
-            map["lyrics"] = lyrics;
-    }
-    return map;
-}
-
-
-void
-Meta::Field::updateTrack( Meta::TrackPtr track, const QVariantMap &metadata )
-{
-    if( !track || !track->hasCapabilityInterface( Meta::Capability::Editable ) )
-        return;
-
-    Meta::EditCapability *ec = track->create<Meta::EditCapability>();
-    if( !ec || !ec->isEditable() )
-        return;
-    ec->beginMetaDataUpdate();
-    QString title = metadata.contains( Meta::Field::TITLE ) ?
-                            metadata.value( Meta::Field::TITLE ).toString() : QString();
-    ec->setTitle( title );
-    QString comment = metadata.contains( Meta::Field::COMMENT ) ?
-                            metadata.value( Meta::Field::COMMENT ).toString() : QString();
-    ec->setComment( comment );
-    int tracknr = metadata.contains( Meta::Field::TRACKNUMBER ) ?
-                            metadata.value( Meta::Field::TRACKNUMBER ).toInt() : 0;
-    ec->setTrackNumber( tracknr );
-    int discnr = metadata.contains( Meta::Field::DISCNUMBER ) ?
-                            metadata.value( Meta::Field::DISCNUMBER ).toInt() : 0;
-    ec->setDiscNumber( discnr );
-    QString artist = metadata.contains( Meta::Field::ARTIST ) ?
-                            metadata.value( Meta::Field::ARTIST ).toString() : QString();
-    ec->setArtist( artist );
-    QString album = metadata.contains( Meta::Field::ALBUM ) ?
-                            metadata.value( Meta::Field::ALBUM ).toString() : QString();
-    ec->setAlbum( album );
-    QString genre = metadata.contains( Meta::Field::GENRE ) ?
-                            metadata.value( Meta::Field::GENRE ).toString() : QString();
-    ec->setGenre( genre );
-    QString composer = metadata.contains( Meta::Field::COMPOSER ) ?
-                            metadata.value( Meta::Field::COMPOSER ).toString() : QString();
-    ec->setComposer( composer );
-    QString year = metadata.contains( Meta::Field::YEAR ) ?
-                            metadata.value( Meta::Field::YEAR ).toString() : QString();
-    ec->setYear( year );
-
-    ec->endMetaDataUpdate();
-}
-
-QString
-Meta::Field::xesamPrettyToFullFieldName( const QString &name )
-{
-    if( name == Meta::Field::ARTIST )
-        return XESAM_ARTIST;
-    else if( name == Meta::Field::ALBUM )
-        return XESAM_ALBUM;
-    else if( name == Meta::Field::BITRATE )
-        return XESAM_BITRATE;
-    else if( name == Meta::Field::BPM )
-        return XESAM_BPM;
-    else if( name == Meta::Field::CODEC )
-        return XESAM_CODEC;
-    else if( name == Meta::Field::COMMENT )
-        return XESAM_COMMENT;
-    else if( name == Meta::Field::COMPOSER )
-        return XESAM_COMPOSER;
-    else if( name == Meta::Field::DISCNUMBER )
-        return XESAM_DISCNUMBER;
-    else if( name == Meta::Field::FILESIZE )
-        return XESAM_FILESIZE;
-    else if( name == Meta::Field::GENRE )
-        return XESAM_GENRE;
-    else if( name == Meta::Field::LENGTH )
-        return XESAM_LENGTH;
-    else if( name == Meta::Field::RATING )
-        return XESAM_RATING;
-    else if( name == Meta::Field::SAMPLERATE )
-        return XESAM_SAMPLERATE;
-    else if( name == Meta::Field::TITLE )
-        return XESAM_TITLE;
-    else if( name == Meta::Field::TRACKNUMBER )
-        return XESAM_TRACKNUMBER;
-    else if( name == Meta::Field::URL )
-        return XESAM_URL;
-    else if( name == Meta::Field::YEAR )
-        return XESAM_YEAR;
-    else if( name==Meta::Field::SCORE )
-        return XESAM_SCORE;
-    else if( name==Meta::Field::PLAYCOUNT )
-        return XESAM_PLAYCOUNT;
-    else if( name==Meta::Field::FIRST_PLAYED )
-        return XESAM_FIRST_PLAYED;
-    else if( name==Meta::Field::LAST_PLAYED )
-        return XESAM_LAST_PLAYED;
-    else if( name==Meta::Field::UNIQUEID )
-        return XESAM_ID;
-    else
-        return "xesamPrettyToFullName: unknown name " + name;
-}
-
-QString
-Meta::Field::xesamFullToPrettyFieldName( const QString &name )
-{
-    if( name == XESAM_ARTIST )
-        return Meta::Field::ARTIST;
-    else if( name == XESAM_ALBUM )
-        return Meta::Field::ALBUM;
-    else if( name == XESAM_BITRATE )
-        return Meta::Field::BITRATE;
-    else if( name == XESAM_BPM )
-        return Meta::Field::BPM;
-    else if( name == XESAM_CODEC )
-        return Meta::Field::CODEC;
-    else if( name == XESAM_COMMENT )
-        return Meta::Field::COMMENT;
-    else if( name == XESAM_COMPOSER )
-        return Meta::Field::COMPOSER;
-    else if( name == XESAM_DISCNUMBER )
-        return Meta::Field::DISCNUMBER;
-    else if( name == XESAM_FILESIZE )
-        return Meta::Field::FILESIZE;
-    else if( name == XESAM_GENRE )
-        return Meta::Field::GENRE;
-    else if( name == XESAM_LENGTH )
-        return Meta::Field::LENGTH;
-    else if( name == XESAM_RATING )
-        return Meta::Field::RATING;
-    else if( name == XESAM_SAMPLERATE )
-        return Meta::Field::SAMPLERATE;
-    else if( name == XESAM_TITLE )
-        return Meta::Field::TITLE;
-    else if( name == XESAM_TRACKNUMBER )
-        return Meta::Field::TRACKNUMBER;
-    else if( name == XESAM_URL )
-        return Meta::Field::URL;
-    else if( name == XESAM_YEAR )
-        return Meta::Field::YEAR;
-    else if( name == XESAM_SCORE )
-        return Meta::Field::SCORE;
-    else if( name == XESAM_PLAYCOUNT )
-        return Meta::Field::PLAYCOUNT;
-    else if( name == XESAM_FIRST_PLAYED )
-        return Meta::Field::FIRST_PLAYED;
-    else if( name == XESAM_LAST_PLAYED )
-        return Meta::Field::LAST_PLAYED;
-    else if( name == XESAM_ID )
-        return Meta::Field::UNIQUEID;
-    else
-        return "xesamFullToPrettyName: unknown name " + name;
-}
-
-
-QString
-Meta::msToPrettyTime( qint64 ms )
-{
-    return Meta::secToPrettyTime( ms / 1000 );
-}
-
-QString
-Meta::secToPrettyTime( int seconds )
-{
-    int minutes = ( seconds / 60 ) % 60;
-    int hours = seconds / 3600;
-    QString s = QChar( ':' );
-    s.append( ( seconds % 60 ) < 10 ? QString( "0%1" ).arg( seconds % 60 ) : QString::number( seconds % 60 ) ); //seconds
-
-    if( hours )
-    {
-        s.prepend( minutes < 10 ? QString( "0%1" ).arg( minutes ) : QString::number( minutes ) );
-        s.prepend( ':' );
-    }
-    else
-    {
-        s.prepend( QString::number( minutes ) );
-        return s;
-    }
-
-    //don't zeroPad the last one, as it can be greater than 2 digits
-    s.prepend( QString::number( hours ) );
-
-    return s;
-}
-
-QString
-Meta::prettyFilesize( quint64 size )
-{
-    return KIO::convertSize( size );
-}
-
-QString
-Meta::prettyBitrate( int bitrate )
-{
-    //the point here is to force sharing of these strings returned from prettyBitrate()
-    static const QString bitrateStore[9] = {
-        "?", "32", "64", "96", "128", "160", "192", "224", "256" };
-
-    return (bitrate >=0 && bitrate <= 256 && bitrate % 32 == 0)
-                ? bitrateStore[ bitrate / 32 ]
-    : QString( "%1" ).arg( bitrate );
-}
-
-QString
-Meta::prettyRating( int rating )
-{
-    // Use the graphical star rating widget instead -- stharward
-    // I would remove this entirely, but I'm not sure if it would break the A2 string freeze
-    AMAROK_DEPRECATED
-    switch( rating )
-    {
-        case 1: return i18nc( "The quality of music", "Awful" );
-        case 2: return i18nc( "The quality of music", "Bad" );
-        case 3: return i18nc( "The quality of music", "Barely tolerable" );
-        case 4: return i18nc( "The quality of music", "Tolerable" );
-        case 5: return i18nc( "The quality of music", "Okay" );
-        case 6: return i18nc( "The quality of music", "Good" );
-        case 7: return i18nc( "The quality of music", "Very good" );
-        case 8: return i18nc( "The quality of music", "Excellent" );
-        case 9: return i18nc( "The quality of music", "Amazing" );
-        case 10: return i18nc( "The quality of music", "Favorite" );
-        case 0: default: return i18nc( "The quality of music", "Not rated" ); // assume weird values as not rated
-    }
-    return "if you can see this, then that's a bad sign.";
-}
-
-TrackKey
-Meta::keyFromTrack( const Meta::TrackPtr &track )
-{
-    TrackKey k;
-    k.trackName = track->name();
-    if( track->artist() )
-        k.artistName = track->artist()->name();
-
-    if( track->album() )
-        k.albumName = track->album()->name();
-
-    return k;
-}
diff --git a/src/meta/support/MetaUtility.h b/src/meta/support/MetaUtility.h
deleted file mode 100644
index ac2ffd7..0000000
--- a/src/meta/support/MetaUtility.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick at googlemail.com>            *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#ifndef AMAROK_METAUTILITY_H
-#define AMAROK_METAUTILITY_H
-
-#include "amarok_export.h"
-#include "Meta.h"
-#include "meta/support/MetaConstants.h"
-
-#include <QMap>
-#include <QString>
-#include <QVariant>
-
-class AMAROK_EXPORT AlbumKey
-{
-public:
-    QString albumName;
-    QString artistName;
-
-    AlbumKey() {}
-    AlbumKey( const QString &artist, const QString &album )
-    { artistName = artist; albumName = album; }
-
-    AlbumKey &operator=( const AlbumKey &o )
-    { albumName = o.albumName; artistName = o.artistName; return *this; }
-};
-
-class AMAROK_EXPORT TrackKey
-{
-public:
-    QString trackName;
-    QString albumName;
-    QString artistName;
-    //more?
-
-    TrackKey() {}
-
-    TrackKey &operator=( const TrackKey &o )
-    { trackName = o.trackName; albumName = o.albumName; artistName = o.artistName; return *this; }
-};
-
-namespace Meta
-{
-    class Track;
-
-    namespace Field
-    {
-
-        //deprecated
-        AMAROK_EXPORT QVariantMap mapFromTrack( const Meta::TrackPtr track );
-        //this method will return a map with keys that are compatible to the fdo MPRIS specification
-        AMAROK_EXPORT QVariantMap mprisMapFromTrack( const Meta::TrackPtr track );
-        AMAROK_EXPORT void updateTrack( Meta::TrackPtr track, const QVariantMap &metadata );
-        AMAROK_EXPORT QString xesamPrettyToFullFieldName( const QString &name );
-        AMAROK_EXPORT QString xesamFullToPrettyFieldName( const QString &name );
-    }
-
-
-    AMAROK_EXPORT QString msToPrettyTime( qint64 ms );
-    AMAROK_EXPORT QString secToPrettyTime( int seconds );
-
-    AMAROK_EXPORT QString prettyFilesize( quint64 size );
-    AMAROK_EXPORT QString prettyBitrate( int bitrate );
-
-    AMAROK_EXPORT QString prettyRating( int rating );
-
-    AMAROK_EXPORT TrackKey keyFromTrack( const Meta::TrackPtr &track );
-}
-
-inline bool
-operator==( const TrackKey &k1, const TrackKey &k2 )
-{
-    return k1.trackName == k2.trackName &&
-                          k1.albumName == k2.albumName &&
-                          k1.artistName == k2.artistName;
-}
-
-inline uint
-qHash( const TrackKey &key )
-{
-    return qHash( key.trackName ) + 17 * qHash( key.albumName ) + 31 * qHash( key.artistName );
-}
-
-inline bool
-operator==( const AlbumKey &k1, const AlbumKey &k2 )
-{
-    return k1.albumName == k2.albumName && k1.artistName == k2.artistName;
-}
-
-inline uint
-qHash( const AlbumKey &key )
-{
-    return qHash( key.albumName ) + 17 * qHash( key.artistName );
-}
-
-#endif
diff --git a/src/meta/support/PrivateMetaRegistry.cpp b/src/meta/support/PrivateMetaRegistry.cpp
deleted file mode 100644
index 8c73411..0000000
--- a/src/meta/support/PrivateMetaRegistry.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
-
-#include "PrivateMetaRegistry.h"
-
-#include "Debug.h"
-
-namespace Meta {
-
-
-PrivateMetaRegistry* PrivateMetaRegistry::s_instance = 0;
-
-
-PrivateMetaRegistry * PrivateMetaRegistry::instance()
-{
-    if ( s_instance == 0 )
-        s_instance = new PrivateMetaRegistry();
-    return s_instance;
-}
-
-
-PrivateMetaRegistry::PrivateMetaRegistry()
-{
-}
-
-
-PrivateMetaRegistry::~PrivateMetaRegistry()
-{
-}
-
-
-void PrivateMetaRegistry::insertAlbum( const QString &owner, const QString &key, AlbumPtr album )
-{
-    const QString compositeKey = owner + '-' + key;
-    m_albums.insert( compositeKey, album );
-}
-
-void PrivateMetaRegistry::insertArtist( const QString &owner, const QString &key, ArtistPtr artist )
-{
-    const QString compositeKey = owner + '-' + key;
-    m_artists.insert( compositeKey, artist );
-}
-
-void PrivateMetaRegistry::insertGenre( const QString &owner, const QString &key, GenrePtr genre )
-{
-    const QString compositeKey = owner + '-' + key;
-    m_genre.insert( compositeKey, genre );
-}
-
-void PrivateMetaRegistry::insertComposer( const QString &owner, const QString &key, ComposerPtr composer )
-{
-    const QString compositeKey = owner + '-' + key;
-    m_composers.insert( compositeKey, composer );
-}
-
-void PrivateMetaRegistry::insertYear( const QString &owner, const QString &key, YearPtr year )
-{
-    const QString compositeKey = owner + '-' + key;
-    m_years.insert( compositeKey, year );
-}
-
-AlbumPtr PrivateMetaRegistry::album( const QString &owner, const QString &key )
-{
-    DEBUG_BLOCK
-    const QString compositeKey = owner + '-' + key;
-    if ( m_albums.contains( compositeKey ) ) {
-        debug() << "reusing album with key: " << key;
-         return m_albums.value( compositeKey );
-
-    }
-    return AlbumPtr();
-}
-
-ArtistPtr PrivateMetaRegistry::artist( const QString &owner, const QString &key )
-{
-    const QString compositeKey = owner + '-' + key;
-    if ( m_artists.contains( compositeKey ) )
-        return m_artists.value( compositeKey );
-    return ArtistPtr();
-}
-
-GenrePtr PrivateMetaRegistry::genre( const QString &owner, const QString &key )
-{
-    const QString compositeKey = owner + '-' + key;
-    if ( m_genre.contains( compositeKey ) )
-        return m_genre.value( compositeKey );
-    return GenrePtr();
-}
-
-ComposerPtr PrivateMetaRegistry::composer( const QString &owner, const QString &key )
-{
-    const QString compositeKey = owner + '-' + key;
-    if ( m_composers.contains( compositeKey ) )
-        return m_composers.value( compositeKey );
-    return ComposerPtr();
-}
-
-YearPtr PrivateMetaRegistry::year( const QString &owner, const QString &key )
-{
-     const QString compositeKey = owner + '-' + key;
-     if ( m_years.contains( compositeKey ) )
-         return m_years.value( compositeKey );
-     return YearPtr();
-}
-
-}
-
diff --git a/src/meta/support/PrivateMetaRegistry.h b/src/meta/support/PrivateMetaRegistry.h
deleted file mode 100644
index ddb24f7..0000000
--- a/src/meta/support/PrivateMetaRegistry.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn at kde.org>                                *
- *                                                                                      *
- * This program is free software; you can redistribute it and/or modify it under        *
- * the terms of the GNU General Public License as published by the Free Software        *
- * Foundation; either version 2 of the License, or (at your option) any later           *
- * version.                                                                             *
- *                                                                                      *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
- *                                                                                      *
- * You should have received a copy of the GNU General Public License along with         *
- * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
- ****************************************************************************************/
- 
-#ifndef METAPRIVATEMETAREGISTRY_H
-#define METAPRIVATEMETAREGISTRY_H
-
-#include "Meta.h"
-
-namespace Meta {
-
-/**
-An extremely simple registry used where tracks often have private often have private album (or other members) to corrolate these instead of creating a new one for each trac (even if they are from the same album). This, besides saving memory, also makes it possible to group by pointers in the playlist instead of doing some album/artist name foo.
-
-	@author 
-*/
-class PrivateMetaRegistry{
-public:
-
-    static PrivateMetaRegistry * instance();
-
-    void insertAlbum( const QString &owner, const QString &key, AlbumPtr album );
-    void insertArtist( const QString &owner, const QString &key, ArtistPtr artist );
-    void insertGenre( const QString &owner, const QString &key, GenrePtr genre );
-    void insertComposer( const QString &owner, const QString &key, ComposerPtr composer );
-    void insertYear( const QString &owner, const QString &key, YearPtr year );
-
-    AlbumPtr album( const QString &owner, const QString &key );
-    ArtistPtr artist( const QString &owner, const QString &key );
-    GenrePtr genre( const QString &owner, const QString &key );
-    ComposerPtr composer( const QString &owner, const QString &key );
-    YearPtr year( const QString &owner, const QString &key );
-
-
-private:
-
-    PrivateMetaRegistry();
-    ~PrivateMetaRegistry();
-
-    static PrivateMetaRegistry* s_instance;      //! instance variable
-    
-    QMap<QString, AlbumPtr> m_albums;
-    QMap<QString, ArtistPtr> m_artists;
-    QMap<QString, GenrePtr> m_genre;
-    QMap<QString, ComposerPtr> m_composers;
-    QMap<QString, YearPtr> m_years;
-
-
-};
-
-}
-
-#endif
diff --git a/src/moodbar/MoodbarManager.h b/src/moodbar/MoodbarManager.h
index 7a60d6e..a393b83 100644
--- a/src/moodbar/MoodbarManager.h
+++ b/src/moodbar/MoodbarManager.h
@@ -19,7 +19,7 @@
 #define MOODBARMANAGER_H
 
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include "KPixmapCache"
 
diff --git a/src/playlist/PlaylistActions.h b/src/playlist/PlaylistActions.h
index e8970d5..fc1f06e 100644
--- a/src/playlist/PlaylistActions.h
+++ b/src/playlist/PlaylistActions.h
@@ -23,7 +23,7 @@
 
 #include "Debug.h"
 #include "EngineObserver.h"
-#include "playlists/Playlist.h"
+#include "core/playlists/Playlist.h"
 #include "proxymodels/AbstractModel.h"
 
 
diff --git a/src/playlist/PlaylistController.cpp b/src/playlist/PlaylistController.cpp
index 40274a8..ba79a5b 100644
--- a/src/playlist/PlaylistController.cpp
+++ b/src/playlist/PlaylistController.cpp
@@ -29,13 +29,13 @@
 #include "DirectoryLoader.h"
 #include "EngineController.h"
 #include "collection/QueryMaker.h"
-#include "meta/impl/cue/CueFileSupport.h"
+#include "core/meta/impl/cue/CueFileSupport.h"
 #include "playlist/PlaylistActions.h"
 #include "playlist/PlaylistModelStack.h"
 #include "playlistmanager/PlaylistManager.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
-#include "meta/impl/multi/MultiTrack.h"
-#include "meta/impl/file/File.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
+#include "core/meta/impl/multi/MultiTrack.h"
+#include "core/meta/impl/file/File.h"
 
 
 #include <algorithm> // STL
diff --git a/src/playlist/PlaylistController.h b/src/playlist/PlaylistController.h
index 061ad34..b28f78c 100644
--- a/src/playlist/PlaylistController.h
+++ b/src/playlist/PlaylistController.h
@@ -22,8 +22,8 @@
 #ifndef AMAROK_PLAYLISTCONTROLLER_H
 #define AMAROK_PLAYLISTCONTROLLER_H
 
-#include "meta/Meta.h"
-#include "playlists/Playlist.h"
+#include "core/meta/Meta.h"
+#include "core/playlists/Playlist.h"
 #include "UndoCommands.h"
 
 #include <QObject>
diff --git a/src/playlist/PlaylistItem.cpp b/src/playlist/PlaylistItem.cpp
index d9acd06..5d13dc5 100644
--- a/src/playlist/PlaylistItem.cpp
+++ b/src/playlist/PlaylistItem.cpp
@@ -20,7 +20,7 @@
 #define DEBUG_PREFIX "Playlist::Item"
 
 #include "PlaylistItem.h"
-#include "capabilities/SourceInfoCapability.h"
+#include "core/capabilities/SourceInfoCapability.h"
 
 #include <KRandom>
 
diff --git a/src/playlist/PlaylistItem.h b/src/playlist/PlaylistItem.h
index d64846a..6bfeb68 100644
--- a/src/playlist/PlaylistItem.h
+++ b/src/playlist/PlaylistItem.h
@@ -20,7 +20,7 @@
 #ifndef AMAROKPLAYLISTITEM_H
 #define AMAROKPLAYLISTITEM_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 namespace Playlist
 {
diff --git a/src/playlist/PlaylistModel.cpp b/src/playlist/PlaylistModel.cpp
index 1ccbc9d..6398530 100644
--- a/src/playlist/PlaylistModel.cpp
+++ b/src/playlist/PlaylistModel.cpp
@@ -26,14 +26,15 @@
 #include "Amarok.h"
 #include "amarokconfig.h"
 #include "AmarokMimeData.h"
+#include "core/capabilities/ReadLabelCapability.h"
 #include "Debug.h"
 #include "DirectoryLoader.h"
 #include "EngineController.h"
-#include "meta/support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 #include "PlaylistActions.h"
 #include "PlaylistModelStack.h"
 #include "PlaylistItem.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "UndoCommands.h"
 #include "playlistmanager/PlaylistManager.h"
 #include "services/ServicePluginManager.h" // used in constructor
@@ -46,7 +47,6 @@
 #include <QTextDocument>
 
 #include <typeinfo>
-#include <ReadLabelCapability.h>
 
 
 Playlist::Model::Model( QObject *parent )
diff --git a/src/playlist/PlaylistModel.h b/src/playlist/PlaylistModel.h
index edeab97..60cc2e0 100644
--- a/src/playlist/PlaylistModel.h
+++ b/src/playlist/PlaylistModel.h
@@ -25,7 +25,7 @@
 #include "proxymodels/AbstractModel.h"
 #include "Amarok.h"
 #include "UndoCommands.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QAbstractListModel>
 #include <QHash>
diff --git a/src/playlist/PlaylistWidget.cpp b/src/playlist/PlaylistWidget.cpp
index d22757b..adb6369 100644
--- a/src/playlist/PlaylistWidget.cpp
+++ b/src/playlist/PlaylistWidget.cpp
@@ -34,7 +34,7 @@
 #include "PlaylistManager.h"
 #include "PlaylistModelStack.h"
 #include "ProgressiveSearchWidget.h"
-#include "playlists/providers/user/UserPlaylistProvider.h"
+#include "core/playlists/providers/user/UserPlaylistProvider.h"
 #include "widgets/HorizontalDivider.h"
 
 #include <KActionMenu>
diff --git a/src/playlist/UndoCommands.h b/src/playlist/UndoCommands.h
index 23435d8..c0e253b 100644
--- a/src/playlist/UndoCommands.h
+++ b/src/playlist/UndoCommands.h
@@ -20,7 +20,7 @@
 #ifndef AMAROK_UNDOCOMMANDS_H
 #define AMAROK_UNDOCOMMANDS_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QList>
 #include <QPair>
diff --git a/src/playlist/navigators/AlbumNavigator.cpp b/src/playlist/navigators/AlbumNavigator.cpp
index 36dcf71..3e93865 100644
--- a/src/playlist/navigators/AlbumNavigator.cpp
+++ b/src/playlist/navigators/AlbumNavigator.cpp
@@ -26,7 +26,7 @@
 #include "playlist/PlaylistModelStack.h"
 
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QtAlgorithms> // For qStableSort
 
diff --git a/src/playlist/navigators/AlbumNavigator.h b/src/playlist/navigators/AlbumNavigator.h
index 3a59a0b..de3fbe2 100644
--- a/src/playlist/navigators/AlbumNavigator.h
+++ b/src/playlist/navigators/AlbumNavigator.h
@@ -23,7 +23,7 @@
 
 #include "NonlinearTrackNavigator.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QList>
 #include <QSet>
diff --git a/src/playlist/navigators/DynamicTrackNavigator.cpp b/src/playlist/navigators/DynamicTrackNavigator.cpp
index 75859cb..55f1e3a 100644
--- a/src/playlist/navigators/DynamicTrackNavigator.cpp
+++ b/src/playlist/navigators/DynamicTrackNavigator.cpp
@@ -22,7 +22,7 @@
 #include "Debug.h"
 #include "DynamicModel.h"
 #include "DynamicPlaylist.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "amarokconfig.h"
 #include "playlist/PlaylistModelStack.h"
 
diff --git a/src/playlist/navigators/RandomAlbumNavigator.cpp b/src/playlist/navigators/RandomAlbumNavigator.cpp
index 6fbf773..1e3a115 100644
--- a/src/playlist/navigators/RandomAlbumNavigator.cpp
+++ b/src/playlist/navigators/RandomAlbumNavigator.cpp
@@ -24,7 +24,7 @@
 #include "RandomAlbumNavigator.h"
 
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <algorithm> // For std::random_shuffle
 
diff --git a/src/playlist/navigators/RepeatAlbumNavigator.cpp b/src/playlist/navigators/RepeatAlbumNavigator.cpp
index 9abe40a..cf2879d 100644
--- a/src/playlist/navigators/RepeatAlbumNavigator.cpp
+++ b/src/playlist/navigators/RepeatAlbumNavigator.cpp
@@ -24,7 +24,7 @@
 #include "RepeatAlbumNavigator.h"
 
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 
 Playlist::RepeatAlbumNavigator::RepeatAlbumNavigator()
diff --git a/src/playlist/navigators/RepeatAlbumNavigator.h b/src/playlist/navigators/RepeatAlbumNavigator.h
index a02c19f..add4f52 100644
--- a/src/playlist/navigators/RepeatAlbumNavigator.h
+++ b/src/playlist/navigators/RepeatAlbumNavigator.h
@@ -23,7 +23,7 @@
 
 #include "AlbumNavigator.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 namespace Playlist
 {
diff --git a/src/playlist/proxymodels/AbstractModel.h b/src/playlist/proxymodels/AbstractModel.h
index 7095280..2fb51dd 100644
--- a/src/playlist/proxymodels/AbstractModel.h
+++ b/src/playlist/proxymodels/AbstractModel.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_PLAYLISTABSTRACTMODEL_H
 #define AMAROK_PLAYLISTABSTRACTMODEL_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "playlist/PlaylistDefines.h"
 #include "playlist/PlaylistItem.h"
 
diff --git a/src/playlist/proxymodels/GroupingProxy.cpp b/src/playlist/proxymodels/GroupingProxy.cpp
index 0a09d37..9a07eca 100644
--- a/src/playlist/proxymodels/GroupingProxy.cpp
+++ b/src/playlist/proxymodels/GroupingProxy.cpp
@@ -27,8 +27,8 @@
 
 #include "Debug.h"
 #include "Collection.h"
-#include "support/MetaUtility.h"
-#include "capabilities/SourceInfoCapability.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/SourceInfoCapability.h"
 #include "playlist/PlaylistDefines.h"
 
 #include <QVariant>
diff --git a/src/playlist/proxymodels/GroupingProxy.h b/src/playlist/proxymodels/GroupingProxy.h
index 71ebab6..fb8e8f3 100644
--- a/src/playlist/proxymodels/GroupingProxy.h
+++ b/src/playlist/proxymodels/GroupingProxy.h
@@ -25,7 +25,7 @@
 #define AMAROK_PLAYLISTGROUPINGPROXY_H
 
 #include "ProxyBase.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QHash>
 #include <QModelIndex>
diff --git a/src/playlist/proxymodels/ProxyBase.cpp b/src/playlist/proxymodels/ProxyBase.cpp
index 37d6e73..468043f 100644
--- a/src/playlist/proxymodels/ProxyBase.cpp
+++ b/src/playlist/proxymodels/ProxyBase.cpp
@@ -16,8 +16,8 @@
 
 #include "ProxyBase.h"
 
-#include "meta/Meta.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/meta/Meta.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 
 namespace Playlist
 {
diff --git a/src/playlist/view/PlaylistViewCommon.cpp b/src/playlist/view/PlaylistViewCommon.cpp
index 5e7bf54..1b32ac7 100644
--- a/src/playlist/view/PlaylistViewCommon.cpp
+++ b/src/playlist/view/PlaylistViewCommon.cpp
@@ -25,8 +25,8 @@
 #include "Debug.h"
 #include "EngineController.h"
 #include "GlobalCurrentTrackActions.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "capabilities/FindInSourceCapability.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/capabilities/FindInSourceCapability.h"
 #include "playlist/proxymodels/GroupingProxy.h"
 #include "TagDialog.h"
 
diff --git a/src/playlist/view/listview/PrettyItemDelegate.cpp b/src/playlist/view/listview/PrettyItemDelegate.cpp
index a65cc3c..4b190ba 100644
--- a/src/playlist/view/listview/PrettyItemDelegate.cpp
+++ b/src/playlist/view/listview/PrettyItemDelegate.cpp
@@ -28,9 +28,9 @@
 #include "InlineEditorWidget.h"
 #include "SvgHandler.h"
 #include "SvgTinter.h"
-#include "meta/Meta.h"
-#include "capabilities/EditCapability.h"
-#include "capabilities/SourceInfoCapability.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/EditCapability.h"
+#include "core/capabilities/SourceInfoCapability.h"
 #include "moodbar/MoodbarManager.h"
 #include "playlist/proxymodels/GroupingProxy.h"
 #include "playlist/PlaylistModel.h"
diff --git a/src/playlist/view/listview/PrettyListView.cpp b/src/playlist/view/listview/PrettyListView.cpp
index 6150d20..aa097b1 100644
--- a/src/playlist/view/listview/PrettyListView.cpp
+++ b/src/playlist/view/listview/PrettyListView.cpp
@@ -32,10 +32,10 @@
 #include "EngineController.h"
 #include "dialogs/TagDialog.h"
 #include "GlobalCurrentTrackActions.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "capabilities/FindInSourceCapability.h"
-#include "capabilities/MultiSourceCapability.h"
-#include "meta/Meta.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/capabilities/FindInSourceCapability.h"
+#include "core/capabilities/MultiSourceCapability.h"
+#include "core/meta/Meta.h"
 #include "PaletteHandler.h"
 #include "playlist/layouts/LayoutManager.h"
 #include "playlist/proxymodels/GroupingProxy.h"
diff --git a/src/playlist/view/listview/SourceSelectionPopup.h b/src/playlist/view/listview/SourceSelectionPopup.h
index adaa085..ba1c303 100644
--- a/src/playlist/view/listview/SourceSelectionPopup.h
+++ b/src/playlist/view/listview/SourceSelectionPopup.h
@@ -19,7 +19,7 @@
 
 #include <QDialog>
 
-#include "capabilities/MultiSourceCapability.h"
+#include "core/capabilities/MultiSourceCapability.h"
 
 #include <QStringList>
 
diff --git a/src/playlist/view/tooltips/ToolTipManager.cpp b/src/playlist/view/tooltips/ToolTipManager.cpp
index ae6df61..29b428f 100644
--- a/src/playlist/view/tooltips/ToolTipManager.cpp
+++ b/src/playlist/view/tooltips/ToolTipManager.cpp
@@ -23,7 +23,7 @@
 #include "amarokconfig.h"
 
 #include "AmarokToolTip.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "playlist/proxymodels/GroupingProxy.h"
 #include "playlist/layouts/LayoutManager.h"
 #include "playlist/layouts/LayoutItemConfig.h"
diff --git a/src/playlist/view/tooltips/ToolTipManager.h b/src/playlist/view/tooltips/ToolTipManager.h
index 2f00761..0098e8b 100644
--- a/src/playlist/view/tooltips/ToolTipManager.h
+++ b/src/playlist/view/tooltips/ToolTipManager.h
@@ -25,7 +25,7 @@
 #include <QRect>
 #include <QIcon>
 #include <QModelIndex>
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "AmarokToolTip.h"
 #include "playlist/PlaylistDefines.h"
 
diff --git a/src/playlistmanager/PlaylistManager.cpp b/src/playlistmanager/PlaylistManager.cpp
index e1652db..47bbebc 100644
--- a/src/playlistmanager/PlaylistManager.cpp
+++ b/src/playlistmanager/PlaylistManager.cpp
@@ -21,9 +21,9 @@
 #include "App.h"
 #include "statusbar/StatusBar.h"
 #include "CollectionManager.h"
-#include "playlists/impl/file/PlaylistFile.h"
+#include "core/playlists/impl/file/PlaylistFile.h"
 #include "playlist/PlaylistModelStack.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "PodcastProvider.h"
 #include "file/PlaylistFileProvider.h"
 #include "sql/SqlPodcastProvider.h"
diff --git a/src/playlistmanager/PlaylistManager.h b/src/playlistmanager/PlaylistManager.h
index a06632a..a5e5739 100644
--- a/src/playlistmanager/PlaylistManager.h
+++ b/src/playlistmanager/PlaylistManager.h
@@ -19,8 +19,8 @@
 
 #include "Amarok.h"
 #include "amarok_export.h"
-#include "playlists/Playlist.h"
-#include "playlists/PlaylistProvider.h"
+#include "core/playlists/Playlist.h"
+#include "core/playlists/PlaylistProvider.h"
 
 #include <QMultiMap>
 #include <QList>
diff --git a/src/playlistmanager/file/PlaylistFileProvider.cpp b/src/playlistmanager/file/PlaylistFileProvider.cpp
index b0eb628..7aa21ed 100644
--- a/src/playlistmanager/file/PlaylistFileProvider.cpp
+++ b/src/playlistmanager/file/PlaylistFileProvider.cpp
@@ -17,13 +17,13 @@
 #include "PlaylistFileProvider.h"
 #include "App.h"
 #include "amarokconfig.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
-#include "EditablePlaylistCapability.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
+#include "core/capabilities/EditablePlaylistCapability.h"
 #include "Amarok.h"
 #include "Debug.h"
-#include "playlists/impl/file/m3u/M3UPlaylist.h"
-#include "playlists/impl/file/pls/PLSPlaylist.h"
-#include "playlists/impl/file/xspf/XSPFPlaylist.h"
+#include "core/playlists/impl/file/m3u/M3UPlaylist.h"
+#include "core/playlists/impl/file/pls/PLSPlaylist.h"
+#include "core/playlists/impl/file/xspf/XSPFPlaylist.h"
 #include "playlist/PlaylistModelStack.h"
 #include "StatusBar.h"
 
diff --git a/src/playlistmanager/file/PlaylistFileProvider.h b/src/playlistmanager/file/PlaylistFileProvider.h
index f418c94..caeef41 100644
--- a/src/playlistmanager/file/PlaylistFileProvider.h
+++ b/src/playlistmanager/file/PlaylistFileProvider.h
@@ -17,9 +17,9 @@
 #ifndef PLAYLISTFILEPROVIDER_H
 #define PLAYLISTFILEPROVIDER_H
 
-#include "playlists/providers/user/UserPlaylistProvider.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
-#include "playlists/PlaylistProvider.h"
+#include "core/playlists/providers/user/UserPlaylistProvider.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/PlaylistProvider.h"
 
 #include <kicon.h>
 
diff --git a/src/playlistmanager/sql/SqlPlaylist.cpp b/src/playlistmanager/sql/SqlPlaylist.cpp
index 0742d93..5ba9ef8 100644
--- a/src/playlistmanager/sql/SqlPlaylist.cpp
+++ b/src/playlistmanager/sql/SqlPlaylist.cpp
@@ -18,7 +18,7 @@
 
 #include "CollectionManager.h"
 #include "Debug.h"
-#include "meta/impl/stream/Stream.h"
+#include "core/meta/impl/stream/Stream.h"
 #include "SqlStorage.h"
 #include "timecode/TimecodeMeta.h"
 #include "playlistmanager/PlaylistManager.h"
diff --git a/src/playlistmanager/sql/SqlPlaylist.h b/src/playlistmanager/sql/SqlPlaylist.h
index e6f2a7d..047fa07 100644
--- a/src/playlistmanager/sql/SqlPlaylist.h
+++ b/src/playlistmanager/sql/SqlPlaylist.h
@@ -17,7 +17,7 @@
 #ifndef METASQLPLAYLIST_H
 #define METASQLPLAYLIST_H
 
-#include "Playlist.h"
+#include "core/playlists/Playlist.h"
 // #include "playlistmanager/sql/SqlPlaylistGroup.h"
 
 class PlaylistProvider;
diff --git a/src/playlistmanager/sql/SqlPlaylistGroup.h b/src/playlistmanager/sql/SqlPlaylistGroup.h
index a0eec4b..3b359bd 100644
--- a/src/playlistmanager/sql/SqlPlaylistGroup.h
+++ b/src/playlistmanager/sql/SqlPlaylistGroup.h
@@ -17,7 +17,7 @@
 #ifndef SQLPLAYLISTGROUP_H
 #define SQLPLAYLISTGROUP_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "SqlPlaylist.h"
 
 #include <QString>
diff --git a/src/playlistmanager/sql/SqlUserPlaylistProvider.cpp b/src/playlistmanager/sql/SqlUserPlaylistProvider.cpp
index 2d6732d..f5fa0c3 100644
--- a/src/playlistmanager/sql/SqlUserPlaylistProvider.cpp
+++ b/src/playlistmanager/sql/SqlUserPlaylistProvider.cpp
@@ -21,10 +21,10 @@
 #include "CollectionManager.h"
 #include "Debug.h"
 #include "MainWindow.h"
-#include "playlists/impl/file/m3u/M3UPlaylist.h"
-#include "playlists/impl/file/pls/PLSPlaylist.h"
-#include "playlists/impl/file/xspf/XSPFPlaylist.h"
-#include "playlists/impl/file/PlaylistFileSupport.h"
+#include "core/playlists/impl/file/m3u/M3UPlaylist.h"
+#include "core/playlists/impl/file/pls/PLSPlaylist.h"
+#include "core/playlists/impl/file/xspf/XSPFPlaylist.h"
+#include "core/playlists/impl/file/PlaylistFileSupport.h"
 #include "SqlStorage.h"
 #include "SvgHandler.h"
 #include "UserPlaylistModel.h"
diff --git a/src/playlistmanager/sql/SqlUserPlaylistProvider.h b/src/playlistmanager/sql/SqlUserPlaylistProvider.h
index f9127ba..cf22386 100644
--- a/src/playlistmanager/sql/SqlUserPlaylistProvider.h
+++ b/src/playlistmanager/sql/SqlUserPlaylistProvider.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_COLLECTION_SQLUSERPLAYLISTPROVIDER_H
 #define AMAROK_COLLECTION_SQLUSERPLAYLISTPROVIDER_H
 
-#include "playlists/providers/user/UserPlaylistProvider.h"
+#include "core/playlists/providers/user/UserPlaylistProvider.h"
 #include "SqlPlaylist.h"
 #include "SqlPlaylistGroup.h"
 
diff --git a/src/podcasts/PodcastMeta.h b/src/podcasts/PodcastMeta.h
index e475fd6..7d36b48 100644
--- a/src/podcasts/PodcastMeta.h
+++ b/src/podcasts/PodcastMeta.h
@@ -19,8 +19,8 @@
 
 #include "Amarok.h"
 #include "amarok_export.h"
-#include "meta/Meta.h"
-#include "playlists/Playlist.h"
+#include "core/meta/Meta.h"
+#include "core/playlists/Playlist.h"
 
 #include <KLocale>
 #include <KUrl>
diff --git a/src/podcasts/PodcastReader.cpp b/src/podcasts/PodcastReader.cpp
index 770dadf..60d2861 100644
--- a/src/podcasts/PodcastReader.cpp
+++ b/src/podcasts/PodcastReader.cpp
@@ -19,7 +19,7 @@
 
 #include "Debug.h"
 #include "statusbar/StatusBar.h"
-#include "meta/support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 
 #include <kio/job.h>
 #include <kurl.h>
diff --git a/src/podcasts/sql/SqlPodcastMeta.cpp b/src/podcasts/sql/SqlPodcastMeta.cpp
index 3c5ffed..df97142 100644
--- a/src/podcasts/sql/SqlPodcastMeta.cpp
+++ b/src/podcasts/sql/SqlPodcastMeta.cpp
@@ -20,10 +20,10 @@
 #include "amarokurls/PlayUrlRunner.h"
 #include "CollectionManager.h"
 #include "Debug.h"
-#include "EditCapability.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "capabilities/TimecodeLoadCapability.h"
-#include "capabilities/TimecodeWriteCapability.h"
+#include "core/capabilities/EditCapability.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/capabilities/TimecodeLoadCapability.h"
+#include "core/capabilities/TimecodeWriteCapability.h"
 #include "SqlPodcastProvider.h"
 #include "SqlStorage.h"
 
diff --git a/src/podcasts/sql/SqlPodcastMeta.h b/src/podcasts/sql/SqlPodcastMeta.h
index 9ca41da..92bbe48 100644
--- a/src/podcasts/sql/SqlPodcastMeta.h
+++ b/src/podcasts/sql/SqlPodcastMeta.h
@@ -18,7 +18,7 @@
 #define SQLPODCASTMETA_H
 
 #include "PodcastMeta.h"
-#include "meta/impl/file/File.h"
+#include "core/meta/impl/file/File.h"
 
 class SqlPodcastProvider;
 
diff --git a/src/scriptengine/AmarokLyricsScript.cpp b/src/scriptengine/AmarokLyricsScript.cpp
index 51ff1da..2066ed4 100644
--- a/src/scriptengine/AmarokLyricsScript.cpp
+++ b/src/scriptengine/AmarokLyricsScript.cpp
@@ -22,7 +22,7 @@
 #include "Debug.h"
 #include "EngineController.h"
 #include "LyricsManager.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "ScriptManager.h"
 
 #include <KApplication>
diff --git a/src/scriptengine/MetaTypeExporter.cpp b/src/scriptengine/MetaTypeExporter.cpp
index 86e9a66..ec070bd 100644
--- a/src/scriptengine/MetaTypeExporter.cpp
+++ b/src/scriptengine/MetaTypeExporter.cpp
@@ -17,8 +17,6 @@
 
 #include "MetaTypeExporter.h"
 
-#include "EditCapability.h"
-
 #include <QtScript>
 
 #define GET_TRACK  Meta::TrackPtr track = qscriptvalue_cast<Meta::TrackPtr>( thisObject() );
diff --git a/src/scriptengine/MetaTypeExporter.h b/src/scriptengine/MetaTypeExporter.h
index 0588bb6..ef4a7fe 100644
--- a/src/scriptengine/MetaTypeExporter.h
+++ b/src/scriptengine/MetaTypeExporter.h
@@ -17,8 +17,8 @@
 #ifndef METATYPE_EXPORTER_H
 #define METATYPE_EXPORTER_H
 
-#include "Meta.h"
-#include "EditCapability.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/EditCapability.h"
 
 #include <QObject>
 #include <QScriptable>
diff --git a/src/services/CMakeLists.txt b/src/services/CMakeLists.txt
index a9a7679..1de81f6 100644
--- a/src/services/CMakeLists.txt
+++ b/src/services/CMakeLists.txt
@@ -1,4 +1,8 @@
-include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ../ )
+include_directories(
+                    ${KDE4_INCLUDE_DIR}
+                    ${QT_INCLUDES}
+                    ${Amarok_SOURCE_DIR}/src
+                   )
 
 add_subdirectory( magnatune )
 add_subdirectory( jamendo )
diff --git a/src/services/DynamicServiceQueryMaker.h b/src/services/DynamicServiceQueryMaker.h
index be6d7ae..7ce58d5 100644
--- a/src/services/DynamicServiceQueryMaker.h
+++ b/src/services/DynamicServiceQueryMaker.h
@@ -17,8 +17,8 @@
 #ifndef DYNAMICSERVICEQUERYMAKER_H
 #define DYNAMICSERVICEQUERYMAKER_H
 
-#include "Meta.h"
-#include "QueryMaker.h"
+#include "core/meta/Meta.h"
+#include "collection/QueryMaker.h"
 #include "ServiceCollection.h"
 #include "amarok_export.h"
 
diff --git a/src/services/InfoParserBase.h b/src/services/InfoParserBase.h
index 59fe5b5..52cbc8b 100644
--- a/src/services/InfoParserBase.h
+++ b/src/services/InfoParserBase.h
@@ -18,7 +18,7 @@
 #define INFOPARSERBASE_H
 
 #include "amarok_export.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QObject>
 
diff --git a/src/services/ServiceBase.h b/src/services/ServiceBase.h
index edfc877..effcdb6 100644
--- a/src/services/ServiceBase.h
+++ b/src/services/ServiceBase.h
@@ -25,7 +25,7 @@
 #include "amarok_export.h"
 #include "CollectionManager.h"
 #include "plugin/plugin.h"
-#include "meta/impl/proxy/MetaProxy.h"
+#include "core/meta/impl/proxy/MetaProxy.h"
 #include "widgets/PrettyTreeView.h"
 
 #include <KPluginInfo>
diff --git a/src/services/ServiceCapabilities.h b/src/services/ServiceCapabilities.h
index 991c699..3a6deee 100644
--- a/src/services/ServiceCapabilities.h
+++ b/src/services/ServiceCapabilities.h
@@ -22,11 +22,11 @@
 #include "amarok_export.h"
 #include "amarokurls/AmarokUrl.h"
 
-#include "capabilities/BookmarkThisCapability.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "capabilities/CustomActionsCapability.h"
-#include "capabilities/FindInSourceCapability.h"
-#include "capabilities/SourceInfoCapability.h"
+#include "core/capabilities/BookmarkThisCapability.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/capabilities/CustomActionsCapability.h"
+#include "core/capabilities/FindInSourceCapability.h"
+#include "core/capabilities/SourceInfoCapability.h"
 
 
 class BookmarkThisProvider;
diff --git a/src/services/ServiceCollectionTreeView.cpp b/src/services/ServiceCollectionTreeView.cpp
index 1a664fd..daf1c10 100644
--- a/src/services/ServiceCollectionTreeView.cpp
+++ b/src/services/ServiceCollectionTreeView.cpp
@@ -18,7 +18,7 @@
 
 #include "browsers/CollectionTreeItem.h"
 #include "Debug.h"
-#include "../meta/capabilities/CustomActionsCapability.h"
+#include "core/capabilities/CustomActionsCapability.h"
 
 #include <KMenu>
 
diff --git a/src/services/ServiceMetaBase.cpp b/src/services/ServiceMetaBase.cpp
index 0a7a306..481df66 100644
--- a/src/services/ServiceMetaBase.cpp
+++ b/src/services/ServiceMetaBase.cpp
@@ -19,7 +19,7 @@
 
 #include "Amarok.h"
 #include "Debug.h"
-#include "meta/impl/default/DefaultMetaTypes.h"
+#include "core/meta/impl/default/DefaultMetaTypes.h"
 
 using namespace Meta;
 
diff --git a/src/services/ServiceMetaBase.h b/src/services/ServiceMetaBase.h
index 833521d..45fcac9 100644
--- a/src/services/ServiceMetaBase.h
+++ b/src/services/ServiceMetaBase.h
@@ -22,8 +22,8 @@
 #include "amarokurls/BookmarkMetaActions.h"
 #include "Debug.h"
 #include "InfoParserBase.h"
-#include "meta/impl/proxy/MetaProxy.h"
-#include "statistics/StatisticsProvider.h"
+#include "core/meta/impl/proxy/MetaProxy.h"
+#include "core/statistics/StatisticsProvider.h"
 #include "ServiceCapabilities.h"
 
 #include <QAction>
diff --git a/src/services/ServiceSqlQueryMaker.cpp b/src/services/ServiceSqlQueryMaker.cpp
index 8cd7437..eeb61ba 100644
--- a/src/services/ServiceSqlQueryMaker.cpp
+++ b/src/services/ServiceSqlQueryMaker.cpp
@@ -23,7 +23,7 @@
 
 #include "collection/CollectionManager.h"
 #include "collection/SqlStorage.h"
-#include "meta/support/MetaConstants.h"
+#include "core/meta/support/MetaConstants.h"
 #include "ServiceSqlCollection.h"
 
 #include <threadweaver/Job.h>
diff --git a/src/services/ampache/CMakeLists.txt b/src/services/ampache/CMakeLists.txt
index eeaa78a..5ac2269 100644
--- a/src/services/ampache/CMakeLists.txt
+++ b/src/services/ampache/CMakeLists.txt
@@ -2,7 +2,6 @@
             ../
             ../../
             ../../plugin
-            ../../meta
             ../../collection
             ../../servicebrowser
             ../../statusbar
diff --git a/src/services/jamendo/CMakeLists.txt b/src/services/jamendo/CMakeLists.txt
index dd63bd7..503f841 100644
--- a/src/services/jamendo/CMakeLists.txt
+++ b/src/services/jamendo/CMakeLists.txt
@@ -2,7 +2,6 @@
             ../
             ../../
             ../../plugin
-            ../../meta
             ../../collection
             ../../servicebrowser
             ../../statusbar
diff --git a/src/services/lastfm/CMakeLists.txt b/src/services/lastfm/CMakeLists.txt
index 7a0e2b3..91f1fd0 100644
--- a/src/services/lastfm/CMakeLists.txt
+++ b/src/services/lastfm/CMakeLists.txt
@@ -3,7 +3,6 @@ include_directories(
         ../
         ../../
         ../../collection
-        ../../meta
         ../../statusbar
         ../../widgets
         ../../context
diff --git a/src/services/lastfm/LastFmService.cpp b/src/services/lastfm/LastFmService.cpp
index 6d067af..80942b3 100644
--- a/src/services/lastfm/LastFmService.cpp
+++ b/src/services/lastfm/LastFmService.cpp
@@ -36,7 +36,7 @@
 #include "GlobalCollectionActions.h"
 #include "GlobalCurrentTrackActions.h"
 #include "collection/CollectionManager.h"
-#include "capabilities/LastFmCapability.h"
+#include "core/capabilities/LastFmCapability.h"
 #include "meta/LastFmMeta.h"
 #include "playlist/PlaylistModelStack.h"
 #include "widgets/SearchWidget.h"
diff --git a/src/services/lastfm/LastFmTreeModel.h b/src/services/lastfm/LastFmTreeModel.h
index a3fbec0..b905d4f 100644
--- a/src/services/lastfm/LastFmTreeModel.h
+++ b/src/services/lastfm/LastFmTreeModel.h
@@ -19,7 +19,7 @@
 #ifndef LASTFMTREEMODEL_H
 #define LASTFMTREEMODEL_H
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "WeightedStringList.h"
 
 #include <lastfm/User>
diff --git a/src/services/lastfm/LoveTrackAction.h b/src/services/lastfm/LoveTrackAction.h
index 8d3dd40..4da0906 100644
--- a/src/services/lastfm/LoveTrackAction.h
+++ b/src/services/lastfm/LoveTrackAction.h
@@ -19,7 +19,7 @@
 
 #include "GlobalCollectionActions.h"
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "LastFmService.h"
 
 
diff --git a/src/services/lastfm/ScrobblerAdapter.cpp b/src/services/lastfm/ScrobblerAdapter.cpp
index 0e9ad5e..bb189ec 100644
--- a/src/services/lastfm/ScrobblerAdapter.cpp
+++ b/src/services/lastfm/ScrobblerAdapter.cpp
@@ -23,7 +23,7 @@
 #include "Debug.h"
 #include "EngineController.h"
 #include "MainWindow.h"
-#include "meta/support/MetaConstants.h"
+#include "core/meta/support/MetaConstants.h"
 #include "meta/LastFmMeta.h"
 #include "StatusBar.h"
 
diff --git a/src/services/lastfm/ScrobblerAdapter.h b/src/services/lastfm/ScrobblerAdapter.h
index a3699e0..d4a9124 100644
--- a/src/services/lastfm/ScrobblerAdapter.h
+++ b/src/services/lastfm/ScrobblerAdapter.h
@@ -19,7 +19,7 @@
 #define LASTFMSCROBBLERADAPTER_H
 
 #include "EngineObserver.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <lastfm/Audioscrobbler>
 #include <lastfm/Track>
diff --git a/src/services/lastfm/SimilarArtistsAction.h b/src/services/lastfm/SimilarArtistsAction.h
index 716edb6..f078b70 100644
--- a/src/services/lastfm/SimilarArtistsAction.h
+++ b/src/services/lastfm/SimilarArtistsAction.h
@@ -19,7 +19,7 @@
 
 #include "GlobalCollectionActions.h"
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 
 class SimilarArtistsAction : public GlobalCollectionArtistAction
diff --git a/src/services/lastfm/biases/LastFmBias.cpp b/src/services/lastfm/biases/LastFmBias.cpp
index abb9f06..80b1f05 100644
--- a/src/services/lastfm/biases/LastFmBias.cpp
+++ b/src/services/lastfm/biases/LastFmBias.cpp
@@ -20,7 +20,7 @@
 #include "CollectionManager.h"
 #include "Debug.h"
 #include "EngineController.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "QueryMaker.h"
 
 #include "lastfm/Artist"
diff --git a/src/services/lastfm/biases/WeeklyTopBias.cpp b/src/services/lastfm/biases/WeeklyTopBias.cpp
index 202217c..80300c7 100644
--- a/src/services/lastfm/biases/WeeklyTopBias.cpp
+++ b/src/services/lastfm/biases/WeeklyTopBias.cpp
@@ -19,7 +19,7 @@
 #include "Collection.h"
 #include "CollectionManager.h"
 #include "Debug.h"
-#include "Meta.h"
+#include "core/meta/Meta.h"
 #include "QueryMaker.h"
 
 #include <lastfm/Artist>
diff --git a/src/services/lastfm/meta/CurrentTrackActionsCapabilityImpl_p.h b/src/services/lastfm/meta/CurrentTrackActionsCapabilityImpl_p.h
index 63d74e0..b32f1d1 100644
--- a/src/services/lastfm/meta/CurrentTrackActionsCapabilityImpl_p.h
+++ b/src/services/lastfm/meta/CurrentTrackActionsCapabilityImpl_p.h
@@ -18,7 +18,7 @@
 #define AMAROK_CURRENTTRACKACTIONSCAPABILITYIMPL_P_H
 
 
-#include "capabilities/CurrentTrackActionsCapability.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
 
 #include "Debug.h"
 
diff --git a/src/services/lastfm/meta/LastFmCapabilityImpl_p.h b/src/services/lastfm/meta/LastFmCapabilityImpl_p.h
index 97cb50b..5602973 100644
--- a/src/services/lastfm/meta/LastFmCapabilityImpl_p.h
+++ b/src/services/lastfm/meta/LastFmCapabilityImpl_p.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_LASTFMCAPABILITYIMPL_P_H
 #define AMAROK_LASTFMCAPABILITYIMPL_P_H
 
-#include "capabilities/LastFmCapability.h"
+#include "core/capabilities/LastFmCapability.h"
 
 class LastFmCapabilityImpl : public Meta::LastFmCapability
 {
diff --git a/src/services/lastfm/meta/LastFmMeta.h b/src/services/lastfm/meta/LastFmMeta.h
index 733d6cc..4d121bb 100644
--- a/src/services/lastfm/meta/LastFmMeta.h
+++ b/src/services/lastfm/meta/LastFmMeta.h
@@ -19,8 +19,8 @@
 #ifndef AMAROK_LASTFMMETA_H
 #define AMAROK_LASTFMMETA_H
 
-#include "meta/Meta.h"
-#include "capabilities/Capability.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/Capability.h"
 #include "ServiceMetaBase.h" // for the SourceInfoProvider
 
 
diff --git a/src/services/lastfm/meta/LastFmMeta_p.h b/src/services/lastfm/meta/LastFmMeta_p.h
index 95f8793..3ec3335 100644
--- a/src/services/lastfm/meta/LastFmMeta_p.h
+++ b/src/services/lastfm/meta/LastFmMeta_p.h
@@ -22,9 +22,9 @@
 
 #include "Amarok.h"
 #include "amarokconfig.h"
-#include "meta/Meta.h"
-#include "statistics/StatisticsProvider.h"
-#include "statistics/providers/tag/TagStatisticsProvider.h"
+#include "core/meta/Meta.h"
+#include "core/statistics/StatisticsProvider.h"
+#include "core/statistics/providers/tag/TagStatisticsProvider.h"
 
 #include <lastfm/Track>
 #include <lastfm/ws.h>
diff --git a/src/services/lastfm/meta/LastFmStreamInfoCapability.h b/src/services/lastfm/meta/LastFmStreamInfoCapability.h
index c77a824..e515558 100644
--- a/src/services/lastfm/meta/LastFmStreamInfoCapability.h
+++ b/src/services/lastfm/meta/LastFmStreamInfoCapability.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_LASTFMSTREAMINFOCAPABILITY_H
 #define AMAROK_LASTFMSTREAMINFOCAPABILITY_H
 
-#include "capabilities/StreamInfoCapability.h"
+#include "core/capabilities/StreamInfoCapability.h"
 
 namespace LastFm
 {
diff --git a/src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h b/src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h
index 4ef348d..84d54c6 100644
--- a/src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h
+++ b/src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h
@@ -19,8 +19,8 @@
 
 #include "Debug.h"
 #include "LastFmMeta.h"
-#include "Meta.h"
-#include "capabilities/MultiPlayableCapability.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/MultiPlayableCapability.h"
 #include "StatusBar.h"
 
 #include <lastfm/Track>
diff --git a/src/services/magnatune/CMakeLists.txt b/src/services/magnatune/CMakeLists.txt
index fab4b5d..6f9241a 100644
--- a/src/services/magnatune/CMakeLists.txt
+++ b/src/services/magnatune/CMakeLists.txt
@@ -2,7 +2,6 @@ include_directories(
     ../
     ../../
     ../../plugin
-    ../../meta
     ../../collection
     ../../servicebrowser
     ../../statusbar
diff --git a/src/services/magnatune/MagnatuneMeta.cpp b/src/services/magnatune/MagnatuneMeta.cpp
index f844bf0..7f09a56 100644
--- a/src/services/magnatune/MagnatuneMeta.cpp
+++ b/src/services/magnatune/MagnatuneMeta.cpp
@@ -21,7 +21,7 @@
 #include "Debug.h"
 #include "MagnatuneActions.h"
 #include "MagnatuneConfig.h"
-#include "statistics/providers/url/PermanentUrlStatisticsProvider.h"
+#include "core/statistics/providers/url/PermanentUrlStatisticsProvider.h"
 #include "SvgHandler.h"
 
 #include <KLocale>
diff --git a/src/services/magnatune/MagnatunePurchaseDialog.cpp b/src/services/magnatune/MagnatunePurchaseDialog.cpp
index 569ab90..d384511 100644
--- a/src/services/magnatune/MagnatunePurchaseDialog.cpp
+++ b/src/services/magnatune/MagnatunePurchaseDialog.cpp
@@ -18,7 +18,7 @@
 
 #include "Debug.h"
 #include "MagnatuneDatabaseHandler.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <KMessageBox>
 
diff --git a/src/services/mp3tunes/CMakeLists.txt b/src/services/mp3tunes/CMakeLists.txt
index 22972e9..4ecf3f8 100644
--- a/src/services/mp3tunes/CMakeLists.txt
+++ b/src/services/mp3tunes/CMakeLists.txt
@@ -5,7 +5,6 @@ if(LIBXML2_FOUND AND CURL_FOUND)
             ../
             ../../
             ../../plugin
-            ../../meta
             ../../collection
             ../../servicebrowser
             ../../statusbar
diff --git a/src/services/opmldirectory/CMakeLists.txt b/src/services/opmldirectory/CMakeLists.txt
index 8c78938..bac5c63 100644
--- a/src/services/opmldirectory/CMakeLists.txt
+++ b/src/services/opmldirectory/CMakeLists.txt
@@ -2,7 +2,6 @@
             ../
             ../..
             ../../plugin
-            ../../meta
             ../../collection
             ../../servicebrowser
             ../../statusbar
diff --git a/src/services/scriptable/ScriptableServiceMeta.cpp b/src/services/scriptable/ScriptableServiceMeta.cpp
index 6a871e8..b98f8f0 100644
--- a/src/services/scriptable/ScriptableServiceMeta.cpp
+++ b/src/services/scriptable/ScriptableServiceMeta.cpp
@@ -17,7 +17,7 @@
 #include "ScriptableServiceMeta.h"
 #include "ScriptableServiceMeta_p.h"
 
-#include "support/PrivateMetaRegistry.h"
+#include "core/meta/support/PrivateMetaRegistry.h"
 #include "ScriptableService.h"
 #include "ScriptableServiceManager.h"
 
diff --git a/src/services/scriptable/ScriptableServiceMeta_p.h b/src/services/scriptable/ScriptableServiceMeta_p.h
index 2e95c8c..9243b44 100644
--- a/src/services/scriptable/ScriptableServiceMeta_p.h
+++ b/src/services/scriptable/ScriptableServiceMeta_p.h
@@ -21,8 +21,8 @@
 
 
 #include "Debug.h"
-#include "Meta.h"
-#include "SourceInfoCapability.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/SourceInfoCapability.h"
 
 #include <QObject>
 #include <QPixmap>
diff --git a/src/services/scriptable/ScriptableServiceQueryMaker.cpp b/src/services/scriptable/ScriptableServiceQueryMaker.cpp
index 76dd799..be88f80 100644
--- a/src/services/scriptable/ScriptableServiceQueryMaker.cpp
+++ b/src/services/scriptable/ScriptableServiceQueryMaker.cpp
@@ -16,7 +16,7 @@
 
 #include "ScriptableServiceQueryMaker.h"
 
-#include "meta/support/MetaConstants.h"
+#include "core/meta/support/MetaConstants.h"
 #include "ScriptableServiceMeta.h"
 #include "ScriptManager.h"
 
diff --git a/src/services/scriptable/ScriptableServiceQueryMaker.h b/src/services/scriptable/ScriptableServiceQueryMaker.h
index 1f88b27..dd676e2 100644
--- a/src/services/scriptable/ScriptableServiceQueryMaker.h
+++ b/src/services/scriptable/ScriptableServiceQueryMaker.h
@@ -19,7 +19,7 @@
 
 #include "../DynamicServiceQueryMaker.h"
 
-#include "Meta.h"
+#include "core/meta/Meta.h"
 
 #include "ScriptableServiceCollection.h"
 
diff --git a/src/statusbar/StatusBar.cpp b/src/statusbar/StatusBar.cpp
index d8807d8..383c3e9 100644
--- a/src/statusbar/StatusBar.cpp
+++ b/src/statusbar/StatusBar.cpp
@@ -21,8 +21,8 @@
 #include "Debug.h"
 #include "EngineController.h"
 #include "LongMessageWidget.h"
-#include "support/MetaUtility.h"
-#include "capabilities/SourceInfoCapability.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/SourceInfoCapability.h"
 #include "playlist/PlaylistItem.h"
 #include "playlist/PlaylistModelStack.h"
 
diff --git a/src/statusbar/StatusBar.h b/src/statusbar/StatusBar.h
index 376f45a..b9245c6 100644
--- a/src/statusbar/StatusBar.h
+++ b/src/statusbar/StatusBar.h
@@ -22,7 +22,7 @@
 #include "EngineObserver.h"
 #include "MainWindow.h"
 #include "amarok_export.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 #include "statusbar/CompoundProgressBar.h"
 
 #include <KJob>
diff --git a/src/synchronization/OneWaySynchronizationJob.cpp b/src/synchronization/OneWaySynchronizationJob.cpp
index a6396e2..670663d 100644
--- a/src/synchronization/OneWaySynchronizationJob.cpp
+++ b/src/synchronization/OneWaySynchronizationJob.cpp
@@ -19,7 +19,7 @@
 #include "collection/Collection.h"
 #include "collection/CollectionLocation.h"
 #include "Debug.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 OneWaySynchronizationJob::OneWaySynchronizationJob()
         : SynchronizationBaseJob()
diff --git a/src/synchronization/SynchronizationBaseJob.cpp b/src/synchronization/SynchronizationBaseJob.cpp
index a7ed214..7e810ec 100644
--- a/src/synchronization/SynchronizationBaseJob.cpp
+++ b/src/synchronization/SynchronizationBaseJob.cpp
@@ -19,7 +19,7 @@
 #include "collection/Collection.h"
 #include "collection/QueryMaker.h"
 #include "Debug.h"
-#include "meta/support/MetaConstants.h"
+#include "core/meta/support/MetaConstants.h"
 
 #include <QMetaEnum>
 #include <QMetaObject>
diff --git a/src/synchronization/SynchronizationBaseJob.h b/src/synchronization/SynchronizationBaseJob.h
index 5770a23..9cd0a21 100644
--- a/src/synchronization/SynchronizationBaseJob.h
+++ b/src/synchronization/SynchronizationBaseJob.h
@@ -17,8 +17,8 @@
 #ifndef SYNCHRONIZATIONBASEJOB_H
 #define SYNCHRONIZATIONBASEJOB_H
 
-#include "meta/Meta.h"
-#include "support/MetaUtility.h"
+#include "core/meta/Meta.h"
+#include "core/meta/support/MetaUtility.h"
 
 #include <QHash>
 #include <QObject>
diff --git a/src/synchronization/UnionJob.h b/src/synchronization/UnionJob.h
index fd8b9ce..eb5c24d 100644
--- a/src/synchronization/UnionJob.h
+++ b/src/synchronization/UnionJob.h
@@ -19,7 +19,7 @@
 
 #include "SynchronizationBaseJob.h"
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QMap>
 #include <QPair>
diff --git a/src/timecode/TimecodeMeta.cpp b/src/timecode/TimecodeMeta.cpp
index 42a2e6d..77699dd 100644
--- a/src/timecode/TimecodeMeta.cpp
+++ b/src/timecode/TimecodeMeta.cpp
@@ -19,9 +19,9 @@
 #include "Debug.h"
 #include "covermanager/CoverFetchingActions.h"
 #include "covermanager/CoverFetcher.h"
-#include "capabilities/CustomActionsCapability.h"
-#include "capabilities/Capability.h"
-#include "capabilities/BoundedPlaybackCapability.h"
+#include "core/capabilities/CustomActionsCapability.h"
+#include "core/capabilities/Capability.h"
+#include "core/capabilities/BoundedPlaybackCapability.h"
 
 using namespace Meta;
 
diff --git a/src/timecode/TimecodeMeta.h b/src/timecode/TimecodeMeta.h
index d60ba1e..028cfb0 100644
--- a/src/timecode/TimecodeMeta.h
+++ b/src/timecode/TimecodeMeta.h
@@ -17,9 +17,9 @@
 #ifndef TIMECODEMETA_H
 #define TIMECODEMETA_H
 
-#include "meta/Meta.h"
-#include "capabilities/BoundedPlaybackCapability.h"
-#include "capabilities/EditCapability.h"
+#include "core/meta/Meta.h"
+#include "core/capabilities/BoundedPlaybackCapability.h"
+#include "core/capabilities/EditCapability.h"
 
 
 class QAction;
diff --git a/src/timecode/TimecodeObserver.cpp b/src/timecode/TimecodeObserver.cpp
index bf25119..e20c0f6 100644
--- a/src/timecode/TimecodeObserver.cpp
+++ b/src/timecode/TimecodeObserver.cpp
@@ -18,7 +18,7 @@
 
 #include "collection/CollectionManager.h"
 #include "Debug.h"
-#include "capabilities/TimecodeWriteCapability.h"
+#include "core/capabilities/TimecodeWriteCapability.h"
 
 
 const qint64 TimecodeObserver::m_threshold = 600 * 1000; // 6000000ms = 10 minutes
diff --git a/src/toolbar/CurrentTrackToolbar.cpp b/src/toolbar/CurrentTrackToolbar.cpp
index fe891d0..4acf337 100644
--- a/src/toolbar/CurrentTrackToolbar.cpp
+++ b/src/toolbar/CurrentTrackToolbar.cpp
@@ -18,7 +18,7 @@
 
 #include "EngineController.h"
 #include "GlobalCurrentTrackActions.h"
-#include "capabilities/CurrentTrackActionsCapability.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
 
 
 CurrentTrackToolbar::CurrentTrackToolbar( QWidget * parent )
diff --git a/src/toolbar/MainToolbar.cpp b/src/toolbar/MainToolbar.cpp
index c491eb5..8dff42a 100644
--- a/src/toolbar/MainToolbar.cpp
+++ b/src/toolbar/MainToolbar.cpp
@@ -31,9 +31,9 @@
 
 #include "browsers/collectionbrowser/CollectionWidget.h"
 
-#include "capabilities/CurrentTrackActionsCapability.h"
-#include "support/MetaUtility.h"
-#include "capabilities/TimecodeLoadCapability.h"
+#include "core/capabilities/CurrentTrackActionsCapability.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/TimecodeLoadCapability.h"
 
 #include "playlist/PlaylistActions.h"
 #include "playlist/PlaylistModelStack.h"
diff --git a/src/widgets/AlbumBreadcrumbWidget.h b/src/widgets/AlbumBreadcrumbWidget.h
index 9a71a00..f921af9 100644
--- a/src/widgets/AlbumBreadcrumbWidget.h
+++ b/src/widgets/AlbumBreadcrumbWidget.h
@@ -17,7 +17,7 @@
 #ifndef AMAROK_ALBUMBREADCRUMBWIDGET_H
 #define AMAROK_ALBUMBREADCRUMBWIDGET_H
 
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <KHBox>
 
diff --git a/src/widgets/BookmarkTriangle.cpp b/src/widgets/BookmarkTriangle.cpp
index 25cc226..484a48d 100644
--- a/src/widgets/BookmarkTriangle.cpp
+++ b/src/widgets/BookmarkTriangle.cpp
@@ -22,7 +22,7 @@
 #include "BookmarkModel.h"
 #include "Debug.h"
 #include "MainWindow.h"
-#include "meta/support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 #include "SvgHandler.h"
 
 #include <KLocale>
diff --git a/src/widgets/Osd.cpp b/src/widgets/Osd.cpp
index 5131159..75251e8 100644
--- a/src/widgets/Osd.cpp
+++ b/src/widgets/Osd.cpp
@@ -28,7 +28,7 @@
 #include "StarManager.h"
 #include "SvgHandler.h"
 #include "amarokconfig.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 
 #include <KApplication>
 #include <KIcon>
diff --git a/src/widgets/Osd.h b/src/widgets/Osd.h
index 0617fe4..2b1c568 100644
--- a/src/widgets/Osd.h
+++ b/src/widgets/Osd.h
@@ -19,7 +19,7 @@
 #define AMAROK_OSD_H
 
 #include "EngineObserver.h"
-#include "meta/Meta.h"
+#include "core/meta/Meta.h"
 
 #include <QImage>
 #include <QList>
diff --git a/src/widgets/ProgressWidget.cpp b/src/widgets/ProgressWidget.cpp
index 3ebcff2..a5aedfe 100644
--- a/src/widgets/ProgressWidget.cpp
+++ b/src/widgets/ProgressWidget.cpp
@@ -21,8 +21,8 @@
 #include "SliderWidget.h"
 #include "TimeLabel.h"
 #include "amarokconfig.h"
-#include "support/MetaUtility.h"
-#include "capabilities/TimecodeLoadCapability.h"
+#include "core/meta/support/MetaUtility.h"
+#include "core/capabilities/TimecodeLoadCapability.h"
 #include "amarokurls/AmarokUrl.h"
 #include "amarokurls/AmarokUrlHandler.h"
 
diff --git a/src/widgets/SliderWidget.cpp b/src/widgets/SliderWidget.cpp
index 998b16e..71dd1df 100644
--- a/src/widgets/SliderWidget.cpp
+++ b/src/widgets/SliderWidget.cpp
@@ -27,7 +27,7 @@
 #include "BookmarkTriangle.h"
 #include "Debug.h"
 #include "EngineController.h"
-#include "support/MetaUtility.h"
+#include "core/meta/support/MetaUtility.h"
 #include "SvgHandler.h"
 #include "ProgressWidget.h"
 


More information about the Amarok-devel mailing list