init implementation for browser metadata parsing - #13
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a new
TrackMetadataCleanerutility to clean up track metadata from web sources, integrates it into the scrobbling flow, and updates the Xcode project configuration to include the new files and tests. It also extends theNowPlayingFetcherto provide the bundle identifier of the current application, enabling smarter metadata handling for tracks coming from browsers and other web sources.Track metadata cleaning improvements:
TrackMetadataCleaner.swiftutility to the project, along withTrackMetadataCleanerTests.swiftfor unit testing. These files are now included in the project and test targets (scrobble.xcodeproj/project.pbxproj). [1] [2] [3] [4] [5]TrackMetadataCleaner.cleanIfWebSourceinto theScrobblerlogic to sanitize track metadata from web sources before further processing, improving the quality of scrobbled data (Scrobbler.swift). [1] [2]NowPlayingFetcher enhancements:
NowPlayingFetcherto track and expose thebundleIdentifierof the current application, and to include it in thefetchCurrentTrackInfo()method. This enables downstream logic to distinguish between native apps and browsers (NowPlayingFetcher.swift). [1] [2] [3] [4]Scrobblerto handle the newbundleIdentifierfield when fetching track info (Scrobbler.swift). [1] [2]Project file and configuration updates:
FriendsFilterView.swiftin the project file. [1] [2] [3]These changes improve the accuracy of scrobbled metadata, specifically for tracks played in browsers, and lay the groundwork for more robust handling of various media sources. This unit of work covers the exact case described in #12 , but does not cover cases where a non-DSP channel has uploaded the audio (e.g this track will still return "VNRD - Distant Strangers - Do Anything [DS 001]")
Future work
How to test
Author checklist
This PR: