Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbaschak/3d9d8da440bbd9373237fc16880c1f0b to your computer and use it in GitHub Desktop.
Save tbaschak/3d9d8da440bbd9373237fc16880c1f0b to your computer and use it in GitHub Desktop.
A (hacky) Fix for American Dad! series confusion between TVDB and SickBeard
diff --git a/lib/tvdb_api/tvdb_api.py b/lib/tvdb_api/tvdb_api.py
index 0970288..b45d619 100644
--- a/lib/tvdb_api/tvdb_api.py
+++ b/lib/tvdb_api/tvdb_api.py
@@ -834,6 +834,14 @@ class Tvdb:
seas_no = int(float(elem_seasnum.text))
ep_no = int(float(elem_epno.text))
+ # Fixes American Dad! issue from TVDB
+ if sid == 73141:
+ if seas_no==2:
+ seas_no = 1
+ ep_no = ep_no+7
+ if seas_no>2:
+ seas_no=seas_no-1
+
for cur_item in cur_ep.getchildren():
tag = cur_item.tag.lower()
value = cur_item.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment