Multi-account support and streaming fixes
- Allow multiple linked accounts per service (YouTube, Twitch) - LinkedAccount PK changed from serviceId to backend UUID - StreamDestination now references linkedAccountId - Room DB migration v2→v3 for new schema - Unlink endpoint changed to DELETE by account ID - Accounts UI always shows "Add Account" for all providers - preparePlan matches destinations by ID instead of serviceId
This commit is contained in:
@@ -4,6 +4,7 @@ import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
|
||||
data class LinkedAccount(
|
||||
val id: String,
|
||||
val serviceId: String,
|
||||
val displayName: String,
|
||||
val accountId: String,
|
||||
@@ -12,6 +13,7 @@ data class LinkedAccount(
|
||||
) : Parcelable {
|
||||
|
||||
constructor(parcel: Parcel) : this(
|
||||
id = parcel.readString()!!,
|
||||
serviceId = parcel.readString()!!,
|
||||
displayName = parcel.readString()!!,
|
||||
accountId = parcel.readString()!!,
|
||||
@@ -20,6 +22,7 @@ data class LinkedAccount(
|
||||
)
|
||||
|
||||
override fun writeToParcel(parcel: Parcel, flags: Int) {
|
||||
parcel.writeString(id)
|
||||
parcel.writeString(serviceId)
|
||||
parcel.writeString(displayName)
|
||||
parcel.writeString(accountId)
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.os.Parcelable
|
||||
|
||||
data class StreamDestination(
|
||||
val service: String,
|
||||
val linkedAccountId: String = "",
|
||||
val title: String,
|
||||
val description: String = "",
|
||||
val privacyStatus: String = "public",
|
||||
@@ -18,6 +19,7 @@ data class StreamDestination(
|
||||
|
||||
constructor(parcel: Parcel) : this(
|
||||
service = parcel.readString()!!,
|
||||
linkedAccountId = parcel.readString() ?: "",
|
||||
title = parcel.readString()!!,
|
||||
description = parcel.readString() ?: "",
|
||||
privacyStatus = parcel.readString() ?: "public",
|
||||
@@ -31,6 +33,7 @@ data class StreamDestination(
|
||||
|
||||
override fun writeToParcel(parcel: Parcel, flags: Int) {
|
||||
parcel.writeString(service)
|
||||
parcel.writeString(linkedAccountId)
|
||||
parcel.writeString(title)
|
||||
parcel.writeString(description)
|
||||
parcel.writeString(privacyStatus)
|
||||
|
||||
Reference in New Issue
Block a user