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

refactor: make app class proper & remove unused libs #1479

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

Conversation

IndusAryan
Copy link
Contributor

No description provided.

# Conflicts:
#	app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt
#	gradle/libs.versions.toml
@fire-light42
Copy link
Collaborator

Can you please check if any plugins are using AcraApplication.Companion in any way. Such as setKey or context. Because if they are we should also add a backwards compatibility helper.

@CranberrySoup
Copy link
Contributor

AcraApplication.Companion.setKey is used in plugins, at least here

@IndusAryan
Copy link
Contributor Author

I looked at some popular extensions, they don't seem to be using acra imports, so changing the imports in aniyomi compat itself after merging would be good for everyone.

@Luna712
Copy link
Contributor

Luna712 commented Jan 11, 2025

I looked at some popular extensions, they don't seem to be using acra imports, so changing the imports in aniyomi compat itself after merging would be good for everyone.

Can't we just do something like class AcraApplication : CloudStreamApp() as a temporary backcompat wrapper that can be removed after plugins are updated as to not break any plugins during the transition phase? Maybe not exactly like that but I think there should be at least temporary backcompat.

@IndusAryan
Copy link
Contributor Author

changing compatibility 2 times in 2 updates will anyway crash in one pre release and this is the only extension imo which uses this.

@Luna712
Copy link
Contributor

Luna712 commented Jan 11, 2025

changing compatibility 2 times in 2 updates will anyway crash in one pre release and this is the only extension imo which uses this.

There are many more. Also, that's why you do it with stable releases. You keep back compat, update all extensions then finally remove back compat when all extensions update it which may be awhile but there is not any real disadvantage of leaving the back compat code for awhile either.

We accidentally broke so many extensions with the build stuff lately (which we've been working on fixing) I'm especially not happy if we end up purposely breaking many extensions by changing the main class they would use for setting plugin preferences etc... in the settings popup.

@IndusAryan
Copy link
Contributor Author

IndusAryan commented Jan 11, 2025

We can do backCompat wrapper likely, but sorry these extensions are dead, unmaintained and unused except ultimaStorage. But ultima is huge so it may rely on wrapper but as i said it will crash on many devices once wrapper is removed either in stable or pre and things are broken now already so maybe best time is this only.

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

Successfully merging this pull request may close these issues.

4 participants