Skip to content

Commit

Permalink
Merge pull request #23 from hmlendea/subtitles
Browse files Browse the repository at this point in the history
Improved subtitle language detection
  • Loading branch information
hmlendea authored Apr 11, 2024
2 parents 41f5e16 + a5e36dc commit 350fb3f
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 350fb3f

Please sign in to comment.