Fix critical playback crashes, cache expiry bug, and improve lyrics caching#1869
Open
nakchwalabhi wants to merge 2 commits intoz-huang:devfrom
Open
Fix critical playback crashes, cache expiry bug, and improve lyrics caching#1869nakchwalabhi wants to merge 2 commits intoz-huang:devfrom
nakchwalabhi wants to merge 2 commits intoz-huang:devfrom
Conversation
… fix lyrics cache Agent-Logs-Url: https://github.com/nakchwalabhi/InnerTune/sessions/66166913-4599-485a-b5af-bb4679476562 Co-authored-by: nakchwalabhi <118037101+nakchwalabhi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nakchwalabhi/InnerTune/sessions/66166913-4599-485a-b5af-bb4679476562 Co-authored-by: nakchwalabhi <118037101+nakchwalabhi@users.noreply.github.com>
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
This PR fixes multiple critical and medium-level issues affecting playback stability, caching, and performance in the app.
🔴 Critical Fixes
1. Stream URL Cache Expiry Bug
✅ Fix:
currentTimeMillis + expiresInSeconds2. Double
unbindService()CrashunbindService()twiceonStop()already unbinds the service, so calling it again inonDestroy()caused:IllegalArgumentException: Service not registered✅ Fix:
onDestroy()3. NullPointerException in Stream Handling
!!) on nullable fields:urlcontentLength✅ Fix:
PlaybackException(ERROR_CODE_NO_STREAM)when URL is nullcontentLengthis null🟡 Medium Fixes
4. Lyrics Not Cached
✅ Fix:
5. Inconsistent Cache Key in LyricsHelper
mediaIdvsartist-title)✅ Fix:
mediaId6. MIME Type Parsing Crash
split("codecs=")[1]could throwIndexOutOfBoundsException✅ Fix:
getOrNull(1)🎯 Impact
🧪 Testing
📌 Notes