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

Add Files To Collection

Tags: None
(comma "," separated)
Rocketman
Registered Member
Posts
5
Karma
0

Add Files To Collection

Sat May 03, 2008 5:29 pm
Currently Amarok has a "Copy files to collection" and a "Move files to collection" option.

Both of these option in effect want to crate a new folder for the music before adding the files to the collection.

What I would like is a simple "Add files to collection" or "Import files to collection" option that just imports the file details into the database without modifying the file system at all.
User avatar
dangle_wtf
Moderator
Posts
1252
Karma
0

Re: Add Files To Collection

Sat May 03, 2008 8:13 pm
If you simply put the music in a directory that Amarok is watching, and make sure you have "watch folders for changes" enabled in Amarok's settings, the tracks will be added to your collection automatically.


"There are two theories to arguing with women. Neither one works."
.
If men could get pregnant, we'd learn the true meaning of "screaming nancyboy wuss"
Rocketman
Registered Member
Posts
5
Karma
0

Re: Add Files To Collection

Mon May 05, 2008 3:08 pm
I am running a dedicated music player in my lounge using Amarok under FreeBSD 7.0 and KDE 3.5 with the ZFS file system and PostgreSQL.  I use a Samba file share for updating my music collection from my desktop machine.

Unfortunately directory change monitoring does not work the same under FreeBSD as it does under Linux and so the changes are not picked up automatically in a reliable manner.

I have complied Samba with file alteration support monitoring and have ticked the "Watch folders for changes" option in Amarok.

A while ago tried enabling FAM (File Alteration Monitor) support in FreeBSD but it did not seem to help.
See: http://oss.sgi.com/projects/fam/index.html

I will give the FAM daemon a try again as I see libfam is now in the Amarok dependency list. The problem I see with using FAM is that FAM only monitors sub-directory deep. For example if your directory structure looks like this:


-music+A+ArtistA1+Album1
      | |        +Album2
      | +ArtistA2+Album1
      |          +Album2
      +B-ArtistB1+Album1
                +Album2

Then setting "music" as the monitoring point is useless as changes would only be detected at the "A-B-C" level and not at the Artist or Album level.  Even creating many monitoring points at the "A-B-C" etc. level would not help because changes at the album level would not be picked up.

Perhaps one of the developers that added libfam support to Amarok can enlighten us to how it is being used in Amarok.

Update: I see Amarok is actually using gamin, a modified version of FAM.

Then there is another subtle issue with using directory monitoring to update the Amarok library. Amarok will only pick up changes to a directory if it is running when new files are added. If no one is logged in and running Amarok at the time the files are added via the Samba share, Amarok will not pick up the changes. Perhaps a daemon needs to be run on the box that specifically monitors the selected directory structure and can notify Amarok of any changes when it is fired up.

For now the only reliable way I can keep my library up to date is to rescan the whole collection every time I add new music. I really need a simple "Add folder" option.

I am also trying to work out what the "Update collection" option in Amarok does as under FreeBSD it seems to do nothing. I would have expected that it does a quick scan of the file system and only adds changes to the collection database.

Update: Looking at the Amarok database I found the "directories" table. This table seems to be storing a list of all the directories in the collection together with a last modified time stamp. I noticed that the table does not have a primary key so I added one. Since then "Update Collection" function now works. It quickly scans the collection and picks up new or changed albums.

This may be pure coincidence but if it works reliably my problem is solved. I will give it a good test.

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


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed, Sogou [Bot]