-
-
Notifications
You must be signed in to change notification settings - Fork 53
Add trackVideoIDs #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add trackVideoIDs #243
Conversation
…wnloaded previously and not download again, even if video had been moved, renamed or deleted.
|
Haven't had the chance to review this yet. But instead of using a muxed flag just check |
|
Doesn't muxedBytes appear at the start of muxing, not at the end? If I do that instead of a flag I think that would mean that if the code is stopped during muxing it will assume that muxing was completed and leave it as a .partial. |
|
No muxedBytes is the final size after muxing. Ooh, actually yea muxedBytes does track the expected size while downloading I think. Good catch |
|
Thanks, I think you might have been thinking of muxedBytes in const muxedBytes = await Video.pathBytes(this.muxedPath); |
|
I think a better approach to this is instead to add a option to skip videos that have muxedBytes set but a missing file. Since that scenario should only occur if a user has explicitly changed a file. And if someone wants to recover they can just disable it. This simplifies things a lot as atm the current solution is a bit over complicated. As for where this fix would go, probably at the top of the download method if I had to guess. |
|
Yea ima close this, could you implement what I mentioned above in a seperate pr? ❤️ |
|
Yeah I'll do that, but instead of the download method wouldn't it be simpler to put it in getState since all of the logic for checking bytes is already there? |
|
You could but since it's abnormal functionality triggered by a extra feature it'd make more sense to have it explicitly seperate at the top of the download method, which would allow for both logging that it's being skipped for that reason, and avoiding downloading subtitles, artwork etc. |
Fixes #241 by adding a setting called
trackVideoIDsthat can track if a video has already been downloaded and not download it again, even if the file has been moved, renamed or deleted.This works by adding a new value to
attachments.jsoncalledmuxedthat is set to true once the video has been fully downloaded and muxed. Ifmuxedis true the program will just treat that video as muxed, even if it can't find it.However, if a video file is moved or renamed this won't be able to delete it after
daysToKeepVideos.