Photo/slideshow fixes & Seerr server removal fix (#1076)

## Description
A few fixes

- Better crossfade for photo slideshow
- Fix "Go to" in context menu for photos
- Fix certain home video/photo libraries not working for photos
- Fix removing seerr server in some cases

### Related issues
Closes #835
Fixes #1069
Addresses
https://github.com/damontecres/Wholphin/issues/634#issuecomment-4018580518

### Testing
Emulator mostly

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Ray 2026-03-10 14:16:19 -04:00 committed by GitHub
parent afc47f254b
commit 7bb47bf329
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 198 additions and 184 deletions

View file

@ -25,7 +25,7 @@ import dagger.hilt.android.scopes.ActivityScoped
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.supervisorScope
@ -71,10 +71,11 @@ class SeerrServerRepository
}
fun error(
serverUrl: String,
server: SeerrServer,
user: SeerrUser,
exception: Exception,
) {
_connection.update { SeerrConnectionStatus.Error(serverUrl, exception) }
_connection.update { SeerrConnectionStatus.Error(server, user, exception) }
seerrApi.update("", null)
}
@ -175,8 +176,13 @@ class SeerrServerRepository
}
suspend fun removeServerForCurrentUser(): Boolean {
val current = current.firstOrNull() ?: return false
val rows = seerrServerDao.deleteUser(current.server.id, current.user.jellyfinUserRowId)
val user =
when (val conn = connection.first()) {
SeerrConnectionStatus.NotConfigured -> return false
is SeerrConnectionStatus.Error -> conn.user
is SeerrConnectionStatus.Success -> conn.current.user
}
val rows = seerrServerDao.deleteUser(user)
clear()
return rows > 0
}
@ -191,7 +197,8 @@ sealed interface SeerrConnectionStatus {
data object NotConfigured : SeerrConnectionStatus
data class Error(
val serverUrl: String,
val server: SeerrServer,
val user: SeerrUser,
val ex: Exception,
) : SeerrConnectionStatus
@ -317,7 +324,7 @@ class UserSwitchListener
"Error logging into %s",
server.url,
)
seerrServerRepository.error(server.url, ex)
seerrServerRepository.error(server, seerrUser, ex)
}
}
}