File linking fails
elythh opened this issue · comments
Describe the bug
File linking error in logs
To Reproduce
Steps to reproduce the behavior:
Simply upload a file
Expected behavior
The file to be indexed and moved to the processed folder
Additional context
Here are the logs i get
2023-01-27 22:50:26,069 INFO cli.scan_videos:96 | Linking ../../videosothersXXXX .mp4 --> /processed/video_links/16d7862b7fbec9e08addcdf94cf14fd1.mp4
Traceback (most recent call last):
File "/usr/local/bin/fireshare", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/fireshare/cli.py", line 262, in bulk_import
ctx.invoke(scan_videos)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/fireshare/cli.py", line 98, in scan_videos
os.symlink(src, dst, dir_fd=fd)
OSError: [Errno 95] Operation not supported: '/videos/others/XXXXX.mp4' -> '/processed/video_links/16d7862b7fbec9e08addcdf94cf14fd1.mp4'
My docker-compose
fireshare:
container_name: fireshare
image: shaneisrael/fireshare:latest
ports:
- "8887:80"
volumes:
- ${CONFIG_DIR}/fireshare:/data
- ${MEDIA_DIR}/library/clips/processed:/processed
- ${MEDIA_DIR}/library/clips/pending:/videos
environment:
ADMIN_USERNAME: ${ADMIN_USERNAME}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
SECRET_KEY: XXXXXX
MINUTES_BETWEEN_VIDEO_SCANS: 5
PUID: ${PUID}
PGID: ${PGID}
First off, the /processed volume should probably be under your ${CONFIG_DIR}, or at the very least not in your media directory. Processed is where all the metadata like thumbnails and symlinks go. Fireshare never moves or modifies your video files from their original locations.
When you upload a video file, that video is placed in an uploads directory located in the /videos volume. So in your case, any videos you upload would be located at ${MEDIA_DIR}/library/clips/pending/uploads
So I would first fix your volume map setup and try again. If the linking is still having an issue, make sure your uploaded file is actual a .mp4 video file. This might not be an issue with the uploaded file either, it could be a different file in your ${MEDIA_DIR}/library/clips/pending
directory, make sure ONLY video files are in that directory else the scan will error.
Thank you !
Indeed I fixed volume mapping and now it works perfectly.
- ${CONFIG_DIR}/fireshare:/data
- ${CONFIG_DIR}/fireshare/processed:/processed
- ${MEDIA_DIR}/library/clips:/videos