-
-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5667 from Bnyro/master
feat: make LibreTube app backups import-compatible with Piped
- Loading branch information
Showing
12 changed files
with
78 additions
and
107 deletions.
There are no files selected for viewing
9 changes: 7 additions & 2 deletions
9
app/src/main/java/com/github/libretube/db/obj/LocalSubscription.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package com.github.libretube.db.obj | ||
|
||
import androidx.room.Entity | ||
import androidx.room.Ignore | ||
import androidx.room.PrimaryKey | ||
import com.github.libretube.ui.dialogs.ShareDialog | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
@Entity(tableName = "localSubscription") | ||
data class LocalSubscription( | ||
@PrimaryKey val channelId: String = "" | ||
) | ||
@PrimaryKey val channelId: String, | ||
@Ignore val url: String = "", | ||
) { | ||
constructor(channelId: String): this(channelId, "${ShareDialog.YOUTUBE_FRONTEND_URL}/channel/$channelId") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
app/src/main/java/com/github/libretube/obj/FreetubeSubscription.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
package com.github.libretube.obj | ||
|
||
import com.github.libretube.ui.dialogs.ShareDialog | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class FreetubeSubscription( | ||
val name: String, | ||
@SerialName("id") val serviceId: String, | ||
val url: String = "https://www.youtube.com/channel/$serviceId" | ||
@SerialName("id") val channelId: String, | ||
val url: String = "${ShareDialog.YOUTUBE_FRONTEND_URL}/channel/$channelId" | ||
) |
11 changes: 0 additions & 11 deletions
11
app/src/main/java/com/github/libretube/obj/PipedBackupFile.kt
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
app/src/main/java/com/github/libretube/obj/PipedChannelGroup.kt
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/github/libretube/obj/PipedPlaylistFile.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.github.libretube.obj | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class PipedPlaylistFile( | ||
val format: String = "Piped", | ||
val version: Int = 1, | ||
val playlists: List<PipedImportPlaylist> = emptyList() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters