-
Notifications
You must be signed in to change notification settings - Fork 3
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
Quality-of-life fixes #7
base: main
Are you sure you want to change the base?
Conversation
The .MD option was programmed to output the duration of each video, but this feature assumed that all videos had a definite duration between 0 seconds and 59:59. This fails for live streams, which report a duration of -1, so the MD exporter incorrectly labelled this with (-1:59). To counter this, .MD now labels live streams with the indication (LIVE) instead of a time, and prints no indication if the video is not a live stream, but the duration is a negative number. It also labels correctly videos over an hour, and labels videos over one day as d:hh:mm:ss. The MU8 format was not affected by this bug, as the duration must always be specified, and -1 is the standard value for "not applicable".
If the argument of this script ends in .zip (case-insensitive), it automatically extracts newpipe.db to a temporary directory, reads all necessary data from there, and then deletes the whole temporary directory. Instructions in the script have been updated to that effect.
Adding an explicit list to avoid a collision between streams.thumbnail_url and playlists.thumbnail_url. The downside to this method is that new values that NewPipe may add in the future are not added automatically to the JSON dump. Also corrected the description of the variable PlaylistDir at getPlaylists()
Adding a couple failsafes to the automatic ZIP extraction, and returning None, None when create_connection() raises an exception, to handle errors more cleanly.
Hi @medape I'm a bit packed at the moment but I will take a look, test and merge it as soon as I got time. |
Hi Medape I finally had time to look at your pull request! Features/changes tested:
I found two things that make the request not working on my end (see the review comments on the corresponding lines), the rest works as intended. Regarding the GUI, thanks for the input, I'll take at look at CITGuru/PyInquirer. Cheers! |
Hello again! Thank you so much for accepting my last pull request. And for your appreciation.
You mentioned wanting to expand the script, maybe there is a way to make it so we can use the same code for a GUI, and for a CLI like CITGuru/PyInquirer? I don't know, it's a topic I never looked into a lot.
I'm planning to add a couple of CSV formats I'm going to make use for, but for now, I wanted to have you look if you're interested in these commits. Most of them are small tweaks and fixes.
The largest addition here is that now, if fed a .ZIP file, the extractor automatically checks if there is a
newpipe.db
file weighing less than 1 GiB (uncompressed), and if so, extracts it to a temporary folder so as to save the user that "effort". There is a way to extract the file directly to memory, but I couldn't find the way to run SQL queries on that.