-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enable subsequent [re]downloads of playlists #151
Conversation
Fixes iiab#150, enabling subsequent [re]downloads of playlists
This prevents UNIQUE CONSTRAINT error
IIAB-DIAGNOSTICS - http://sprunge.us/SormHj?en All single single videos and playlists failing to download. https://www.youtube.com/watch?v=T3kDWpREiEI&list=PLoC8Q0moRTSjKkMZoVkAgHMJjkpUreleb&index=21e - single video |
Hi @EMG70. Reading your log, it looks like xklb-metadata.db is missing. Can you check by doing |
Or run this as root...
|
|
Line 1090 in your log says you don't have XKLB installed. How come you have the database and no XKLB installed? Weird! |
To confirm run: If it is found, do
|
Allow me to reinstall and try again in case i missed something |
Please go ahead, no worry. |
sorry a bit late now,VM destroyed. |
Looks good so far |
Plz post ideas(s) as to why the earlier XKLB install failed / disappeared, if possible? |
IIAB-DIAGNOSTICS - http://sprunge.us/tjeC5u?en Downloading and video ranking showing OK .Subsequent playlist downloads all failed no matter number of videos in playlist,however a single video downloads well. This playlist downloaded all 53 videos ok but failed on second attempt. https://www.youtube.com/playlist?list=PLr6-GrHUlVf96NLj3PQq-tmEB6woZjwEl |
I cannot reproduce your issue @EMG70, sorry. Both Playlists work for me, all videos were downloaded, except 1 (https://www.youtube.com/watch?v=7m4_kZOObzw). I am afraid you might be subject to some restrictions either by your ISP or YouTube itself |
You could be right.I have not done any testing since I changed ISP two weeks ago. |
We can and should arrange for @EMG70[*] to do the exact same test remotely (i.e. with a different ISP and different YouTube geographic restrictions) to confirm what exactly is happening and why. [*] And others too, if possible! @deldesir can you help spell out the exact steps of what most needs to be tested, to help everyone avoid ambiguity here? |
We're dealing with a download issue. We know we have a successful test if we provide 2-3 playlists one after the other and the following conditions are met for them:
|
Thanks for explaining. Are we also trying to test: repeatedly entering the same playlist URL? (i.e. clicking "Download to IIAB" each time, and entering the same YouTube playlist URL each time, a few times in succession) |
I looked into t5. Everything looks Ok. Can't spot the issue right now. I will delete xklb-metadata and run the playlists again. |
Thanks a lot for testing again. The UNIQUE constraint error is a database issue. I'll let you know more once I am done examining your log. |
Sorry did i post on wrong PR.I have just posted same on PR#150 |
IIAB-DIAGNOSTICS - http://sprunge.us/Kv2wBX?en |
For the 102 videos url (https://www.youtube.com/playlist?list=PL_c9BZzLwBRLVh9OdCBYFEql6esA6aRsi - 102 short videos in playlist) I also had 3 failed videos:
We have one in common: https://www.youtube.com/watch?v=4e3dIeP93E8 When I forced the redownload of any failed video I got the UNIQUE constraint failed: media.path error. It's because : |
Redownloading a playlist twice still doesn't work as expected. This will require some adjustments for sure. Hope I fix it today or tomorrow so Ed can battletest it. |
@EMG70 and @holta, I just got 100% success downloading and redownloading https://www.youtube.com/playlist?list=PL_c9BZzLwBRLVh9OdCBYFEql6esA6aRsi. What changed? No code additions, I only updated my branches based on iiab:master and resolved 2 merged conflicts that led to the closing of #146. I also notice the VM where failures from redownloading happened did not have this commit d9e4fc4. Examining the [ xklb-metadata.db ] confirmed this because the downloaded playlists do not have any timestamps added to them. |
@deldesir what do you suggest? |
I'd like a second look into this. I want to be sure this works for @EMG70 too. |
Thanks @deldesir: Please make a recommendation if additional testing is required? |
A clean test environment @holta.
|
I will test tomorrow and update you. |
IIAB-DIAGNOSTICS - http://sprunge.us/Rf3QgC?en
The second video that failed https://www.youtube.com/watch?v=NBRdd18N5X0 was also tried individually and still returned a failed output in Task ( failed to download:UNIQUE constraint failed.media.path). |
Happy this is getting more robust. Thanks @EMG70. The UNIQUE constraint failed.media.path is not difficult to tackle. It's because the stuck videos are not post-timestamped. I'm looking for an elegant way to fix it 🤔. |
Fixes #150. This PR adds a timestamp to playlists' paths after they are downloaded.
[ 2024-05-30 SUMMARY: xklb generally does not support subsequent redownloading of playlists, so let's try this workaround! ]