ShaneIsrael / fireshare

Self host your media and share with unique links
GNU General Public License v3.0
642 stars 39 forks source link

Video link broken after moving directories #256

Closed Korgen1 closed 1 week ago

Korgen1 commented 2 weeks ago

Describe the bug A clear and concise description of what the bug is.

Moving videos to a different directory ends up creating broken links

To Reproduce Steps to reproduce the behavior:

  1. Upload a video to the fireshare video directory
  2. move that video to a different subfolder, or delete/copy it
  3. scan library

Expected behavior A clear and concise description of what you expected to happen. The video should be linked properly, instead it seems to use the old link despite that link now returning a 404, and the video is unplayable

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

The issue persists no matter what I have tried.

I tried fully deleting the videos from Fireshare itself, and then re-uploading, it still uses the same dead video link. I also tried deleting the videos and then restarting the fireshare instance, when uploading the videos, it won't generate the link to the new directory.

Korgen1 commented 2 weeks ago

Seems like I was able to reach a temporary fix by deleting the files corresponding to the dead video links in /dev_root/fireshare_processed/video_links/

ShaneIsrael commented 2 weeks ago

Yes, the way fireshare works it does not expect your videos to move. It will always generate the same unique link for a video even if you re-upload it or even put it in a different folder.

So if you want to move your videos you can, but you then need to go into Fireshare and delete the entries labeled "missing" via the user interface. That way the records for those old entries get removed from the database correctly.