Git Product home page Git Product logo

plex-subtitle-normalizer's Introduction

Plex Subtitle Normalizer

Simple bash script for normalizing subtitles for usage in Plex Media Server.

Requirements

This script requires enca command available on your machine (for encoding detection)

Install enca using brew (MacOS)

brew install enca

Installation

There is an install script included, for installation just type following command

sh install.sh

Library root

You will be promped to insert your library root. This directory will be used for the subtitle search. There is also an option to set the library root during the installation, just pass it as an argument to the installation script.

sh install.sh /Users/current_user/Movies/

In that case you will not be promped for the library root.

Encoding

Currently the encoding for the enca command is set to czech during the installation. If you want to change it, you need to update your setting file after installation. Please note that after every installation run you need to update it again.

Your setting file location will be:

/Users/current_user/.plex_subtitle_normalizer/.settings

Usage

After the installation you wil have following command available

subtitle_normalize

This will run the normalization procedure on your whole library. It will create a backup of all your current subtitles as *.bck file. The precondition is, that in the directory there needs to be just the media file and a subtitle file. When other files are involved, the result is not guaranteed.

Currently there are two other options available

subtitle_normalize info

This info argument will print a basic info about your library like:

Library information
Library root: /Users/current_user/Movies/

[Media files]: 125
[Subtitles]: 122
[Missing subtitles]:
1: Serie 1
2: Serie 3
3: Serie 5

If you specify verbose for the previous command (meaning subtitle_normalize info verbose) then all the episode folders will be mentioned in the [Missing subtitles] section:

Library information
Library root: /Users/current_user/Movies/

[Media files]: 125
[Subtitles]: 121
[Missing subtitles]:
1: /Test/Serie 1/Serie 1 s01e01
2: /Test/Serie 3/Serie 3 s01e03
3: /Test/Serie 5/Serie 5 s01e01
4: /Test/Serie 5/Serie 5 s01e02

Then there is a simple way of reverting the changes you made by the script.

Important: The revert command is designed right now just for a development purpose so the result is not guaranteed on your directory structure, so if you are not sure about that, do not run it.

subtitle_normalize revert

plex-subtitle-normalizer's People

Contributors

ondrejfuhrer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.