yausername / youtubedl-android

youtube-dl for android
GNU General Public License v3.0
934 stars 172 forks source link

Moved yt-dlp yo site-packages (WARN: JUST MODIFIED ARM64-V8A PACKAGE) #247

Closed BobbyESP closed 8 months ago

BobbyESP commented 10 months ago

By the moment this is just a playground where you can see the research that I'm doing. What I have done was to download yt-dlp and all it's dependencies by using a Python script that I have sent in the #196 issue, and after that, moved all the generated site-packages folder into the Python zip file (that's why It has increased its size).

After that, I have modified how the yt-dlp main command <python directory> <yt-dlp binary file directory> to <python directory> <yt-dlp site-packages folder directory>; as how @xibr commented in the issue mentioned before, this could improve yt-dlp performance because it can use the cache folder that is generated when using packages that are located in that folder.

For some reason the command <python directory> -m yt-dlp don't work, that why I have done the told before. Probably have to add something to PATH but I don't know exactly what.

The idea is to download the packages from Pypi automatically with this library and unzip them to the site-packages folder, but we can't use the command pip download since the python package doesn't have Pip embedded. There is some other alternatives such as using ensure-pip, pip.pyz or even downloading the packages by using the Pypi API.

Related to #196

BobbyESP commented 10 months ago

(sorry for that ammount of commits)

JunkFood02 commented 10 months ago

Can you explain the changes did you made in this PR? I also noticed an increase in the size of the zip file, what's added into the zip file?

BobbyESP commented 10 months ago

Can you explain the changes did you made in this PR? I also noticed an increase in the size of the zip file, what's added into the zip file?

I have modified the PR description, take a look and If you have any doubt tell me. Couldn't wrote it in the moment that I've done the PR because I had to go sleep xD

JunkFood02 commented 10 months ago

The idea is to download the packages from Pypi automatically with this library and unzip them to the site-packages folder

And we'll be unable to update to the nightly version of yt-dlp, right? because yt-dlp only provides nightly updates along with github releases iirc

BobbyESP commented 10 months ago

Yeah, I thought about that. In all cases the whl file is just the source code so we can download the tar.gz file from GitHub (that contains the same).