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

Add playlist urls to --download-archive #26487

Closed
james28909 opened this issue Aug 31, 2020 · 3 comments
Closed

Add playlist urls to --download-archive #26487

james28909 opened this issue Aug 31, 2020 · 3 comments
Labels

Comments

@james28909
Copy link

@james28909 james28909 commented Aug 31, 2020

I recently just deleted my entire library by mistake. I must have hit a key when I went to get up to use the bathroom somehow. I didn't even notice till I got back and went to download another playlist. I went to the folder and there was nothing there (ohhell.jpg).

I was recently told about the -a option, and while that would work to get my files back, it will not preserve the folder structure I had before, and instead puts everything in a "NA" folder.

I was using format specifiers to create folders and filenames - /%(playlist)s/%(title)s.%(ext)s - and using the -a option with this output specifier, it does not work and just slaps all the videos in a "NA" folder. As opposed to the %(playlist)s "baseball" being the folder name and all videos in the playlist getting put in the "baseball" folder.

There has got to be a way we can add playlist urls to the download-archive file, or is there a way I can reverse search the individual url and get the playlist name?

Actually, come to think about it, why not just put individual urls and playlists urls in the download archive?

When I download my favorites, the playlist will be "favorites", which /%(playlist)s/%(title)s.%(ext)s would create a folder named "favorites" and put all your songs in there. And if you need to put a individual video somewhere else, just specify it in -o.

I guess what I'm trying to say is that putting individual urls for videos that are in playlists is kind of punching yourself in the face when you use format specifiers to create folder structures

@james28909
Copy link
Author

@james28909 james28909 commented Aug 31, 2020

Sorry for spamming my own comment here but, could you just change all instance that have to do with parm-download archive that assert "vid_id" to "playlist_id" or "playlist_title".

Would it really be that easy? And I can download this code as is and run it right? I use the compiled executable but don't mind installing python to make these few changes, would be cool if the official youtube-dl exe had the functionality I talk about in my original post.

And doing this one thing enables a end user to redownload any missing videos in their library, like if they accidentally moved the video instead of copied, or hit delete somehow when they got up to go #2 LOL. Then all they would need to do is youtube-dl -o "C:/videos/%(playlist)s/%(title)s.%(ext)s" -I -f best -a "path/to/archive.txt"

then they could have it all download again and preserve folder structures instead of jamming it all in one folder

EDIT: actually, on top of adding playlist urls, you would need to implement a check to see if the file exists as well, and if not then download it again.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 31, 2020

The purpose of download archive is to track already downloaded media by id. This has nothing to do with playlist URLs or what ever.

@dstftw dstftw closed this Aug 31, 2020
@dstftw dstftw added the invalid label Aug 31, 2020
@james28909
Copy link
Author

@james28909 james28909 commented Aug 31, 2020

The purpose of download archive is to track already downloaded media by id. This has nothing to do with playlist URLs or what ever.

OK but don't you think it would still be a good idea to do as the title of this thread says and add actual playlists urls to the archive file? The rest can be handled without youtube-dl but ADDING PLAYLIST URLS to the archive file just makes sense. Because even then you won't have to skip video by video, you can also skip playlists as well

I mean if --download-archive is specifically for keeping track, why not add playlist urls as well? :confused shrug:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.