Skip to content
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

从1.0迁移的指引? #66

Closed
lemonhall opened this issue Apr 19, 2024 · 3 comments
Closed

从1.0迁移的指引? #66

lemonhall opened this issue Apr 19, 2024 · 3 comments

Comments

@lemonhall
Copy link

我最近正在学rust

up主能否给一个从1.0迁移的指引?我视频数实在太多,折腾不起,需要平滑迁移

比如:

1、数据库的迁移指引,我自己写个脚本,把1.0的数据库迁移到2.0都可以

@amtoaer
Copy link
Owner

amtoaer commented Apr 19, 2024

暂时没有很好的解决方法,目前想到的方案是加上一个 --scan-only 之类的参数,加上这个参数后仅写入数据库记录,不触发实际下载。
等一次扫描结束后,停止程序,手动打开旧数据库查看已下载视频中最大的 favtime,然后将新数据库中所有 favtime 小于等于那个值的视频标记为失效,这样程序后续运行就会认为这些已经下载过的视频是失效的,从而避免下载。
但不管怎样这个迁移都不算平滑,如果你觉得这样可以接受,那我后面抽空实现一下这个参数。

@lemonhall
Copy link
Author

可以的可以的,我是所有视频都放在一个收藏夹里,所以量很大

那我等一下,十分感谢。。。。

@amtoaer
Copy link
Owner

amtoaer commented Apr 25, 2024

麻烦尝试一下 2.0.1 的 scan-only 参数是否能解决问题,有问题的话再重新打开。

@amtoaer amtoaer closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants