Skip to content

Port large parts of the API to crossplatform #1163

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

Merged
merged 5 commits into from
Jul 4, 2024

Conversation

CranberrySoup
Copy link
Contributor

@CranberrySoup CranberrySoup commented Jul 1, 2024

This ports MainAPI at the cost of some changes:

  • SyncAPI file renamed to SyncApi to prevent collisions
  • Webview lost some constructors, not sure if it breaks some extensions
  • Base64 encoding method now uses the kotlin encoding and it does not use ISO_8859_1 The kotlin decoder uses ISO_8859_1 under the hood and the output is identical.
  • AppUtils was split into AppUtils in the library and AppContextUtils in the app
  • An init method to get context working properly in library

This is not thoroughly tested yet.
Some extensions might break if relying on context methods in AppContextUtils (such as openWebView).
When merged it should be possible to run cloudstream extensions natively in the JVM.

@CranberrySoup
Copy link
Contributor Author

I could not find any issues with extensions when testing. This is ready for review.

@CranberrySoup CranberrySoup marked this pull request as ready for review July 1, 2024 17:14
Copy link
Collaborator

@fire-light42 fire-light42 left a comment

Choose a reason for hiding this comment

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

Looks good, however more testing is needed to ensure no breaking changes

@fire-light42 fire-light42 merged commit 02b9569 into recloudstream:master Jul 4, 2024
2 checks passed
@Luna712
Copy link
Contributor

Luna712 commented Jul 4, 2024

@fire-light42 @CranberrySoup I can't seem to build or clone this repo locally anymore...

warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt'
  'library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainApi.kt'

So only one file is cloning causing ton of issues missing the other.

@Luna712 Luna712 mentioned this pull request Jul 4, 2024
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.

None yet

3 participants