Compare commits

..

No commits in common. "ddb70beedd6131683c8aa2c4fe7eb31d5d0f7053" and "7008fa7e1f3206bb0fc3b27bb4a55e535186d96a" have entirely different histories.

3 changed files with 6 additions and 26 deletions

View file

@ -24,14 +24,6 @@ FONT_BORDER = 4
SUB_MARGIN = 2 * 36 + 6
def hide_gnome_overview():
import dbus
bus = dbus.SessionBus()
shell = bus.get_object('org.gnome.Shell', '/org/gnome/Shell')
props = dbus.Interface(shell, 'org.freedesktop.DBus.Properties')
props.Set('org.gnome.Shell', 'OverviewActive', False)
def mpv_log(loglevel, component, message):
logger.info('[{}] {}: {}'.format(loglevel, component, message))
@ -285,8 +277,4 @@ def main():
if __name__ == "__main__":
try:
hide_gnome_overview()
except:
pass
main()

View file

@ -139,7 +139,7 @@ def compose(clips, target=150, base=1024, voice_over=None):
elif 'Free' in voc['src']:
a, b = '5.2', '-3.8'
elif 'Ashley' in voc['src']:
a, b = '3.75', '-5.25'
a, b = '4.5', '-4.5'
voc['filter'] = {'volume': a}
scene['audio-center']['A1'].append(voc)
vo_low = vo.copy()
@ -580,14 +580,11 @@ def update_subtitles(options):
for clip in scene['audio-center']['A1']:
if not clip.get("blank"):
batch, fragment_id = clip['src'].replace('.wav', '').split('/')[-2:]
vo = item.models.Item.objects.filter(data__batch__icontains=batch, data__title__startswith=fragment_id + '_').first()
vo = item.models.Item.objects.filter(data__icontains='2-Whispered', data__title__startswith=fragment_id + '_').first()
if vo:
#print("%s => %s %s" % (clip['src'], vo, vo.get('batch')))
for sub in vo.annotations.filter(layer="subtitles").exclude(value="").order_by("start"):
sdata = get_srt(sub, offset)
subs.append(sdata)
else:
print("could not find vo for %s" % clip['src'])
offset += clip['duration']
path = folder / "front.srt"
srt = ox.srt.encode(subs)

View file

@ -13,15 +13,10 @@ def get_propery(element, name):
def melt_xml(file):
out = None
real_path = os.path.realpath(path)
if file in _CACHE and isinstance(_CACHE[file], list)
ts, out = _CACHE[file]
if os.stat(real_path).st_mtime != ts:
out = None
if not out:
out = subprocess.check_output(['melt', file, '-consumer', 'xml']).decode()
_CACHE[file] = [os.stat(real_path).st_mtime, out]
if file in _CACHE:
out = _CACHE[file]
else:
out = _CACHE[file] = subprocess.check_output(['melt', file, '-consumer', 'xml']).decode()
return out