Repository navigation
fix: lossless candidate matching, compiler JVM monitor overflow, and test regressions - #268
Merged
Merged
Conversation
…kend crash Local suspend functions capturing outer coroutine scope can trigger internal compiler errors in Kotlin's IR backend.
…record label detection
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.
Summary
Fixes the Kotlin compiler backend crash, test suite regressions, and resolves the issue where global collaborative tracks (such as Timeless by The Weeknd) falsely dropped to Opus 147 kbps instead of playing in lossless FLAC.
1. Lossless Stream Candidate Matching Fixes
artistNamesbefore punctuation normalization so,,&,feat, andwithsplit collaborative/featured artists into distinct identities instead of collapsing them into a single unmatchable 3-word string.artistNamesto filterARTIST_NOISE_WORDS("the","and", etc.) sotargetArtistsandcandidateArtiststokens match symmetrically (e.g."The Weeknd"->["weeknd"]).targetTokens.isNotEmpty()).<Title> - <Artist, Collaborator>): UpdatedisArtistOrAlbumNamewith bidirectional matching and split-artist checks so multi-artist tails in dash-separated titles are recognized as artist credits instead of replacing the track title core.withtoFEATURING_CLAUSEfor unbracketed featuring phrases, and allowed major record label stem matching inisRecordLabelfor regional YouTube upload channels (e.g."T-Series Regional","Sony Music South").2. Compiler Crash Fix (
StackOverflowErrorin JVM Coroutine Transformer)TrackDownloadManager.kt, nested local suspend functions and duplicate transfer invocations inside the massiverunDownloadJobcoroutine caused Kotlin'sCoroutineTransformerMethodVisitormonitor depth analysis to overflow the JVM compiler stack.isOpusStreamto a class-level helper method, simplified track filter predicates to lightweight lambdas, and reverted the transfer call to a single compactdownloadToTempFileinvocation (which internally handles reconnectable network failures with exponential backoff and retry bounds).3. Unit Test Regression Fixes
TextMatch.tokens: RestoredMATCH_NOISE_WORDSfiltering to preserve expected Latin tokenization behavior (TextMatchTest.latinBehaviorIsUnchanged).CsvPlaylistImporter.sameArtist: Removed loose bidirectional substring matching that caused"Artist Tribute"to match"Artist"(CsvPlaylistImporterTest.rejectsDifferentArtistsVersionsAndMissingMetadata).CsvPlaylistImporter.queryVariants: Restored full query shape permutations (including inverted artist/title and base title variants) so empty search passes retry across all candidate forms (CsvPlaylistImporterTest.retriesEmptySearchesBeforeGivingUpOnARow).CsvPlaylistImporter.parseTracks: UpdatedhasHeaderdetection to verify that the first row does not contain purely numeric track/index cells, ensuring headerless numeric CSV files (e.g.1,Song,Artist) are not discarded as headers (CsvPlaylistImporterTest.skipsIndexAndTrackNumberColumnsCorrectly).