rivenmedia / riven

Handle your Media Library with ease!
GNU General Public License v3.0
296 stars 43 forks source link

[BUG REPORT] Symlinks pointing to incorrect directories #593

Open ramphex opened 1 month ago

ramphex commented 1 month ago
root@Plex-VM:~/Docker/Riven# cd /mnt/zurg/__all__/Land\ Of\ Bad\ -\ 2024\ -\ HMR/
root@Plex-VM:/mnt/zurg/__all__/Land Of Bad - 2024 - HMR# ls -l
total 9443451
-rw-r--r-- 1 root root 9670093464 Feb 16 20:28 'Land Of Bad - 2024 - HMR.mkv'
root@Plex-VM:/mnt/zurg/__all__/Land Of Bad - 2024 - HMR# cd /mnt/riven/movies/Land\ of\ Bad\ \(2024\)\ \{imdb-tt19864802\}/
root@Plex-VM:/mnt/riven/movies/Land of Bad (2024) {imdb-tt19864802}# ls -l
total 4
lrwxrwxrwx 1 root root 75 Aug  2 17:42 'Land of Bad (2024) {imdb-tt19864802}.mkv' -> '/mnt/zurg/__all__/Land Of Bad - 2024 - HMR.mkv/Land Of Bad - 2024 - HMR.mkv'
root@Plex-VM:/mnt/riven/movies/Land of Bad (2024) {imdb-tt19864802}# 

The correct directory in Zurg is: /mnt/zurg/__all__/Land Of Bad - 2024 - HMR/

Riven creates a symlink pointing to directory: /mnt/zurg/__all__/Land Of Bad - 2024 - HMR.mkv/

This results in no video being added to Plex due to a broken symlink.

ZombieApps commented 1 month ago

That's not riven's fault, it's zurg renaming the directory after riven's already created the symlink. By default zurg will remove the directory's extension (.mkv) and often also renames the directory to add codec information.

Most of the time this rename happens quick enough that riven doesn't see the old directory name, but if riven is quick enough (or zurg is slow enough) then you get broken symlinks like that.

You need to change these settings in your zurg's config.xml

retain_rd_torrent_name: true
retain_folder_name_extension: true

But it will break most of your existing symlinks - any directory where the torrent name has an extension and zurg helpfully removed it. They will be back when you restart zurg with the new settings.

ramphex commented 1 month ago

Would it be better to slow down Riven instead, or have it anticipate the rename?

ZombieApps commented 1 month ago

I think it's better to pass through the original torrent name.