You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ItemIdGenerator
ItemSorter (if this even needs to be something that is injected)
This list is not exhaustive and many more may be required to break it down more completely.
Discussion
I did start to work on a refactoring for this and got a fair way through, but it's such a wide spread and fundamental change that it would be easier to manage if the refactoring can be done in small chunks, making it easier to test and communicate.
The biggest snag was system wide messaging and service dependencies for thing like item sorting. Not to meantion the static dependencies in the BaseItem classes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've seen that there is an EF core migration underway, but I'm not aware of the scope exactly, so this may not be relevent.
Problem
The LibraryManager is currently a catch all for everything related to the media library, causing it to be used in almost all parts of the application.
Proposal
I'd like to propose that we break this manager class down into smaller services, eg.
ItemService
PeopleService
FolderService
ArtistService
StudioService
SeriesService
and separetly some other utility classes:
ItemIdGenerator
ItemSorter (if this even needs to be something that is injected)
This list is not exhaustive and many more may be required to break it down more completely.
Discussion
I did start to work on a refactoring for this and got a fair way through, but it's such a wide spread and fundamental change that it would be easier to manage if the refactoring can be done in small chunks, making it easier to test and communicate.
The biggest snag was system wide messaging and service dependencies for thing like item sorting. Not to meantion the static dependencies in the BaseItem classes.
Beta Was this translation helpful? Give feedback.
All reactions