LiveStreamDVR
LiveStreamDVR copied to clipboard
Add rclone support for moving files
It would be nice to have older VODs automatically be moved to different storage. rclone supports many different file providers and I believe this would work best for this feature.
i thought about this when adding ftp support, never used rclone myself so don't really know how it works, but should be possible
https://github.com/sntran/rclone.js
tiny package it seems like, not really trusting that... i'd rather just use exec like the others
rclone also has a built in API if you'd prefer to access it that way.
seems to work, cool program with those remote profiles. place rclone.conf in config and specify in the exporter
Weird, pulled the new update from the development branch and I'm not seeing the rclone option.
are you using the vod or file export menu? because i haven't synced the options on the latter for a while
I see now, but I don't understand the directory and remote fields, can you explain them?
directory is where on the remote storage you want the file to be stored
remote is the profile you set up via rclone config
, you call it something there and then use that inside the exporter
i have only tested this with sftp, not sure if others make separate files
Ah, I'm an idiot, the Docker container didn't have rclone installed.
i knew i forgot to add something...
Would love some automation with this. Something like a default exporter per channel with a default folder and a default export age. So a cron would check for files created more than x days ago, then export them and then delete them. You can also use rclone move instead of copy which moves the file, checks that the file has been moved, and then deletes the original. Would also be nice to see this reflected somehow in the UI showing that the file is no longer local.
I also understand this is a lot of work you're putting in so if you have a donation link or something, please let me know!
i'd need to plan out something, but a status showing whether something has been exported could be useful.
thanks. i've been hesitant to make a donation page because of the need for filing taxes, but i guess i could manage. https://ko-fi.com/mrbrax
Wish I could send more. Love the project!
Just checked my FTP server and it seems a single quote is being added somewhere that is creating a directory for it on the remote server: https://i.tony.pm/cBL4pqN.png
Possibly? on this line https://github.com/MrBrax/LiveStreamDVR/commit/977ec8259c2a9a337d8f12e1f47ce19011facaa6#diff-dff74dead61bd3c29d8b26e594cf34f04b7aef20985271a25f448fbcf60cbfe2R39
probably, but escaping the paths is janky as hell, sometimes it works when it's not escaped and sometimes it doesn't, so i check it beforehand
i can't really find a good test ftp server, probably since nobody really uses it anymore
Just to clarify, SFTP via rclone is where I'm running into the issue. I have a 20TB Hetzner Storage Box in Germany to back up all of my files. In the hosting industry, they're used often.
Also, adding a button per channel would be nice since rclone supports just passing an entire directory.
oh ok so not plain ftp then.
i'll probably focus on being able to export a single vod folder instead of just the video file, having a mass option depends on how that will be implemented