From 9dd7d586182aedd62366e22b8092ad65a8aca7ec Mon Sep 17 00:00:00 2001 From: echel0n Date: Thu, 29 May 2014 07:16:23 -0700 Subject: [PATCH] Fixed TVRage searches --- lib/tvrage_api/tvrage_api.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/tvrage_api/tvrage_api.py b/lib/tvrage_api/tvrage_api.py index 1993aa0f..69031bd5 100644 --- a/lib/tvrage_api/tvrage_api.py +++ b/lib/tvrage_api/tvrage_api.py @@ -435,10 +435,6 @@ class TVRage: # clean up value and do type changes if value: - if key == 'link': - value = value.rsplit('/', 1)[1] - key = 'id' - if isinstance(value, dict): if key == 'network': value = value['#text'] @@ -612,6 +608,9 @@ class TVRage: try: k = k.lower() if v is not None: + if k == 'link': + v = v.rsplit('/', 1)[1] + k = 'id' v = self._cleanData(v) self._setItem(sid, seas_no, ep_no, k, v)