geigerzaehler / beets-alternatives

Beets plugin to manage external files
MIT License
93 stars 21 forks source link

File exists during link of paths using symlink mode #65

Open aereaux opened 3 years ago

aereaux commented 3 years ago

Not sure how much the symlink mode is used, but I'm encountering a couple problems with it. The most reproducible is this one: Error: File exists during link of paths /home/user/music/beets/classical/William Walton; Royal Philharmonic Orchestra, André Previn/Symphony no. 1 _ Orb & Sceptre _ Crown Imperial/05 Crown Imperial.flac, /home/user/music/beets/classical-works/Walton, William/1937 - Crown Imperial/Royal Philharmonic Orchestra, André Previn/05 Crown Imperial.flac As far as I can tell I think this happens when the source file has changed.

Here's my config section:

  works:
    directory: classical-works
    paths:
      default: "%ifdef{parent_composer_sort,$parent_composer_sort,%if{$composer_sort,$composer_sort,[No composer]}}/%ifdef{parentwork_date,$parentwork_date,[No date]} - %ifdef{parentwork,$parentwork,[No work]}/$parentwork_artist/$track $title"
    query: "genre:classical"
    formats: link
wisp3rwind commented 3 years ago

Hi! Your report is rather sparse in details on your setup, could you provide versions for beets and beets-alternatives? The full configuration file might also be useful.

Is it correct that the steps to reproduce are: 1) Modify some data (e.g. beet mod <query> parentwork=foobar) 2) beet alt update works

Maybe you could try whether such a small modification (using beet mod) of the metadata (which shouldn't have any other side effects) is sufficient to trigger the issue?

In any case, you could well be right that symlink mode isn't in perfect shape: It is covered by our testsuite, but at least I personally have never used it, and I think most posts on this issue tracker are also about the "external files" mode.

aereaux commented 3 years ago

Thanks for the quick response! Yeah, sorry, I wasn't entirely sure what all to include in the report.

Versions of packages: beets-git 1.4.9.r1031.gcbc045f1-1 beets-alternatives 0.10.1-1.1

I noticed that I wasn't using the latest version of this package, which looks like it includes a fix for symlink problems like the ones I've been having. I'll try to see if that fixes it.

wisp3rwind commented 3 years ago

This might also be related to https://github.com/geigerzaehler/beets-alternatives/issues/49 if you removed those items from the library and then added them again (doing a re-import would probably have the same effect).

aereaux commented 3 years ago

Thanks, but I don't think it's that, I haven't removed items from my library in a long time.

daviddavo commented 3 years ago

I have the same problem, but I think it's because of my syncing setup. I think the easiest solution would be to add a --force or --replace option that replaces the file if it exists