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

[Feature] Create bundled and non-bundled (downloadable dependencies/packages) versions #256

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

BobbyESP
Copy link

@BobbyESP BobbyESP commented Nov 19, 2023

Pull Request: Move to Downloadable Plugins

Description

This pull request addresses the following changes:

  • Transition from Pre-packaged Libraries: We are moving away from using pre-packaged libraries in favor of downloadable plugins. This change aims to enhance flexibility, maintainability, and customization options for our project.

Changes Made

Benefits

  • Flexibility: Downloadable plugins allow users to choose and update specific components independently (even if Python and FFmpeg are mandatory).
  • Reduced Package Size: This transition helps in minimizing the overall package size (and also apps size that depend on the lib), resulting in faster downloads and reduced resource consumption.
  • Easier Updates: Users can easily update individual plugins without waiting for a complete library update.

Testing

  • Made just manual tests.

Additional Notes

  • None by now

Related Issues

Please review and provide feedback on the proposed changes.

Copy link
Author

@BobbyESP BobbyESP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yt-dlp but updates of it in commit a71509

@BobbyESP BobbyESP changed the title Move to downloadble plugins instead of pre-packages libraries Move to downloadble plugins instead of pre-packaged libraries Nov 19, 2023
@BobbyESP BobbyESP marked this pull request as ready for review November 20, 2023 22:00
@BobbyESP
Copy link
Author

The plugins support is almost finished; I have to change some things related to the initPython function and even the FFMpeg and Aria2c modules of the lib, but the YoutbeDL module itself can start to be reviewed.

@BobbyESP BobbyESP marked this pull request as draft November 20, 2023 22:03
@JunkFood02 JunkFood02 linked an issue Nov 20, 2023 that may be closed by this pull request
@JunkFood02 JunkFood02 self-assigned this Nov 20, 2023
@JunkFood02 JunkFood02 added the enhancement New feature or request label Nov 20, 2023
refactor: Separated the dependencies ensure from the init function
@BobbyESP BobbyESP changed the title Move to downloadble plugins instead of pre-packaged libraries Move to downloadable dependencies instead of pre-packaged libraries Nov 21, 2023
@BobbyESP BobbyESP changed the title Move to downloadable dependencies instead of pre-packaged libraries Move to downloadable dependencies from pre-packaged libraries Nov 21, 2023
fix: Dependency download with `installDependencies` updated every single iteration the progress
fix: Dependency download with `installDependencies` updated every single iteration the progress
@BobbyESP
Copy link
Author

BobbyESP commented Nov 21, 2023

Sorry for this last commit duplicated message d4a2554.

The changes made:

  • Deleted the scope val from the library (coroutine scope)

@BobbyESP
Copy link
Author

I hadn't a lot of time to continue on this, but will do. It seems to be more complex than what I thought, because also FFmpeg and Aria2c has to be downloadable, and by how the library is built we need to have some kind of shared code, meaning that I have to create another package with that shared code.

@BobbyESP BobbyESP changed the title Move to downloadable dependencies from pre-packaged libraries [Feature] Create bundled and non-bundled (downloadable dependencies/packages) versions May 29, 2024
@BobbyESP
Copy link
Author

Created a build so you can try how is this going. Far from a final release!!!

You can see an example here

@BobbyESP
Copy link
Author

The initPython function will have to be modified (as well as the other such as the FFmpeg and Aria2c) since the unzip process is already included in the download process. We should probably have to create different functions depending on the flavor

⚠️(WIP): Created product flavors for `:library` module
- nonBundled version not finished and Android doesn't take it as a product variant
@BobbyESP
Copy link
Author

@JunkFood02 Can we talk about how we should handle the libraries downloading? I mean. Should the download function be inside the init one or something like the already implemented in the app demo?

@BobbyESP
Copy link
Author

BobbyESP commented May 31, 2024

EDIT: FIXED

Seems to be an error at build time because of the app, here is the log.

I think that the targetConfiguration isn't correct since I would say that the target should be "bundled" or "nonbundled" but when using those cases Gradle isn't able to find the library:

implementation project(":library") targetConfiguration("bundledDebugRuntimeElements")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python & FFmpeg as downloadable plugins
2 participants