Comment 3 for bug 153054

Revision history for this message
tobyS (tobias-schlitt) wrote :

Hi!

I'm suffering the same problem. In addition, you have that problem if you mount parts of your collection from the network (e.g. when you're at home) and have that drive unavailable sometimes (on the road).

Currently Exail seems to mess up, if some files are occasionally missing from the known collection. I can't find several titles anymore after running exail without having m external drive not mounted. Others are kept in the collection.

Without knowing too much of Exailes code base (sorry, I'm not a Pythoneer) I would suggest the following solution: Allow users to define which directories of a collection are "dynamic".

In this case users can define which parts of a collection can disappear suddenly, due to dynamically mounted drives. This can happen in the library manager and while importing a directory initially. If Exaile determines that the defined directory does not exist (by frequent checking during runtime), I'd suggest to mark the affected titles grey and simply ignore them for playing. Removing them completly from the collection/playlists view sounds not like a good solution to me, since meta-data is still available from the DB and the user gets a clear view on which files he currently misses.

Knowing that a library directory is completly missing (empty or simply gone) also allows Exaile to determine if a song is "gone" (in terms of being deleted) or just "temporarely unavailable" (in terms of residing on a not mounted drive). If a whole base-library-directory is empty or unavailable this means that the dynamic drive is not mounted. If just a single song is missing, this means the song is deleted. Removal of dynamic library directories can still work through the library manager.

Exaile would need to check the state of its dynamic library directories from time to time during runtime (e.g. every 10 secs) to update the song states in the database. The SQL for marking songs as "available" and "unavailable" should be easy and efficient. I did not check, but it might be possible to determine dynamic directories via DBUS and also assign to DBUS signals to be informed of the appearance and disappearance of dynamic drives/directories.

Thanks to anybody working on this! Hope my design ideas could help.