From 35297d9da5eabe5dd73fb19214aeaf75ceb256ae Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Tue, 10 Dec 2024 19:36:58 +0100 Subject: [PATCH] feat: expose action to search for tmdb matches for all unlinked anime --- .../API/v3/Controllers/ActionController.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Shoko.Server/API/v3/Controllers/ActionController.cs b/Shoko.Server/API/v3/Controllers/ActionController.cs index 25e1ee584..54b230653 100644 --- a/Shoko.Server/API/v3/Controllers/ActionController.cs +++ b/Shoko.Server/API/v3/Controllers/ActionController.cs @@ -146,6 +146,17 @@ public ActionResult UpdateAllImages() return Ok(); } + /// + /// Scan for TMDB matches for all unlinked AniDB anime. + /// + /// + [HttpGet("SearchForTmdbMatches")] + public ActionResult SearchForTmdbMatches() + { + Task.Factory.StartNew(() => _tmdbService.ScanForMatches()); + return Ok(); + } + /// /// Updates all TMDB Movies in the local database. /// @@ -161,6 +172,7 @@ public ActionResult UpdateAllTmdbMovies() /// Purge all unused TMDB Movies that are not linked to any AniDB anime. /// /// + [Authorize("admin")] [HttpGet("PurgeAllUnusedTmdbMovies")] public ActionResult PurgeAllUnusedTmdbMovies() { @@ -172,6 +184,7 @@ public ActionResult PurgeAllUnusedTmdbMovies() /// Purge all TMDB Movie Collections. /// /// + [Authorize("admin")] [HttpGet("PurgeAllTmdbMovieCollections")] public ActionResult PurgeAllTmdbMovieCollections() { @@ -204,6 +217,7 @@ public ActionResult DownloadMissingTmdbPeople() /// Purge all unused TMDB Shows that are not linked to any AniDB anime. /// /// + [Authorize("admin")] [HttpGet("PurgeAllUnusedTmdbShows")] public ActionResult PurgeAllUnusedTmdbShows() { @@ -215,6 +229,7 @@ public ActionResult PurgeAllUnusedTmdbShows() /// Purge all TMDB Show Alternate Orderings. /// /// + [Authorize("admin")] [HttpGet("PurgeAllTmdbShowAlternateOrderings")] public ActionResult PurgeAllTmdbShowAlternateOrderings() {