1
0
mirror of https://git.sr.ht/~cadence/NewLeaf synced 2024-11-21 23:27:29 +00:00

Re-create resolution and qualityLabel fields

This commit is contained in:
Cadence Ember 2020-08-25 00:45:57 +12:00
parent f389bc1f48
commit de3b3db6d0

View File

@ -226,6 +226,13 @@ def get_more_stuff_from_file(id, result):
f["init"] = "{}-{}".format(i["initRange"]["start"], i["initRange"]["end"]) f["init"] = "{}-{}".format(i["initRange"]["start"], i["initRange"]["end"])
f["index"] = "{}-{}".format(i["indexRange"]["start"], i["indexRange"]["end"]) f["index"] = "{}-{}".format(i["indexRange"]["start"], i["indexRange"]["end"])
f["second__audioChannels"] = i["audioChannels"] f["second__audioChannels"] = i["audioChannels"]
if f["second__height"]:
resolution = str(f["second__height"]) + "p"
f["resolution"] = resolution
label = resolution
if f["fps"] > 30:
label += str(f["fps"])
f["qualityLabel"] = label
except Exception: except Exception:
print("messed up extracting recommendations.") print("messed up extracting recommendations.")