Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Save Library File #1880
Save Library File #1880
Comments
|
Have you looked into the I'm closing this issue now, but feel free to comment. Please make sure to check all the points in our issue reporting checklist, in particular the context part. |
|
It will be good if you can build a DB of all the files you have with where you downloaded if from, where it is stored, original name, download options used, when it was downloaded etc. Also adding file related / library operation mean you can keep track of the files and your library. Also this can be shared in which case another user can download the same using the same directory to a particular root. This can be analogous to the library in a media player and can help house keeping and track of all downloads. If you do any changes using YDL then this will be recorded in the DB like a file rename or move. Perhaps this can be in Org Mode format (orgmode.org) |
|
I don't see any support for orgmode in common video players like vlc. In general, the filesystem is already the library, so there is no index file needed. However, if you have a specific index file format and use case (which at least one common video player like vlc or mplayer should support), please name it and we'll reopen this issue. |
|
Since YDL is command line best is that it can do a text based index also this it can consider native / default and ability to put this into any other format specified. This can have more info than just a library format. This can have downlaod information also. Some formats to consider for playlists: |
|
Well the default / native format ideally should fulfil:
In addition: |
|
I'm sorry, but such a large list of operations is definitely out of scope scope for youtube-dl. It is far easier to simply store everything right in the filesystem. In particular, I do not think it there is a sensible reason to want to rename files after downloading them. You are welcome to contribute code that does manage a central database and employs locking, like |
|
See the other tool will not have the knowledge of which playlist, user, tag the videos where downloaded for. This will mean this will need manually create the play list. In this case as a starting point can you default to -o '%(uploader)s/%(playlist)s/%(playlist_index)s-%(upload_date)s-%(title)s-%(id)s.%(ext)s' for play lists, and -o '%(uploader)s/%(upload_date)s-%(title)s-%(id)s.%(ext)s' for user level downloads, etc. (upload_date - in case the video gets updated it is easier to sort, and auto number should be 4 or 3 digits with leading 0s to be safe for proper sorting) Having meaningful defaults like this would make YDL baby proof for 1st time users. Next step would be if you have already a download downloaded with a particular -o option given the old -o option parameters and the new -o option parameters the ability to rename the downloads to the new format without re downloading what has been downloaded. This would be simpler than above? Also this will maintain the file system as the library but still help in by providing a URL list (perhaps if this can also be given from a file and saved to a file it would be great also providing the list from command line - not the same as archive as this will point to starting point given), the original -o option and root directory and new -o options and root directory. Also ability to figure the files from title and id if it is in the name in case there some manual renames of the original files. |
|
Personally - and this seems to echo with most users - I don't care who uploaded a video. Even if I'm downloading a playlist, I don't want to create a myriad of subfolders. Therefore, we'll keep the default filename format as is. But these options and the configuration files exist for good reason, so that you can The auto number is five digits long. That's a little bit more on the safe side than 4 or 3, and will stay. In your case, using I am not under the impression that many of our users are regularly changing there file naming formats. This is sounds like a better task for a small script. But as I said above, you are welcome to contribute code that implements a central database and limited re-moving options. It may also worthwile to investigate the use of alternate data streams on Windows to store filename, URL etc. |
|
In which can you add an option to just list out (without downloading - since this is to organise already downloaded files) the the file names generated by the -o option for a given URL / URL list to console or a file in a bare format. I can take it up from there. |
|
Basically a DIR /B like function on the given URL |
|
Got the mail |
|
What I have been thinking is if you use -o "@ren c:\download%(title)s-%(id)s.%(ext)s c:\download%(playlist)s/%(playlist_index)s-%(upload_date)s-%(title)s-%(id)s.%(ext)s" --get-filename URL > mantain.cmd this will replace %(*)s and print the output to console without downloading the file you can generate a script to do the maintenance you want. |
|
Is there a way to suppress character substitution in the -o option and also introduce non printable characters line new line perhaps by using [] to suppress character substitution (e.g. %[title]s will be the raw title)? Also the URL name like: -o "#EXTINF:%(id)s, %[title]s %(newline) %(title)s-%(id)s.%(ext)s %(newline) %[url]s" --get-filename URL > playlist.m3u This way I can generate my play lists as many formats are text based. Any way if there is a possibility can you provide a option to differentiate the 1st last odd and even file name templates and the ability to print a separator between file names (before & after). (ideally different for the 1st last odd and even file names) May be a header and footer also. This will help writing out XML playlist formats. Similarly user can generate any other file format. May be control over the %(id)s say %(id1) no leading 0, %(id2) 2 digit id etc. Also if I can get the name of the local thumbnail file with the -o option I can write out a HTML output to console which can similarly saved to create the local HTML file. If you want to take a step further you can add a separate option and the ability to sage a config file which will do these processing when downloading and sage the files. Also a list of post processing commands to system commands to run either from command line or from the saved script. I would like to contribute but I do not know Python. Let me know if there is any interest in this perhaps rolling this hack? This would be very useful in script files. |
|
I am not sure what you mean by character substitution. If you want youtube-dl to save all downloaded videos in a playlist, just open an issue and make sure you have all the entries in the checklist checked, in particular Any internal scripting capabilities are out of scope for youtube-dl. Write a shell or Python script. |
|
You don't seem to understand what I have been saying. Let me try to reward it. |
Is it possible to add library support which would be in a text format by default in the same directory. His will have download meta data. This can be used on operation on the library like renaming to another name and moving. If done through the command line this will be updated. Also ability to create sub library files based on different filter criteria.