Bug 127473 - amarok collection does not handle removable HDs well
Summary: amarok collection does not handle removable HDs well
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4-beta3
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 22:19 UTC by Gioele Barabucci
Modified: 2008-10-10 18:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gioele Barabucci 2006-05-16 22:19:04 UTC
Version:           1.4-beta3 (using KDE 3.5.1, Gentoo)
Compiler:          gcc version 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8)
OS:                Linux (ppc) release 2.6.16-gentoo-r4

Hello,

I have two directories full of music files, one on my laptop HD and another one on my external HD (ext3).

Often my external HD is not attached, so the collection is rebuilt. When I want to play one of the file that is in the external HD I have to rebuild the collection once again. And this is a problem as Amarok takes ten or more minutes to build the complete collection.

Is it possible for Amarok to notice that a certain directory is not currently available, because it is under a mountpoint, and just don't show the files instead of rebuilding the collection?

This should be simpler to implement than bug 87391.
Comment 1 Peter C. Ndikuwera 2006-05-17 15:56:21 UTC
Simply un-check the option to "Watch folders for changes"?

Then, missing files will be skipped over when you try to play them, but your collection will not be rebuilt.

If you add files, you can run "dcop amarok collection scanCollectionChanges" from the command line to import them into the database.
Comment 2 Maximilian Kossick 2006-11-05 11:42:31 UTC
implemented by Dynamic Collection
Comment 3 Caleb Jones 2007-06-09 22:22:39 UTC
I don't think you should have to un-check "Watch folder for changes" and then have to manually invoke a collection update every time you add media in the future to avoid this problem.  In general, it seems to be a bad policy to wipe out the collection database without user input simply because the files aren't found (at least that's the behavior I'm seeing).  I'm sure many people point amarok to a remote resource (whether it be external HDs or network drives) and amarok could be a bit more intelligent about when it wipes out the collection database.

A possible solution could be to prompt the user before updating the collection if it seems like the collection is unavailable or has moved.  This way, the user would have time to check mount points and could come back and tell amarok  whether to try again or to run the collection wizard.  If the user wishes to proceed with the collection wizard and specifies a new location, before deleting anything in the collection do a quick scan to see if it is the same collection (but has just moved).  This way someone could move their collection and amarok could pick up on the move quickly with out rebuilding the entire collection.

My scenario is I have a large mp3 collection on a remote resource (samba).  I am using smb4k to mount the samba folder (on startup) and point amarok to the mounted location for its collection.  If I ever start amarok when the samba folder isn't mounted amarok seems to completely remove my collection (since it can't be found).  When I shut down amarok, mount the samba share, then restart amarok it proceeds to rebuild the collection from scratch.

Is anyone else seeing this?  Does the above solution seem reasonable?
Comment 4 Isum 2008-07-04 02:13:26 UTC
     I have the exact same problem. I have a USB HDD that goes into standby after ten minutes of inactivity (and there's no way to change this as far as I know). Amarok loses my collection every time I start it back up if the HDD is in standby. To rebuild my collection, I have to go into Dolphin and click on the HDD icon to get it to come out of standby and then rescan.
     I think the solution in the previous comment is reasonable. But I would also hope there is a way to design a feature in Amarok so that it will try to "contact" the HDD to pull it out of standby before even asking whether or not the drive is missing.
Comment 5 Caleb Jones 2008-07-04 03:09:21 UTC
"But I would also hope there is a way to design a feature in Amarok so that it will try to "contact" the HDD to pull it out of standby before even asking whether or not the drive is missing."

Isum, you could do this with a cron job.  Something like:

* 0 0 0 /bin/touch /dev/usbhd/some/file.txt >> /dev/null

Would 'touch' a file on the USB hard drive every minute which should keep it active.
Comment 6 Casey Link 2008-07-04 04:48:55 UTC
"Amarok loses my collection every time I start it back up if the HDD
is in standby. "

In Amarok 2 this will/does not happen. Instead it will complain it
can't find the tracks, but it doesn't lose any information.
Comment 7 Dario Panico 2008-10-10 18:53:53 UTC
in amarok2 this happens
my entire collection is on an apple timecapsule and i have to rescan my collection every time
the most annoying thing is that when i create a plylist and i reload it (even after rebuilding my collection) there are no infos about my tracks, neither tag or stats