hotfix categories from imdb result instead (#189)

* category mapping from imdb

* version bump
This commit is contained in:
iPromKnight
2024-03-30 01:26:02 +00:00
committed by GitHub
parent 08639a3254
commit c6d4c06d70
3 changed files with 30 additions and 19 deletions

View File

@@ -94,7 +94,7 @@ services:
condition: service_healthy condition: service_healthy
env_file: stack.env env_file: stack.env
hostname: knightcrawler-addon hostname: knightcrawler-addon
image: gabisonfire/knightcrawler-addon:2.0.12 image: gabisonfire/knightcrawler-addon:2.0.13
labels: labels:
logging: promtail logging: promtail
networks: networks:
@@ -117,7 +117,7 @@ services:
redis: redis:
condition: service_healthy condition: service_healthy
env_file: stack.env env_file: stack.env
image: gabisonfire/knightcrawler-consumer:2.0.12 image: gabisonfire/knightcrawler-consumer:2.0.13
labels: labels:
logging: promtail logging: promtail
networks: networks:
@@ -138,7 +138,7 @@ services:
redis: redis:
condition: service_healthy condition: service_healthy
env_file: stack.env env_file: stack.env
image: gabisonfire/knightcrawler-debrid-collector:2.0.12 image: gabisonfire/knightcrawler-debrid-collector:2.0.13
labels: labels:
logging: promtail logging: promtail
networks: networks:
@@ -152,7 +152,7 @@ services:
migrator: migrator:
condition: service_completed_successfully condition: service_completed_successfully
env_file: stack.env env_file: stack.env
image: gabisonfire/knightcrawler-metadata:2.0.12 image: gabisonfire/knightcrawler-metadata:2.0.13
networks: networks:
- knightcrawler-network - knightcrawler-network
restart: "no" restart: "no"
@@ -163,7 +163,7 @@ services:
postgres: postgres:
condition: service_healthy condition: service_healthy
env_file: stack.env env_file: stack.env
image: gabisonfire/knightcrawler-migrator:2.0.12 image: gabisonfire/knightcrawler-migrator:2.0.13
networks: networks:
- knightcrawler-network - knightcrawler-network
restart: "no" restart: "no"
@@ -182,7 +182,7 @@ services:
redis: redis:
condition: service_healthy condition: service_healthy
env_file: stack.env env_file: stack.env
image: gabisonfire/knightcrawler-producer:2.0.12 image: gabisonfire/knightcrawler-producer:2.0.13
labels: labels:
logging: promtail logging: promtail
networks: networks:
@@ -207,7 +207,7 @@ services:
deploy: deploy:
replicas: ${QBIT_REPLICAS:-0} replicas: ${QBIT_REPLICAS:-0}
env_file: stack.env env_file: stack.env
image: gabisonfire/knightcrawler-qbit-collector:2.0.12 image: gabisonfire/knightcrawler-qbit-collector:2.0.13
labels: labels:
logging: promtail logging: promtail
networks: networks:

View File

@@ -20,7 +20,7 @@ x-depends: &knightcrawler-app-depends
services: services:
metadata: metadata:
image: gabisonfire/knightcrawler-metadata:2.0.12 image: gabisonfire/knightcrawler-metadata:2.0.13
env_file: ../../.env env_file: ../../.env
networks: networks:
- knightcrawler-network - knightcrawler-network
@@ -30,7 +30,7 @@ services:
condition: service_completed_successfully condition: service_completed_successfully
migrator: migrator:
image: gabisonfire/knightcrawler-migrator:2.0.12 image: gabisonfire/knightcrawler-migrator:2.0.13
env_file: ../../.env env_file: ../../.env
networks: networks:
- knightcrawler-network - knightcrawler-network
@@ -40,7 +40,7 @@ services:
condition: service_healthy condition: service_healthy
addon: addon:
image: gabisonfire/knightcrawler-addon:2.0.12 image: gabisonfire/knightcrawler-addon:2.0.13
<<: [*knightcrawler-app, *knightcrawler-app-depends] <<: [*knightcrawler-app, *knightcrawler-app-depends]
restart: unless-stopped restart: unless-stopped
hostname: knightcrawler-addon hostname: knightcrawler-addon
@@ -48,22 +48,22 @@ services:
- "7000:7000" - "7000:7000"
consumer: consumer:
image: gabisonfire/knightcrawler-consumer:2.0.12 image: gabisonfire/knightcrawler-consumer:2.0.13
<<: [*knightcrawler-app, *knightcrawler-app-depends] <<: [*knightcrawler-app, *knightcrawler-app-depends]
restart: unless-stopped restart: unless-stopped
debridcollector: debridcollector:
image: gabisonfire/knightcrawler-debrid-collector:2.0.12 image: gabisonfire/knightcrawler-debrid-collector:2.0.13
<<: [*knightcrawler-app, *knightcrawler-app-depends] <<: [*knightcrawler-app, *knightcrawler-app-depends]
restart: unless-stopped restart: unless-stopped
producer: producer:
image: gabisonfire/knightcrawler-producer:2.0.12 image: gabisonfire/knightcrawler-producer:2.0.13
<<: [*knightcrawler-app, *knightcrawler-app-depends] <<: [*knightcrawler-app, *knightcrawler-app-depends]
restart: unless-stopped restart: unless-stopped
qbitcollector: qbitcollector:
image: gabisonfire/knightcrawler-qbit-collector:2.0.12 image: gabisonfire/knightcrawler-qbit-collector:2.0.13
<<: [*knightcrawler-app, *knightcrawler-app-depends] <<: [*knightcrawler-app, *knightcrawler-app-depends]
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:

View File

@@ -148,13 +148,10 @@ public partial class DebridMediaManagerCrawler(
InfoHash = hashElement.ToString(), InfoHash = hashElement.ToString(),
Seeders = 0, Seeders = 0,
Leechers = 0, Leechers = 0,
Category = parsedTorrent.Response.IsMovie switch Category = AssignCategory(result),
{
true => "movies",
false => "tv",
},
RtnResponse = parsedTorrent.Response.ToJson(), RtnResponse = parsedTorrent.Response.ToJson(),
}; };
private Task AddToCache(string lowerCaseTitle, ImdbEntry best) private Task AddToCache(string lowerCaseTitle, ImdbEntry best)
{ {
@@ -208,4 +205,18 @@ public partial class DebridMediaManagerCrawler(
return (pageIngested, name); return (pageIngested, name);
} }
private static string AssignCategory(ImdbEntry entry) =>
entry.Category switch
{
"movie" => "movies",
"tvMovie" => "movies",
"tvSeries" => "tv",
"tvEpisode" => "tv",
"tvSpecial" => "tv",
"tvMiniSeries" => "tv",
"tv" => "tv",
"short" => "tv",
_ => "unknown",
};
} }