Files
radiola-android/app/src/main/java/com/radiola/data/remote/ItunesApi.kt
nk 4a33aa6fb5 feat(covers): клиентское обогащение обложек через iTunes (обход бана сервера)
Серверный IP забанен Apple (iTunes search 429), а Deezer из РФ пуст — обложки
перестали наливаться. Теперь iTunes-поиск делает КЛИЕНТ (его IP не забанен):
для now-playing-треков без обложки ищет арт в iTunes и шлёт ССЫЛКУ на наш
бэкенд (POST /covers/submit), сервер качает её (CDN из РФ доступен) и кладёт
WebP — дальше обложка приходит всем через /now-playing. Дедуп по треку +
троттлинг 1.5с (CoverEnrichmentManager). Сервер: host-whitelist (SSRF),
идемпотентность (first-write-wins).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 16:59:32 +03:00

19 lines
614 B
Kotlin
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.radiola.data.remote
import com.radiola.data.remote.dto.ItunesSearchResponse
import retrofit2.http.GET
import retrofit2.http.Query
/**
* iTunes Search API — дёргаем С УСТРОЙСТВА пользователя (его IP не забанен
* Apple, в отличие от нашего серверного). Нужна только обложка трека.
*/
interface ItunesApi {
@GET("search")
suspend fun search(
@Query("term") term: String,
@Query("entity") entity: String = "song",
@Query("limit") limit: Int = 1,
): ItunesSearchResponse
}