Multiple repositories in KM App
I could have sworn an issue already existed.
Today we have kara.moe as a main repository but KM itself is not yet able to manage multiple repositories at once.
A few things to note :
- A repository is a place where to download songs.
Frontend
-
Add repository to series and tags add/edit form. For editing, if the repo is changed, display a giant warning that you must know what you're doing by editing this, as it won't move tag files out of the repository for you, and it won't affect any karaoke linked to it -
We need a way to identify in the download page UI where a song comes from. We need to think of a good UI way to manage repositories in the download page. we treat all repos as one big download source. -
We need a repo management interface, with add/edit/delete -
On kara submission form, we need to have an input box for repo. Input box is editable, but a drop down must allow to select a known one, just like for tags/series. On KM Server, the box is greyed out and displays the server's domain. -
Call for API for unusedTags and unusedSeries for each repo to show which tags or series should be deleted. Note that we shouldn't allow users to delete these from the interface, as it might delete the tags/series in another repository. Should we make a route to allow the user to delete only the files then ? -
Maj config display
Backend
-
See point above about repository management -
Write API documentation
-
-
Add repository to series and tags -
On generation, songs from all repos in config file will be added. -
Write migration path at launch - Since a song can be on multiple repositories, we need to filter out KID duplicates.
-
During generation: they're skipped
-
-
This also affects TIDs and SIDs. -
The updateAllKaras() works only with karas from its own repo, it won't update karas from other repos -
The downloadAllKaras() will not download songs already fetched from other repos since they share the same KID -
The cleanAllKaras() needs to remove karas not in their repo anymore and only those, it must not touch other karas from different repos -
We need a way to move a song to another repository. Editing its repo in the submission form is going to be a whole new level of nightmare. - If the repo changes from the old kara we need to remove all files from the old repo dir
- We must ensure we don't remove tags or sids that are still used by other songs.
-
API to list unused tags -
Same with series -
Same with medias while we're at it.
Edited by Leon