This commit is contained in:
j 2017-05-20 15:32:51 +00:00
parent 0bff35dbf0
commit 09ef40893b
3 changed files with 6 additions and 5 deletions

View File

@ -122,8 +122,9 @@ def encode(xml, force=False):
subprocess.call(cmd)
shutil.move(mp4, public_mp4)
shutil.move(mp4_480p, public_mp4_480p)
cms = [
'./subtitles.py', item_json
cmd = [
'./subtitles.py',
item_json
]
subprocess.call(cmd)

View File

@ -281,7 +281,7 @@ KEYWORDS = {
"first contact",
"foreigner",
"intercourse",
"xenophilia/xenophopia",
"xenophilia/xenophobia",
],
"Y": [
"first contact",

4
subtitles.py Normal file → Executable file
View File

@ -36,7 +36,7 @@ def get_api():
api.signin(**ox.web.auth.get('cdosea'))
def get_subtitles():
def update_subtitles():
get_api()
items = api.find({
'query': {
@ -93,7 +93,7 @@ if __name__ == '__main__':
if os.path.exists('subtitles.json'):
items = json.load(open('subtitles.json'))
else:
items = get_subtitles()
items = update_subtitles()
with open('subtitles.json', 'w') as fd:
json.dump(items, fd, indent=4, ensure_ascii=False)