[Nepomuk] Dolphin, nepomuk, trash:/

Evgeny Egorochkin phreedom.stdin at gmail.com
Wed Nov 18 21:15:09 CET 2009


В сообщении от Среда 18 ноября 2009 19:49:31 автор Jamboarder написал:
> When I move files around in Dolphin in KDE 4.3 the corresponding
> resource in nepomuk is updated reflect the new location.  Very cool,
> since all the semantic data follows the resource.  I was pleasantly
> surprised when I moved a music file and Bangarang (media player)
> already "knew" about it. I'm assuming Dolphin does this location
> updating, but I haven't really looked at the code in Dolphin.  In any
> event, the same happens when data is moved to the trash.  When the
> trash is emptied or the file is shift-deleted, the resource, with its
> last location, remains present in nepomuk.
> 
> I encountered this
> last night while coding the "identify missing media files"
> functionality in Bangarang.  The use-case goes something like this:
> - User deletes/moves-to-trash music files that are no longer wanted.
> - Opens media player to see updated music library with deleted files
>  identified/no longer shown.
> 
> I
> decided to simply identify any media resources with a location
> "trash:/.." as missing. That solves my problem, but I thought it might
> be worth asking:
> - Should files moved to trash:/ have their
> resource locations not updated or deleted in nepomuk?  I can see how the
>  information panel showing semantic info like rating and tags for trashed
>  items might help the user decide to un-trash an item.

Nepomuk has explicit support for trash files: trash is another container for 
files from the POV of nepomuk, which means trash files should keep their 
original metadata.

> - Should files
> emptied from the trash or shift-deleted have their resources deleted
> from nepomuk?  I'm thinking yes, since the nepomuk wouldn't be littered
> with files that no longer exist.  I just wonder if there might be some
> semantic data (download history?) that's useful even after a file is
> deleted.

This isn't as straightforward.

If user deletes an mp3 file, it does make sense to stop storing technical data 
such as bitrate or duration. However if the user tags the song as "utter s*", 
it makes sense to keep the rating + artist, title etc.

Thus if the user encounters the song later, he instantly knows to not touch 
it.

> Just a few thoughts I hope are constructive,
> Andrew Lake
> 


More information about the Nepomuk mailing list