subsync icon indicating copy to clipboard operation
subsync copied to clipboard

Invalid output pattern / keyword

Open ghost opened this issue 5 years ago • 1 comments

I'm having issues whilst using subsync as a mod for bazarr https://hub.docker.com/r/wayller/bazarr-mod-subsync

So, essentially, for some reason it has suddenly stopped working due to my naming file scheme (which was working well before) as it contains the imdb number in brackets .e.g. {imdb-tt111111}

Apart from changing my entire library file naming is there anything that can be done?

The command I'm using is: subsync --cli sync --sub-lang '{{subtitles_language_code3}}' --ref-lang '{{episode_language_code3}}' --sub '{{subtitles}}' --ref '{{episode}}' --out '{{subtitles}}' --overwrite

Error output:

BAZARR Post-processing result for file /storage/hdd/media/movies/MovieName/MovieName {imdb-tt12109840} [WEBRIP-1080P][AAC 2.0][H264]-XPOST.mkv : [*] starting synchronization /storage/hdd/media/movies/MovieName/MovieName {imdb-tt12109840} [WEBRIP-1080P][AAC 2.0][H264]-XPOST.en.srt [!] Invalid output pattern, invalid keyword: 'imdb-tt12109840' pattern: /storage/hdd/media/movies/MovieName/MovieName {imdb-tt12109840} [WEBRIP-1080P][AAC 2.0][H264]-XPOST.en.srt

ghost avatar Oct 18 '20 10:10 ghost

That's because {imdb-tt12109840} part in output is treated as variable. You could use variables like {sub_name} or {ref_dir} in output path, but since there is no {imdb-tt12109840}. You could escape that with double braces - {{imdb-tt12109840}}, but I don't know how to do it from bazarr automatically. Alternatively you could set output to --out '{sub_path}'. {sub_path} is subtitles full path.

I will change this so {unknown_variable} will not be interpreted as variable. And maybe I will add switch to disable output path substitution entirely. Sorry for the confusion.

sc0ty avatar Oct 20 '20 17:10 sc0ty