Skip to content

Local library and player updates and some minor performance fixes - #1480

Open
TahaNacibe wants to merge 100 commits into
rukamori:mainfrom
TahaNacibe:fix/archive-tune-changes
Open

TahaNacibe wants to merge 100 commits into
rukamori:mainfrom
TahaNacibe:fix/archive-tune-changes

Conversation

@TahaNacibe

Copy link
Copy Markdown

i usually don't work much on kotline that's why i didn't wanna contribute but i had enough time to learn it and check the code base by now so the changes i made are all in a locally saved branches i experiment in and i tested the features everything work, most of the changes were for local files because i do use that more:

  • changed the local library filters adding ordering by adding date and played count and playing total time,
  • made the default state of the added newly start by the new,
  • added local library to the quick tabs of the library and extended main search to also search locally,
  • in local player added caching to next and previous song to avoid having to wait it to load,
  • changed it for a smoother change generally if you change songs in app quickly sometimes it start the song session change ui for the next yet since session start late it fail to terminate and start the new one you get next song ui with previous one fixed that by forcing session start to wait for user interaction to stop,
  • added a new seek bar type waves show the sounds intensity very useful for when you look for a specific part or moving around then checking time,
  • download extended the logic to let user select download path also added deleting local items from app added downloading full queue (yes weird but trust had 5 people ask for it which is not much but well it's 5 people)
  • added closing button for the player on the widget because some android phones had it stuck there forever (mine included) also there was bug in the local files scanning it was entirely ignoring the settings both on items length and paths to scan even with these set it did not respect them fixed by forcing looking to work only under these conditions.
    EXTRA NOTE: the code didn't work until i used JDK 21 so i updated the md file from 17 to 21 if that's okay pls check and confirm
    EXTR NOTE AGAIN: i removed the star project dialog because each build deleted the saved state and kept bugging me so pls be aware of that if merging

(0u0) Thank you for making such a great app

Pull Request

Before submitting a pull request, you must attest to the following:

<<<<<<< HEAD

1c00d59 (add no llm policy inspired by ytdlp)

Summary

Linked Work

  • Closes:
  • Related:

Change Type

  • Feature
  • Bug fix
  • UI / UX
  • Performance / memory
  • Playback / Media3
  • Lyrics / provider integration
  • Search / YouTube / network data
  • Local library / Room database
  • Widgets / notification / shortcuts
  • Settings / preferences / DataStore
  • Discord / Last.fm / ListenBrainz / external integration
  • Localization / strings / fastlane metadata
  • Build / Gradle / CI / release packaging
  • Dependency update
  • Documentation only

Affected Surfaces

  • :app
  • :core
  • :lyrics
  • :lastfm
  • :canvas
  • :shazamkit
  • :spotifycore
  • Other:

Screenshots / Recordings

Before After
WhatsApp Image 2026-10-18 at 17 13 34 WhatsApp Image 2026-10-18 at 17 13 33 WhatsApp Image 2026-10-18 at 17 13 33 (4) WhatsApp Image 2026-10-18 at 17 13 34 (1) WhatsApp Image 2026-10-18 at 17 13 34 (2) WhatsApp Image 2026-10-18 at 17 13 33 (1) WhatsApp Image 2026-10-18 at 17 13 33 (2) WhatsApp Image 2026-10-18 at 17 13 33 (3)

Behavior Notes

local songs change now do not cause the sudden snap on switching nor the app now show previous trucks while playing next ones rest of changes follow same already set flow and behavior also now app cache next and previous truck for smoother movement

Architecture Checklist

  • The change preserves UDF flow: UI -> ViewModel -> UseCase/domain -> Repository/data.
  • Screen state is represented structurally with Loading, Success, Empty, and Error where this PR introduces or changes screen state.
  • Composables receive immutable, UI-specific domain models instead of raw Room, network, or service entities.
  • Business work is not triggered directly from composition.
  • Exceptions are surfaced through explicit state or result types instead of being swallowed.
  • No runBlocking is introduced in app execution paths.

Compose / Material Checklist

  • UI state is hoisted out of composable layout code.
  • Reactive state is collected with collectAsStateWithLifecycle().
  • New UI models are annotated with @Immutable or @Stable.
  • Lazy layouts use stable key values and explicit contentType.
  • Non-primitive constants, structural lambdas, and allocation-heavy objects in hot paths are remembered.
  • Rapidly changing inputs such as scroll, gesture, animation, or playback progress use derivedStateOf where appropriate.
  • UI strings come from stringResource() and duplicated visible strings on the same screen are avoided.
  • Interactive elements keep a minimum 48dp touch target.
  • Material 3 / Material 3 Expressive tokens are used for color, typography, shape, and motion instead of hardcoded UI values.
  • Edge-to-edge layouts handle and consume WindowInsets correctly when this PR changes screen layout.

Concurrency / Performance Checklist

  • Business coroutines are scoped to viewModelScope or an existing lifecycle-owned application/service scope.
  • Disk, database, network, parsing, and heavy mapping work is dispatched to Dispatchers.IO or Dispatchers.Default.
  • Cancellation is handled explicitly where long-running work, playback, downloads, sync, lyrics fetching, or recognition is involved.
  • The change avoids blocking the main thread.
  • The change avoids unnecessary allocations in recomposition loops, playback loops, polling loops, and provider parsing paths.
  • Large lists, images, lyrics payloads, and network responses are bounded, streamed, cached, paged, or mapped off the main thread as appropriate.

Data / Persistence Checklist

  • Room entity, DAO, or database changes include a schema update under app/schemas.
  • Database migrations preserve existing user data and fail clearly when migration is impossible.
  • DataStore or preference-key changes are backward compatible.
  • Network DTOs remain isolated from UI models.
  • Provider responses handle missing, malformed, regional, or rate-limited data without crashing the app.

Playback / Integration Checklist

  • Media3 playback, queue, cache, and service behavior remains stable across foreground, background, notification, and process recreation paths.
  • Audio focus, notification controls, widgets, shortcuts, and media session actions are considered when playback behavior changes.
  • External integrations handle absent credentials, revoked auth, network failure, and API changes.
  • Native, AAR, or ABI-sensitive changes account for mobile/tv and universal, arm64, armeabi, x86, and x86_64 variants.

Localization / Assets Checklist

  • User-facing strings are added to the base resources and translated resources are updated or intentionally left for translation follow-up.
  • Unused string resources, drawables, and metadata are removed when replaced.
  • Image assets have explicit display dimensions and are decoded at the displayed size.
  • Fastlane metadata, screenshots, icons, or release text are updated when user-facing store behavior changes.

Privacy / Security Checklist

  • No secrets, keys, tokens, keystores, signing files, private certificates, or local machine paths are committed.
  • Logs do not expose access tokens, cookies, auth headers, user identifiers, listening history, or local file paths.
  • New network calls are justified by the feature and use existing client, proxy, timeout, and error-handling patterns.
  • User data remains local unless the PR explicitly documents the integration and consent path.

Verification

  • Android Studio sync:
  • Manual device/emulator verification:
  • UI screenshot/recording attached:
  • Accessibility or touch-target review:
  • Regression areas checked:
  • CI expectation:

Reviewer Focus

  • the code didn't work until i used JDK 21 so i updated the md file from 17 to 21 if that's okay pls check and confirm
  • not risky stuff but i removed the star project dialog because each build deleted the saved state and kept bugging me so pls be aware of that if merging to avoid merging that i should've excluded from the git but forgot entirely about it

Release Notes

  • added download location change
  • added full queue download support
  • added sound waves shaped seek bar
  • update search to search through local files too based on a tab switch
  • add quick local fille access tab in library
  • added delete for local files in the app (downloaded from the app still use remove download)
  • add a close player button in widget
  • theme color now change more smoothly

rukamori and others added 30 commits October 2, 2026 19:19
…roblems i usually don't work much on kotline that's why i didn't wanna contribute but i had enough time to learn it and check the code base by now so the changes i made are all in a localy saved branche i experiment in and i tested the features everything work, most of the changes wre for local filels because i do use that more: changed the local library filters adding ordering by adding date and played count and pllaying total time, made the default state of the added newly start by the new, added local library to the quick tabs of the library and extended main search to also search localy, in local player added caching to next and previuse song to avoid having to wait it to laod, also changed it for a smoother change generally if you change songs in app quicklly sometimes it start the song session change ui for the next yet since session start late it fail to tarminate and start the new one you get next song ui with previuse one fixed that by forcing session start to wait for user interaction to stop, added a new seek bar type waves show the sounds intensity very usufull for when you look for a specific part or moving around then checking time, for download extended the logic to let user select download path also added deleting local items from app added downloading fulll queue (yes wierd but trust had 5 people ask for it which is not much but) added closing button for the player on the widget because some android phones had it stuck there forever (mine included) also there was bug in the local files scanning it was enttirly ignoring the settings both on items length and paths to scan even with these set it did not respect them fixed by forcing looking to work only under these condetions. NOTE:please ignore any typos you find here english not my first language but i'm not that bad in it, it's just my keyboards keys are going bad and some letters get typed many times) EXTRA NOTE: the code didn't work until i used jdk 21 so i updated the md file from 17 to 21 if that's okay pls check and confirm
…roblems i usually don't work much on kotline that's why i didn't wanna contribute but i had enough time to learn it and check the code base by now so the changes i made are all in a localy saved branche i experiment in and i tested the features everything work, most of the changes wre for local filels because i do use that more: changed the local library filters adding ordering by adding date and played count and pllaying total time, made the default state of the added newly start by the new, added local library to the quick tabs of the library and extended main search to also search localy, in local player added caching to next and previuse song to avoid having to wait it to laod, also changed it for a smoother change generally if you change songs in app quicklly sometimes it start the song session change ui for the next yet since session start late it fail to tarminate and start the new one you get next song ui with previuse one fixed that by forcing session start to wait for user interaction to stop, added a new seek bar type waves show the sounds intensity very usufull for when you look for a specific part or moving around then checking time, for download extended the logic to let user select download path also added deleting local items from app added downloading fulll queue (yes wierd but trust had 5 people ask for it which is not much but) added closing button for the player on the widget because some android phones had it stuck there forever (mine included) also there was bug in the local files scanning it was enttirly ignoring the settings both on items length and paths to scan even with these set it did not respect them fixed by forcing looking to work only under these condetions. NOTE:please ignore any typos you find here english not my first language but i'm not that bad in it, it's just my keyboards keys are going bad and some letters get typed many times) EXTRA NOTE: the code didn't work until i used jdk 21 so i updated the md file from 17 to 21 if that's okay pls check and confirm

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rukamori and others added 28 commits October 20, 2026 18:28
… resolution and open podcast shows from media links rukamori#1448

Co-authored-by: mikooochi <89002922+mikooochi@users.noreply.github.com>
…g by album (fixes rukamori#1412) (rukamori#1468)

Co-authored-by: morieeattonkatsu <107134739+rukamori@users.noreply.github.com>
…m scrobbler (fixes rukamori#1445) (rukamori#1467)

Co-authored-by: morieeattonkatsu <107134739+rukamori@users.noreply.github.com>
…ith blank lines (rukamori#1463)

Co-authored-by: morieeattonkatsu <107134739+rukamori@users.noreply.github.com>
…ri#1317) (rukamori#1469)

Co-authored-by: morieeattonkatsu <107134739+rukamori@users.noreply.github.com>
…nded (fixes rukamori#1197) (rukamori#1466)

Co-authored-by: morieeattonkatsu <107134739+rukamori@users.noreply.github.com>
)

Co-authored-by: morieeattonkatsu <107134739+rukamori@users.noreply.github.com>
Co-authored-by: mikooochi <89002922+mikooochi@users.noreply.github.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.

6 participants