Fixed movies subtitles paths being shown in UI without being mapped.

This commit is contained in:
vitiko98 2021-06-03 20:53:27 -04:00 committed by morpheus65535
parent 11fb78fafa
commit d562faf151
3 changed files with 4 additions and 1 deletions

View File

@ -159,6 +159,7 @@ def postprocessEpisode(item):
"code2": subtitle[0],
"code3": alpha3_from_alpha2(subtitle[0]),
"path": subs[1],
"mapped_path": path_mappings.path_replace(subs[1]),
"forced": False,
"hi": False}
if len(subtitle) > 1:
@ -225,6 +226,7 @@ def postprocessMovie(item):
for i, subs in enumerate(item['subtitles']):
language = subs[0].split(':')
item['subtitles'][i] = {"path": subs[1],
"mapped_path": path_mappings.path_replace_movie(subs[1]),
"name": language_from_alpha2(language[0]),
"code2": language[0],
"code3": alpha3_from_alpha2(language[0]),

View File

@ -37,6 +37,7 @@ interface Subtitle extends Language {
forced: boolean;
hi: boolean;
path: string | null;
mapped_path: string | null;
}
interface PathType {

View File

@ -32,7 +32,7 @@ const Table: FunctionComponent<Props> = ({ movie, profile }) => {
} else if (row.value === missingText) {
return <span className="text-muted">{row.value}</span>;
} else {
return row.value;
return row.row.original.mapped_path;
}
},
},