mirror of
https://github.com/sbondCo/Watcharr.git
synced 2026-08-07 07:14:44 +00:00
Search by tmdbId with movie or tv or series provider aliases
barbarically
This commit is contained in:
@@ -198,7 +198,8 @@
|
||||
let p = spl[0]?.toLowerCase();
|
||||
switch (p) {
|
||||
// Default names that are supported right out of the box
|
||||
case "tmdb":
|
||||
case "movie": // tmdb id target
|
||||
case "tv": // tmdb id target
|
||||
case "imdb":
|
||||
case "tvdb":
|
||||
case "youtube":
|
||||
@@ -227,6 +228,9 @@
|
||||
case "game":
|
||||
p = "igdb";
|
||||
break;
|
||||
case "series":
|
||||
p = "tv";
|
||||
break;
|
||||
// If none match, then is invalid provider.
|
||||
default:
|
||||
console.info("checkForExternalIdSearch: Invalid provider found:", p);
|
||||
@@ -278,7 +282,15 @@
|
||||
return;
|
||||
}
|
||||
allSearchResults.push(...data);
|
||||
} else if (extProvider.provider === "tmdb") {
|
||||
} else if (
|
||||
extProvider.provider === "tv" ||
|
||||
extProvider.provider === "movie"
|
||||
) {
|
||||
// HACK I can't be bothered doing a test api call here,
|
||||
// assuming that people paste the id in, this should work
|
||||
// without the debounce going to an incomplete id.
|
||||
// Flesh out if anyone has issues.
|
||||
goto(`/${extProvider.provider}/${extProvider.id}`);
|
||||
} else {
|
||||
// Else call tmdb `external id` endpoint
|
||||
console.log("Search: Performing external id search.");
|
||||
|
||||
Reference in New Issue
Block a user