Update media_path MACRO for archive.org transciption files

The whisper transcription files are stored one directory
deeper on archive.org. Add checks and correct path when
passed txt, srt, or vtt media_type.
This commit is contained in:
Roan Horning 2023-02-12 10:53:50 -05:00
parent a213efa695
commit d437e66f0e
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769

View File

@ -4,7 +4,7 @@
<!--% ELSE %-->
<!--% zero_pad_format = "%04s" %-->
<!--% END %-->
<!--% USE String(word) %-->
<!--% USE String(word) %-->
<!--% String.format(zero_pad_format) %-->
<!--% END %-->
@ -59,8 +59,14 @@
<!--% media_folder = "local/" %-->
<!--% END %-->
<!--% IF media_baseurl %-->
<!--% transcription_types = "txt srt vtt" %-->
<!--% USE String(transcription_types) %-->
<!--% USE String(media_baseurl) %-->
<!--% IF transcription_types.search(media_type) && media_baseurl.search('archive.org') %-->
<!--% media_baseurl = "${media_baseurl}hpr\$eps_id/hpr" %-->
<!--% END %-->
<!--% media_folder = "" %-->
<!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %-->
<!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %-->
<!--% END %-->
<!--% media_basepath(baseurl, media_baseurl) %--><!--% media_folder %--><!--% episode_type %--><!--% zero_pad_left(episode_id, padding) %-->.<!--% media_type %-->
<!--% END %-->