refactor: create MusicLibrary and VideosLibrary models to better track library changes#773
Draft
huynhsontung wants to merge 3 commits intomainfrom
Draft
refactor: create MusicLibrary and VideosLibrary models to better track library changes#773huynhsontung wants to merge 3 commits intomainfrom
huynhsontung wants to merge 3 commits intomainfrom
Conversation
Base automatically changed from
copilot/refactor-library-service-stateless
to
main
January 18, 2026 21:07
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.
This pull request refactors the way music and video library data is managed in the application, moving from multiple loose collections and view models in
LibraryContextto encapsulatedMusicLibraryandVideosLibrarymodel objects. It also updates service interfaces and implementations to support progress reporting and improves code clarity and maintainability. The most important changes are grouped below.Library Data Model Refactoring
Songs,Albums,Artists, etc.) inLibraryContextwith newMusicLibraryandVideosLibrarymodel objects, which encapsulate related data and simplify state management. (Screenbox.Core/Contexts/LibraryContext.cs,Screenbox.Core/Models/MusicLibrary.cs,Screenbox.Core/Models/VideosLibrary.cs) [1] [2] [3]StorageMusicLibrary,StorageVideosLibrary, etc.), improving naming consistency and clarity. (Screenbox.Core/Controllers/LibraryController.cs,Screenbox.Core/Services/LibraryService.cs) [1] [2] [3] [4] [5] [6] [7] [8]Service Interface and Implementation Updates
ILibraryServiceand its implementation to support progress reporting viaIProgress<List<MediaViewModel>>when fetching music and videos, allowing for better feedback during long-running operations. (Screenbox.Core/Services/ILibraryService.cs,Screenbox.Core/Services/LibraryService.cs) [1] [2] [3]Codebase Cleanup
LibraryContentChangedMessageclass and its usages, streamlining message handling and reducing unnecessary complexity. (Screenbox.Core/Messages/LibraryContentChangedMessage.cs,Screenbox.Core/Contexts/LibraryContext.cs,Screenbox.Core/Screenbox.Core.csproj) [1] [2] [3]Dependency Registration Adjustments
ArtistViewModelFactoryandAlbumViewModelFactory, reflecting changes in how these factories are used with the new data models. (Screenbox.Core/Common/ServiceHelpers.cs)Project File Updates
MusicLibrary.cs,VideosLibrary.cs) to the project file and removed the obsolete message file, ensuring all changes are properly included in builds. (Screenbox.Core/Screenbox.Core.csproj) [1] [2] [3]