#662 Fixed the logic of getting files from playlist#774
Merged
kagemomiji merged 15 commits intomainfrom Aug 30, 2025
Merged
Conversation
Bumps [io.dropwizard.metrics:metrics-jmx](https://github.com/dropwizard/metrics) from 4.2.33 to 4.2.34. - [Release notes](https://github.com/dropwizard/metrics/releases) - [Commits](dropwizard/metrics@v4.2.33...v4.2.34) --- updated-dependencies: - dependency-name: io.dropwizard.metrics:metrics-jmx dependency-version: 4.2.34 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.jsoup:jsoup](https://github.com/jhy/jsoup) from 1.21.1 to 1.21.2. - [Release notes](https://github.com/jhy/jsoup/releases) - [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES.md) - [Commits](jhy/jsoup@jsoup-1.21.1...jsoup-1.21.2) --- updated-dependencies: - dependency-name: org.jsoup:jsoup dependency-version: 1.21.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [io.dropwizard.metrics:metrics-core](https://github.com/dropwizard/metrics) from 4.2.33 to 4.2.34. - [Release notes](https://github.com/dropwizard/metrics/releases) - [Commits](dropwizard/metrics@v4.2.33...v4.2.34) --- updated-dependencies: - dependency-name: io.dropwizard.metrics:metrics-core dependency-version: 4.2.34 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.32.0 to 0.33.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](aquasecurity/trivy-action@0.32.0...0.33.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-version: 0.33.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [io.dropwizard.metrics:metrics-jmx](https://github.com/dropwizard/metrics) from 4.2.33 to 4.2.35. - [Release notes](https://github.com/dropwizard/metrics/releases) - [Commits](dropwizard/metrics@v4.2.33...v4.2.35) --- updated-dependencies: - dependency-name: io.dropwizard.metrics:metrics-jmx dependency-version: 4.2.35 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [io.dropwizard.metrics:metrics-core](https://github.com/dropwizard/metrics) from 4.2.33 to 4.2.35. - [Release notes](https://github.com/dropwizard/metrics/releases) - [Commits](dropwizard/metrics@v4.2.33...v4.2.35) --- updated-dependencies: - dependency-name: io.dropwizard.metrics:metrics-core dependency-version: 4.2.35 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.49.5 to 3.50.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](typetools/checker-framework@checker-framework-3.49.5...checker-framework-3.50.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-version: 3.50.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…etrics-metrics-jmx-4.2.34' into issue662-fix-playlist-transaction-issue
…-1.21.2' into issue662-fix-playlist-transaction-issue
…etrics-metrics-core-4.2.34' into issue662-fix-playlist-transaction-issue
…curity/trivy-action-0.33.0' into issue662-fix-playlist-transaction-issue
…etrics-metrics-jmx-4.2.35' into issue662-fix-playlist-transaction-issue
…-fix-playlist-transaction-issue
…ework-checker-qual-3.50.0' into issue662-fix-playlist-transaction-issue
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.
Fix #662
This pull request refactors playlist creation and retrieval logic, improves separation of concerns, and introduces new repository methods and tests for handling playlist media files.
The main changes include moving playlist-related logic out of the controller into the service layer, updating dependency injection patterns, and adding a dedicated repository and test coverage for playlist media file retrieval.
Playlist creation and controller/service refactoring:
PlaylistWSControllerto remove direct dependencies onMediaFolderServiceandPlayerService, delegating playlist creation for starred songs and play queues to new service methods (createPlaylistForStarredSongs,createPlaylistForPlayQueue) inPlaylistService. This simplifies the controller and centralizes playlist logic. [1] [2]PlaylistServiceto use constructor-based dependency injection for all required services and repositories, improving testability and code clarity.Repository and data access improvements:
PlaylistMediaFileRepositorywith a newfindMediaFilesByPlaylistIdmethod to efficiently fetch media files for a playlist, ordered by their position. The service layer now uses this repository instead of traversing entity relationships directly. [1] [2]Service layer enhancements:
PlaylistServicefor creating playlists from play queues and starred songs, encapsulating formatting, resource bundle lookup, and file assignment logic.Test coverage:
PlaylistMediaFileRepositoryTestto verify correct retrieval and ordering of media files for playlists, including edge cases for empty results.PlaylistServiceTestto mock the new repository and ensure compatibility with the refactored service. [1] [2][1] [2] [3] [4] [5] [6] [7] [8] [9]