Skip to content

Commit

Permalink
subtitles: Improved subtitle language detection
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlendea committed Jun 28, 2023
1 parent 57ae75a commit a5e36dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plex-video-optimiser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ function getSubtitleTrackName {
-e 's/[Ee]uropean/Europe/g' | \
sed -e 's/^\('"${LANGUAGE_VARIANTS_PATTERN}"'\)\s\s*\(.*\)/\2 (\1)/g' \
-e 's/\(.*\)\s\s*\('"${LANGUAGE_VARIANTS_PATTERN}"'\)$/\1 (\2)/g' | \
sed -e 's/\[Full\]//g' | \
sed -e 's/^العربية/Arabic/g' \
-e 's/^中文/Chinese/g' \
-e 's/^(廣東話\|[Yy]ue)/Cantonese/g' \
Expand Down Expand Up @@ -147,7 +148,9 @@ function getSubtitleTrackName {
-e 's/^తెలుగు/Telugu/g' \
-e 's/^ไทย/Thai/g' \
-e 's/^українська/Ukrainian/g' \
-e 's/^Tiếng Việt/Vietnamese/g'
-e 's/^Tiếng Việt/Vietnamese/g' | \
sed -e 's/^\s*//g' \
-e 's/\s*$//g'
}

function getTrackName {
Expand Down

0 comments on commit a5e36dc

Please sign in to comment.