feat: auth screen with auto-redirect, sync favorites/history with backend

This commit is contained in:
nk
2026-06-02 19:12:07 +03:00
parent d4adb1e7be
commit a83672b455
2934 changed files with 97351 additions and 163 deletions

View File

@@ -8,25 +8,26 @@ import com.radiola.domain.model.Track
object ApiMapper {
fun StationDto.toDomain(): Station {
val cover = iconPng ?: iconSvg ?: ""
val cover = iconFillColored ?: bgImageMobile ?: bgImage ?: ""
val stream = stream128 ?: stream320 ?: streamHls ?: "https://air.radiorecord.ru:805/${prefix}_128"
return Station(
id = id,
name = name,
prefix = prefix,
streamUrl = "https://air.radiorecord.ru:805/${prefix}_128",
streamUrl = stream,
coverUrl = cover,
genre = genre ?: "",
tags = emptyList(),
sortOrder = id
genre = tooltip ?: "",
tags = tags.map { it.name },
sortOrder = sort
)
}
fun NowPlayingItemDto.toDomain(): Track {
return Track(
artist = artist,
song = song,
coverUrl = image600 ?: image100,
stationName = prefix
artist = track.artist,
song = track.song,
coverUrl = track.image600 ?: track.image100,
stationName = ""
)
}
}