diff --git a/edit.py b/edit.py index b11a7f7..80b690e 100755 --- a/edit.py +++ b/edit.py @@ -4,12 +4,14 @@ import getpass import json import math import os -import ox -import ox.web.auth import sys import urllib.parse import urllib.request +import ox +import ox.web.auth + + base_url = None stream_resolution = 480 prefix = '/mnt' @@ -17,6 +19,7 @@ render = './cache' pandora_client_config = {} use_local = False + class API(ox.API): def save_url(self, url, filename, overwrite=False): @@ -53,8 +56,8 @@ def get_info(api, oshash, item, part): 'keys': ['id', 'instances', 'resolution'] })['data'] if not r['items'][0]['instances']: - print(r, item, part) if use_local: + print(r, item, part) raise Exception('item without instance') files[oshash] = { 'resolution': r['items'][0]['resolution']