Amarok updating collection concolidating
For this to work, we need ways to identify devices.Some ideas: "Plugins" is probably the first thing which comes to one's mind when reading that list.It is not going to work if the search string matches a part of the mount point.We can restrict all SQL queries to the songs which are currently available by adding device Id IN (We might think about introducing an INTEGER primary key field to the tags table while we are refactoring amarok's SQL queries anyway.When you use a third party app or manually add files to your music collection it/you append lines to this file listing the directories that have been updated.3.The plug-in monitors this file and causes Amarok to add these files to the collection.4. Perhaps a simple "-" token at the beginning of the line can tell the plug-in that the directory or files in it were removed instead of added or updated.Ok, I have looked at the available DCOP functions that could possibly scan Collection()No Good.Rescans the whole scan Collection Changes()No Good. Scanning for changes does not work for all file systems and operating migrate File( QString old URL, QString new URL )No Good.
Dynamic collection is the working title I just invented for a project to improve the way Amarok identifies the tracks in its collection (feel free to propose others). Please note that this is only about including files which are not on a local disks in Amarok's local collection DB in a better way.Generally, the existence of the dynamic collection can be hidden in the persistence layer to a very high degree.Everywhere where Amarok uses the URL or directory return value, we have to add the device id field as return value.Each URL can be split into two parts, a first part which identifies the device a file is stored on, and a second part which gives the relative path of the file on that device.Amarok can then automagically generate a unique identifier of the device and store that identifier together with the relative path in the collection database.
It is not about actually using remote collection databases.