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

Amarok & Symlinks

Tags: None
(comma "," separated)
Horus
Registered Member
Posts
296
Karma
0
OS

Amarok & Symlinks

Sun Jan 10, 2016 10:58 am
Hello,

I just tried the git annex indirect mode, which replaces every file by a symlink to the actual file. The actual file is stored in a git repo named after its hash.

Code: Select all
Max Greger - Tequila.mp3 -> ../.git/annex/objects/m5/Mp/SHA256E-s3058837--b8d112fd75cab14a9b5800af868bd1e9d106f9134a3187cd21972adb0dd1ecfd.mp3/SHA256E-s3058837--b8d112fd75cab14a9b5800af868bd1e9d106f9134a3187cd21972adb0dd1ecfd.mp3


Basically Amarok works with that, however I was very surprised the way Amarok handles these symlinks. It resolves them to thier real name thus the name they point to. For a unix tool that is very non-standard. Tools that work with file content should not care if a file is a symlink or not.

E.g. I drag a symlink to Kmail, the file attached to the mail is named after the symlink, not the file it points to.
I play a music file using vlc, the symlinks target is nowhere to be found.

If a file does not have tags, Amarok tries to guess the title from the filename. Which worked great, but now fails, since it tries to guess it from the target, which is the hash.

Another side effect is that all cover images of a playlist are gone after Amarok startup, but they are still in the collection. When I repopulate the list, they are there again. Just a minor issue...

Is there any rationale for this non-standard behavior?

BTW, I have set
Code: Select all
[Collection]
DynamicCollection=false

iirc to work around some other Amarok / Symlink related problem

Best Regards...

EDIT: I just noticed that kate also resolves symlinks. There is an old bug report about that https://bugs.kde.org/show_bug.cgi?id=219634 which claims it's a framework issue. Is that true about Amarok, too?
Horus
Registered Member
Posts
296
Karma
0
OS

Re: Amarok & Symlinks

Sun Jan 10, 2016 11:14 am
Ok, CollectionScanner.cpp:257 explicitely resolves the link
Code: Select all
      const QFileInfo &f = fi.isSymLink() ? QFileInfo( fi.symLinkTarget() ) : fi;


Bookmarks



Who is online

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