refactor(android): add shared albumCoverPath cover-URL builder
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package com.fabledsword.minstrel.models
|
||||
|
||||
/**
|
||||
* Absolute cover URL for an album, or "" when [albumId] is blank. Uses
|
||||
* the placeholder host that `BaseUrlInterceptor` rewrites to the live
|
||||
* server (carrying the auth cookie); `ServerImage` passes it through,
|
||||
* and the raw-AsyncImage cover surfaces still load it. The single
|
||||
* album-cover URL builder for the whole client.
|
||||
*/
|
||||
fun albumCoverPath(albumId: String): String =
|
||||
if (albumId.isEmpty()) "" else "http://placeholder.invalid/api/albums/$albumId/cover"
|
||||
Reference in New Issue
Block a user