-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: unify importers #3436
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
base: dev
Are you sure you want to change the base?
feat: unify importers #3436
Changes from 17 commits
bb8d014
81bef8b
a9e8048
3c664f3
783c703
caa7808
844dce7
85ef81b
9ea6088
9d5de81
602a23c
1168d70
ece3dbc
fdfa64c
f521703
7238979
2d81ce2
5b2e425
9019fc3
897ff3f
c4d27a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| package app.revanced.manager.data.room.bundles | ||
|
|
||
| import android.net.Uri | ||
| import androidx.room.* | ||
| import app.revanced.manager.data.room.sources.Source | ||
| import app.revanced.manager.domain.manager.SourceManager | ||
|
|
||
| @Entity(tableName = "patch_bundles") | ||
| data class PatchBundleEntity( | ||
| @PrimaryKey override val uid: Int, | ||
| @ColumnInfo(name = "name") val name: String, | ||
| @ColumnInfo(name = "version") val versionHash: String? = null, | ||
| @ColumnInfo(name = "source") val source: Source, | ||
| @ColumnInfo(name = "source") val source: Uri, | ||
| @ColumnInfo(name = "auto_update") val autoUpdate: Boolean, | ||
| @ColumnInfo(name = "released_at") val releasedAt: Long? = null, | ||
| ) : SourceManager.DatabaseEntity | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| package app.revanced.manager.data.room.downloader | ||
|
|
||
| import android.net.Uri | ||
| import androidx.room.* | ||
| import app.revanced.manager.data.room.sources.Source | ||
| import app.revanced.manager.domain.manager.SourceManager | ||
|
|
||
| @Entity(tableName = "downloaders") | ||
| data class DownloaderEntity( | ||
| @PrimaryKey override val uid: Int, | ||
| @ColumnInfo(name = "name") val name: String, | ||
| @ColumnInfo(name = "version") val versionHash: String? = null, | ||
| @ColumnInfo(name = "source") val source: Source, | ||
| @ColumnInfo(name = "source") val source: Uri, | ||
| @ColumnInfo(name = "auto_update") val autoUpdate: Boolean, | ||
| @ColumnInfo(name = "released_at") val releasedAt: Long? = null | ||
| ) : SourceManager.DatabaseEntity |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package app.revanced.manager.data.room.sources | ||
|
|
||
| import android.net.Uri | ||
| import androidx.room.ColumnInfo | ||
|
|
||
| data class SourceProperties( | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this used
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its the partial type returned by
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is the full scheme, and where is source properties used, the question is still unanswered properly
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The full schema is the entity.
It is used by |
||
| @ColumnInfo(name = "name") val name: String, | ||
| @ColumnInfo(name = "version") val versionHash: String? = null, | ||
| @ColumnInfo(name = "source") val source: Uri, | ||
| @ColumnInfo(name = "auto_update") val autoUpdate: Boolean, | ||
| @ColumnInfo(name = "released_at") val releasedAt: Long? = null, | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,21 @@ | ||
| package app.revanced.manager.di | ||
|
|
||
| import app.revanced.manager.domain.protocol.ContentProtocolHandler | ||
| import app.revanced.manager.domain.protocol.FileProtocolHandler | ||
| import app.revanced.manager.domain.protocol.HttpProtocolHandler | ||
| import app.revanced.manager.network.service.HttpService | ||
| import app.revanced.manager.util.FilePicker | ||
| import app.revanced.manager.util.UiFilePicker | ||
| import org.koin.android.ext.koin.androidContext | ||
| import org.koin.core.module.dsl.bind | ||
| import org.koin.core.module.dsl.singleOf | ||
| import org.koin.dsl.module | ||
|
|
||
| val serviceModule = module { | ||
| singleOf(::HttpService) | ||
| } | ||
| singleOf(::UiFilePicker) { bind<FilePicker>() } | ||
|
mostafaNazari702 marked this conversation as resolved.
|
||
| single { androidContext().contentResolver } | ||
| singleOf(::HttpProtocolHandler) | ||
| singleOf(::ContentProtocolHandler) | ||
| singleOf(::FileProtocolHandler) | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be renamed to url and be of type URL not Uri, migration needs to be added for it