This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Feature Request: Plugin for Updating Collection

Tags: None
(comma "," separated)
Rocketman
Registered Member
Posts
5
Karma
0
I have idea for an Amarok  plug-in. Perhaps somebody would be interested in writing one.

1. Have a simple flat file placed in a know location.

2. 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. The plug-in then removes the line from the file.

5. 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.
User avatar
marcel
Registered Member
Posts
595
Karma
0
OS
No plugin needed for this, take a look at the dcop interface (e.g., in the Wiki), it is all there already.
Rocketman
Registered Member
Posts
5
Karma
0
Ok, I have looked at the available DCOP functions that could possibly work.

void scanCollection()
No Good. Rescans the whole collection.

void scanCollectionChanges()
No Good. Can't specify the directory to import. Scanning for changes does not work for all file systems and operating systems.

void migrateFile( QString oldURL, QString newURL )
No Good. File not in the collection yet.

void moveFile( QString oldURL, QString newURL, bool overwrite )
Has Potential as long as it will work specifying QString oldURL = QString newURL and overwrite = False.
The files are already in the right location, I just want them added to the collection.

Any ideas on other calls I could use.

I will have a go at writing a DCOP script to do what I want and publish it here if I succeed.

Update: I have tested all the functions and none of them add the file to the collection. For example, using moveFile I can get my script to actually move a song from an import directory to the correct directory in my collection but it does not add the file to the collection.

It seems like my only option is to look at SQL queries that will explicitly add the file to the collection.

Last edited by Rocketman on Wed May 14, 2008 11:24 pm, edited 1 time in total.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell