Skip to content

feat: replace YTM thumbnails with YT thumbnails in Player screen - #31

Closed
sang765 wants to merge 2 commits into
devfrom
feat/yt-thumbnail-swap
Closed

sang765 wants to merge 2 commits into
devfrom
feat/yt-thumbnail-swap

Conversation

@sang765

@sang765 sang765 commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Replaces YTM-provided Google CDN thumbnails with YT (i.ytimg.com) thumbnails in the Player screen using a dual-load + swap strategy.

Logic:

  • Load both YTM and YT thumbnails simultaneously
  • Show YTM immediately (cached, instant)
  • When YT thumbnail finishes loading → crossfade-swap to YT
  • Quality fallback chain: maxresdefault → hqdefault → mqdefault → default
  • Skip YT for Song category (ATV type, isMusicVideo = false)
  • Skip YT in low data mode

Changes:

File Change
YouTubeUtils.kt Added YTThumbQuality enum + buildYTThumbnailUrl()
ThumbnailSwapState.kt NewrememberThumbnailSwapState() composable hook
MediaMetadata.kt Added isMusicVideo field, populated from musicVideoType
Thumbnail.kt (V4) Artwork + backdrop use swap state
PlayerComponents.kt V8/V9 artwork + PlayerBackground use swap state
Player.kt V7 + V8 backdrops use swap state
MiniPlayerComponents.kt Mini player artwork uses swap state

Covers all design styles: V4, V7, V8, V9, and mini player.

Hà Tiến Sáng added 2 commits June 27, 2026 14:35
Load both YTM and YT thumbnails simultaneously. Show YTM immediately,
swap to YT once loaded. Quality fallback chain: maxresdefault →
hqdefault → mqdefault → default. Skip YT for Song category (ATV)
and in low data mode.
- Add isMusicVideo param to DiscordPresenceManager.updatePresence/updateNow
- Pass currentMetadata.isMusicVideo from MusicService.syncDiscordStateInternal
- Use YT thumbnail URL for notification artwork on music videos
@sang765 sang765 closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant