Add ability to specify different saved show name
This commit is contained in:
+25
-8
@@ -109,11 +109,18 @@ class AutoGrabber:
|
||||
if "/" not in line:
|
||||
continue
|
||||
|
||||
service_name, show_title = line.split("/", 1)
|
||||
service_name, remainder = line.split("/", 1)
|
||||
|
||||
if "|" in remainder:
|
||||
source_title, output_title = remainder.split("|", 1)
|
||||
else:
|
||||
source_title = remainder
|
||||
output_title = remainder
|
||||
|
||||
series.append((
|
||||
service_name.strip(),
|
||||
show_title.strip()
|
||||
source_title.strip(),
|
||||
output_title.strip()
|
||||
))
|
||||
|
||||
return series
|
||||
@@ -121,7 +128,12 @@ class AutoGrabber:
|
||||
# -------------------------
|
||||
# Process a single show
|
||||
# -------------------------
|
||||
def process_show(self, service_name, show_title):
|
||||
def process_show(
|
||||
self,
|
||||
service_name,
|
||||
source_title,
|
||||
output_title
|
||||
):
|
||||
|
||||
service = SERVICES.get(service_name.upper())
|
||||
|
||||
@@ -131,11 +143,11 @@ class AutoGrabber:
|
||||
return
|
||||
|
||||
print("\n==============================")
|
||||
print(f"📺 Show: {show_title}")
|
||||
print(f"📺 Show: {output_title}")
|
||||
print(f"📡 Service: {service_name}")
|
||||
print("==============================")
|
||||
|
||||
seasons = service.discover_seasons(show_title)
|
||||
seasons = service.discover_seasons(source_title)
|
||||
|
||||
if not seasons:
|
||||
|
||||
@@ -152,7 +164,7 @@ class AutoGrabber:
|
||||
for entry in data["entries"]:
|
||||
|
||||
episode = service.normalize_episode(
|
||||
show_title,
|
||||
output_title,
|
||||
entry
|
||||
)
|
||||
|
||||
@@ -208,11 +220,16 @@ class AutoGrabber:
|
||||
print("⚠️ No shows found in .series")
|
||||
return
|
||||
|
||||
for service_name, show_title in self.series_list:
|
||||
for (
|
||||
service_name,
|
||||
source_title,
|
||||
output_title
|
||||
) in self.series_list:
|
||||
|
||||
self.process_show(
|
||||
service_name,
|
||||
show_title
|
||||
source_title,
|
||||
output_title
|
||||
)
|
||||
|
||||
print("\n✅ Autograbber run complete")
|
||||
|
||||
Reference in New Issue
Block a user