Skip to content

Commit

Permalink
Merge pull request #21 from hmlendea/file-naming
Browse files Browse the repository at this point in the history
Improved file naming
  • Loading branch information
hmlendea authored Jun 16, 2023
2 parents ed9f82f + 91f2f69 commit 57ae75a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plex-video-optimiser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ FFMPEG_ARGUMENTS=""

OUTPUT_FILE_NAME=${FILE_NAME}
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/\.mkv$//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(AMIABLE\|BAE\|BluHD\|BLUTONiUM\|BTN\|cakes\|CasStudio\|CHD\|CRiSC\|CtrlHD\|decibeL\|EbP\|ETRG\|FLUX\|FraMeSToR\|FREEHK\|ggez\|GOLDIES\|iNTERNAL\|TENEIGHTY\|TrollUHD\|playBD\|LazyStudio\|MovietaM\|NTb\|[Pp][Ss][Yy][Cc][Hh][Dd]\|t3nzin\|HDMaN\|BLUEBIRD\|TOMMY\|TrollUHD\|MTeam\|MZABI\|ZON3\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(AMIABLE\|BAE\|BLUEBIRD\|BluHD\|BLUTONiUM\|BTN\|cakes\|CasStudio\|CHD\|CRiSC\|CtrlHD\|decibeL\|EbP\|ETRG\|FLUX\|FraMeSToR\|FREEHK\|ggez\|GOLDIES\|HDMaN\|iNTERNAL\|LazyStudio\|L0L\|MovietaM\|MTeam\|MZABI\|NiXON\|NTb\|pawel2006\|playBD\|[Pp][Ss][Yy][Cc][Hh][Dd]\|t3nzin\|TENEIGHTY\|TOMMY\|TrollUHD\|ZON3\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(720p\|1080p\|2160[p]*\|4K\|UHD\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(10bit\|BT2020\|Chroma[\ \.]422[\ \.]Edition\|VISIONPLUS\|HDR1000\|HDR\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(AVC\|DV\|[Dd][Xx][Vv][Aa]\|HEVC\|[xX]26[45]\|[Hh]\.*26[45]\|-AJP69\|[Bb]lu-*[Rr]ay\|VC-1\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(AVC\|D[o]*V[i]*\|[Dd][Xx][Vv][Aa]\|HEVC\|[xX]26[45]\|[Hh]\.*26[45]\|-AJP69\|[Bb]lu-*[Rr]ay\|VC-1\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(Amazon\|AMZN\|ATVP\|Disney\|DSNP\|Vimeo\|[Ww][Ee][Bb]\(-DL\)*\|WEBRip\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(Extended Edition\|Extended\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(REPACK\|Remux\|REMUX\|RoSubbed\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(AC3\|AAC2\.0\|Atmos\|DTS-MA\|DTS-X\|DTS\|HD[-\ \.]MA\|LPCM\|DD+\|DD[P]*[\.]*[567]\.1\|DTSX\|FLAC[-\ \.][567]\.1\|TrueHD\|[567]\.1\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(AC3\|AAC2\.0\|Atmos\|DDP2\.0\|DTS-MA\|DTS-X\|DTS\|HD[-\ \.]MA\|LPCM\|DD+\|DD[P]*[\.]*[567]\.1\|DTSX\|FLAC[-\ \.][567]\.1\|TrueHD\|[567]\.1\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's/[-\ \.]*\(Director.s[. ]Cut\|Extended[. ]Edition\)//g')
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | iconv -f utf-8 -t ascii//translit)
OUTPUT_FILE_NAME=$(echo "${OUTPUT_FILE_NAME}" | sed 's@\(?\|!\|\\\|/\)@@g')
Expand Down

0 comments on commit 57ae75a

Please sign in to comment.