[PR #7611] Refactor GetDownload into LibraryManager. #11474

Closed
opened 2026-02-07 06:39:08 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/jellyfin/jellyfin/pull/7611

State: closed
Merged: No


Changes
Refactored GetDownload from LibraryController to LibraryManager.

This addresses #3122 where the LibraryController contained a direct reference to ActivityLog EF model class. Instead of creating a DTO class and refactoring ActivityManager to use a DTO, the logic was pulled into the service layer. The service layer now uses EventManager to publish ItemDownloadEventArgs to a newly created IEventConsumer, which will then create the ActivityLog records. The made the most sense since all other references to ActivityLog were also IEventConsumer logger-types.

Issues

Addresses #3122

**Original Pull Request:** https://github.com/jellyfin/jellyfin/pull/7611 **State:** closed **Merged:** No --- <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** Refactored `GetDownload` from `LibraryController` to `LibraryManager`. This addresses #3122 where the `LibraryController` contained a direct reference to `ActivityLog` EF model class. Instead of creating a DTO class and refactoring `ActivityManager` to use a DTO, the logic was pulled into the service layer. The service layer now uses `EventManager` to publish `ItemDownloadEventArgs` to a newly created `IEventConsumer`, which will then create the `ActivityLog` records. The made the most sense since all other references to `ActivityLog` were also `IEventConsumer` logger-types. **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Addresses #3122
OVERLORD added the pull-request label 2026-02-07 06:39:08 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#11474