only output info in local mode
This commit is contained in:
parent
87b161bf63
commit
63b6db557d
1 changed files with 6 additions and 3 deletions
9
edit.py
9
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']
|
||||
|
|
Loading…
Reference in a new issue