Built-in way to "update from Git" (latest GitHub commit on branch master) #26167

Open
opened 2026-02-21 14:10:40 -05:00 by deekerman · 4 comments
Owner

Originally created by @cousteaulecommandant on GitHub (Apr 8, 2023).

Checklist

  • I'm reporting a feature request
  • I've verified that I'm running youtube-dl version 2021.12.17
  • I've searched the bugtracker for similar feature requests including closed ones

Description

I'd love to be able to update to the latest, cutting-edge, not-yet-officially-released version of youtube-dl from the GitHub repo whenever I had a problem with it, just to see if it's already been fixed, but without having to get myself into complications with downloading and installing from git (or having a tool that does all that for me), and without having to wait to the next "stable" release.

Something like:

youtube-dl -UU  # short form; using -U twice as in "update more"
youtube-dl --update-experimental  # long form

which would automatically download the latest commit in branch 'master'.

Of course, since updating to the latest commit is dangerous and can break a bunch of things on certain systems, there should be an easy way to revert that and "downgrade" to a "normal" release.
Therefore, if I'm on an "experimental" release, running youtube-dl -U (single -U) or some other option like youtube-dl --update-stable should revert back to a "normal" release. If the release is older than the one I'm using, then it could prompt me if I'm sure I want to revert, but still let me revert. (If it's newer then it's pointless to ask; just update to the newer, stable release.)
This should solve almost every possible issue that may arise from this (except, of course, if an experimental release breaks the update system, in which case I guess the user will need to manually reinstall youtube-dl).

Do you think this would be feasible?

(And yes; I'm aware that this feature won't be available for regular installs until a new version of youtube-dl is released, which may take some time; and once that happens it's likely that new releases will be more frequent anyway so this feature will be a bit pointless by then... but it would still be nice to have this feature just in case releases ever stop coming again.)

Originally created by @cousteaulecommandant on GitHub (Apr 8, 2023). <!-- ###################################################################### WARNING! IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE ###################################################################### --> ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.12.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates. - Finally, put x into all relevant boxes (like this [x]) --> - [x] I'm reporting a feature request - [x] I've verified that I'm running youtube-dl version **2021.12.17** - [x] I've searched the bugtracker for similar feature requests including closed ones ## Description <!-- Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible. --> I'd love to be able to update to the latest, cutting-edge, not-yet-officially-released version of youtube-dl from the GitHub repo whenever I had a problem with it, just to see if it's already been fixed, but without having to get myself into complications with downloading and installing from git (or having a tool that does all that for me), and without having to wait to the next "stable" release. Something like: ```sh youtube-dl -UU # short form; using -U twice as in "update more" youtube-dl --update-experimental # long form ``` which would automatically download the latest commit in branch 'master'. Of course, since updating to the latest commit is dangerous and can break a bunch of things on certain systems, there should be an easy way to revert that and "downgrade" to a "normal" release. Therefore, if I'm on an "experimental" release, running `youtube-dl -U` (single `-U`) or some other option like `youtube-dl --update-stable` should revert back to a "normal" release. If the release is older than the one I'm using, then it could prompt me if I'm sure I want to revert, but still let me revert. (If it's newer then it's pointless to ask; just update to the newer, stable release.) This should solve almost every possible issue that may arise from this (except, of course, if an experimental release breaks the update system, in which case I guess the user will need to manually reinstall youtube-dl). Do you think this would be feasible? (And yes; I'm aware that this feature won't be available for regular installs until a new version of youtube-dl is released, which may take some time; and once that happens it's likely that new releases will be more frequent anyway so this feature will be a bit pointless by then... but it would still be nice to have this feature just in case releases ever stop coming again.)
Author
Owner

@dirkf commented on GitHub (Apr 8, 2023):

I'm inclined to think if you want a bleeding edge you should probably get to grips with the relevant pip commands.

You can always pull an unofficial (or, possibly in the future, official) nightly build.

@dirkf commented on GitHub (Apr 8, 2023): I'm inclined to think if you want a bleeding edge you should probably get to grips with the relevant _pip_ commands. You can always pull an unofficial (or, possibly in the future, official) nightly build.
Author
Owner

@cousteaulecommandant commented on GitHub (Apr 9, 2023):

you should probably get to grips with the relevant pip commands.

Well, I was hoping for youtube-dl to do that for me :(

@cousteaulecommandant commented on GitHub (Apr 9, 2023): > you should probably get to grips with the relevant _pip_ commands. Well, I was hoping for youtube-dl to do that for me :(
Author
Owner

@pukkandan commented on GitHub (Apr 11, 2023):

It's not possible for standalone exe to update to source code (git) varant. For this to work, youtube-dl would have to create a new exe on each commit like https://github.com/yt-dlp/yt-dlp-nightly-builds.

@pukkandan commented on GitHub (Apr 11, 2023): It's not possible for standalone exe to update to source code (git) varant. For this to work, youtube-dl would have to create a new exe on each commit like https://github.com/yt-dlp/yt-dlp-nightly-builds.
Author
Owner

@cousteaulecommandant commented on GitHub (Apr 11, 2023):

Oh... I can see how that can be a problem. I would have thought that the updater simply downloaded the Python source code (or a zipped version), but if it actually needs to build the .exe that won't be so easy.

(Unless the installer just downloads the Python code and simply executes that code instead of the one built into the executable... not sure how feasible that is. Maybe not much.)

@cousteaulecommandant commented on GitHub (Apr 11, 2023): Oh... I can see how that can be a problem. I would have thought that the updater simply downloaded the Python source code (or a zipped version), but if it actually needs to build the .exe that won't be so easy. (Unless the installer just downloads the Python code and simply executes that code instead of the one built into the executable... not sure how feasible that is. Maybe not much.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#26167
No description provided.