def init_trakt(): def get_credentials(): password_hash = hashlib.sha1(Prefs['password']) return ( Prefs['username'], password_hash.hexdigest() ) Trakt.configure( # Application api_key='ba5aa61249c02dc5406232da20f6e768f3c82b28', # Version plugin_version=PLUGIN_VERSION, media_center_version=PlexMediaServer.get_version(), # Account credentials=get_credentials )