Refactor Trakt class

pull/25/head
Mitchell Klijs 7 years ago
parent ae4d00298b
commit a31f46bf91

@ -247,3 +247,15 @@ def is_movie_blacklisted(movie, blacklist_settings):
except Exception:
log.exception("Exception determining if movie was blacklisted %s: ", movie)
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