Skip to content

merge - Development#34

Merged
FrancescoGrazioso merged 15 commits into
mainfrom
development
Mar 23, 2026
Merged

merge - Development#34
FrancescoGrazioso merged 15 commits into
mainfrom
development

Conversation

@FrancescoGrazioso

Copy link
Copy Markdown
Owner

Meld v0.6.0 — Spotify Deep Integration

This release brings full two-way Spotify integration: edit playlists, reorder tracks, and sync your likes — all from within the app.

New Features

Bidirectional Like Sync with Spotify

  • New "Sync Likes with Spotify" toggle in Spotify integration settings
  • When enabled, every like/unlike action in the app (player, context menu, multi-select) is automatically synced to your Spotify Liked Songs
  • On first activation, all your Spotify liked songs are imported and matched to their YouTube equivalents
  • The local "Liked" playlist is replaced by your Spotify library — one source of truth

Edit Spotify Playlists from the App

  • Add tracks to any of your Spotify playlists directly from song menus
  • Works with both Spotify tracks (direct add) and YouTube tracks (automatic reverse lookup finds the Spotify match)
  • Remove tracks from Spotify playlists with swipe-to-remove
  • Rename Spotify playlists without leaving the app
  • New playlist picker dialog for quick playlist selection

Sort & Refresh for Spotify Playlists

  • Sort by: original order, name, artist, or duration
  • Pull-to-refresh to reload playlists in real time
  • Available in both Spotify playlists and liked songs screens

Drag-to-Reorder in Spotify Playlists

  • Reorder tracks in your Spotify playlists via drag-and-drop
  • Changes are synced to Spotify in real time via GraphQL
  • Lock mechanism prevents accidental reordering
  • Optimistic UI updates with server-side confirmation

Under the Hood

Spotify GraphQL Hash Audit

  • Verified all 15 hardcoded GQL hashes against the current Spotify web player bundle
  • Updated 5 rotated hashes: libraryV3, fetchPlaylist, queryArtistOverview, addToLibrary, removeFromLibrary
  • Identified 2 at-risk hashes (searchDesktop, editPlaylistAttributes) not present in the current web player — functional for now but may require future attention

Architecture

  • All like sync logic (YouTube, Spotify, Last.fm) is now centralized in SyncUtils and runs independently of YouTube login state
  • SongEntity.toggleLike() handles local state only — remote sync is fully delegated to SyncUtils

Stats

  • 22 files changed | +1,700 lines | -207 lines
  • Tested on physical device

- Added `SpotifyPlaylistMenu` for managing pin/unpin actions for Spotify playlists.
- Enhanced `HomeScreen` and `LibraryPlaylistsScreen` to support long-press actions for pinning playlists to speed dial.
- Introduced `togglePin` method in `HomeViewModel` to handle pin state changes for Spotify playlists.
- Updated `SpeedDialItem` to create items from Spotify playlists, ensuring seamless integration with existing navigation and UI flow.

Closes #XX (replace with relevant issue number if applicable)
…tifyLikedSongsScreen, and SpotifyPlaylistScreen for improved navigation
# Conflicts:
#	app/src/main/kotlin/com/metrolist/music/viewmodels/LocalFilesViewModel.kt
…enhance playlist management

- Added a new dialog for selecting Spotify playlists to add tracks.
- Implemented reverse lookup for YouTube tracks to find corresponding Spotify URIs.
- Enhanced Spotify track menu with options to add tracks to playlists and remove tracks from playlists.
- Improved error handling and user feedback for playlist operations.
- Updated UI components to support new features and improve user experience.
…creens

- Added sorting options for Spotify liked songs and playlists, allowing users to sort by original order, name, artist, and duration.
- Implemented pull-to-refresh functionality in Spotify liked songs and playlist screens for improved user experience.
- Updated view models to manage loading and refreshing states effectively.
- Enhanced UI components to reflect new sorting and refreshing capabilities.
…ement

- Added functionality to reorder tracks within Spotify playlists using drag-and-drop.
- Introduced optimistic UI updates for track movements, with server-side synchronization.
- Enhanced playlist item handling by integrating state management for dynamic updates.
- Updated UI components to reflect new reordering capabilities and improved user interaction.
- Introduced a new preference for syncing liked songs with Spotify, allowing users to replace local likes with Spotify likes.
- Implemented functionality to sync likes to Spotify when songs are liked or unliked in the app.
- Added UI components for managing the synchronization process, including progress indicators and user feedback.
- Updated relevant database and utility classes to support the new synchronization feature.
@github-actions github-actions Bot changed the title Development merge - Development Mar 23, 2026
…flow

- Introduced a Python script to fetch and verify Spotify GraphQL operation hashes, updating the hash registry as needed.
- Added a GitHub Actions workflow to run the hash checker daily and commit changes to the hash registry.
- Created an HTML documentation page linking to the hash registry for easy access.
@FrancescoGrazioso FrancescoGrazioso merged commit 11d8100 into main Mar 23, 2026
1 check passed
FrancescoGrazioso added a commit that referenced this pull request Apr 8, 2026
Add "Download" option to the overflow menu in SpotifyPlaylistScreen and
SpotifyLikedSongsScreen. Each track is resolved from Spotify to YouTube
via SpotifyYouTubeMapper, then queued for download through ExoPlayer's
DownloadManager. Tracks without a YouTube match are silently skipped.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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