Refactor Trakt class

pull/27/head
Mitchell Klijs 7 years ago committed by desimaniac
parent 75c51e83d1
commit d71ef2e574

@ -247,3 +247,15 @@ def is_movie_blacklisted(movie, blacklist_settings):
except Exception: except Exception:
log.exception("Exception determining if movie was blacklisted %s: ", movie) log.exception("Exception determining if movie was blacklisted %s: ", movie)
return blacklisted return blacklisted
def extract_list_user_and_key_from_url(list_url):
try:
import re
list_user = re.search('\/users\/([^/]*)', list_url).group(1)
list_key = re.search('\/lists\/([^/]*)', list_url).group(1)
return list_user, list_key
except:
log.error('The URL "%s" is not in the correct format', list_url)
exit()

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save