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 json
|
||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import ox
|
|
||||||
import ox.web.auth
|
|
||||||
import sys
|
import sys
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
|
import ox
|
||||||
|
import ox.web.auth
|
||||||
|
|
||||||
|
|
||||||
base_url = None
|
base_url = None
|
||||||
stream_resolution = 480
|
stream_resolution = 480
|
||||||
prefix = '/mnt'
|
prefix = '/mnt'
|
||||||
|
@ -17,6 +19,7 @@ render = './cache'
|
||||||
pandora_client_config = {}
|
pandora_client_config = {}
|
||||||
use_local = False
|
use_local = False
|
||||||
|
|
||||||
|
|
||||||
class API(ox.API):
|
class API(ox.API):
|
||||||
|
|
||||||
def save_url(self, url, filename, overwrite=False):
|
def save_url(self, url, filename, overwrite=False):
|
||||||
|
@ -53,8 +56,8 @@ def get_info(api, oshash, item, part):
|
||||||
'keys': ['id', 'instances', 'resolution']
|
'keys': ['id', 'instances', 'resolution']
|
||||||
})['data']
|
})['data']
|
||||||
if not r['items'][0]['instances']:
|
if not r['items'][0]['instances']:
|
||||||
print(r, item, part)
|
|
||||||
if use_local:
|
if use_local:
|
||||||
|
print(r, item, part)
|
||||||
raise Exception('item without instance')
|
raise Exception('item without instance')
|
||||||
files[oshash] = {
|
files[oshash] = {
|
||||||
'resolution': r['items'][0]['resolution']
|
'resolution': r['items'][0]['resolution']
|
||||||
|
|
Loading…
Reference in a new issue