Coder Social home page Coder Social logo

media-library-helper's Introduction

media-library-helper

A collection of scripts to help me manage my media library and maintain the file structure required by Jellyfin (and possibly also Emby/Plex).

โš ๏ธ Some of these scripts can modify and potentially remove files. As of now, they are not thoroughly tested. Make sure you have backups and understand the code before using it, and do so at your own risks.

Requirements

In addition to the modules in requirements.txt, these should be installed and added to your PATH:

  • ffmpeg
  • flac

Some scripts use spacy for natural language processing and models need to be downloaded separately for each language https://spacy.io/models

python -m spacy download en-core-web-trf

Note that transformer (trf) models are highly recommended to get acceptable results. Those models require PyTorch, which may take a while to be available on the latest version of Python. In case of installation issues, revert to a previous version of Python.

Structure

The scripts are sorted into folder depending on the type of files they act on

  • audio

    • reencode_flac: Reencodes Flac files in place if they have been encoded with older versions of FLAC
  • fs (file system)

    • FileSet: Class for quick, reusable, in-memory name-based file search, and folder comparison using set operations.
    • find_empty_dirs: Finds directories that are empty and optionally removes them. Can also ignore small or hidden files.
  • video

    • clean_subs: Removes common advertisement strings as well as formatting tags from subtitle files. Also attempts to detect ALL-CAPS subtitles and to apply grammatically correct capitalization.
    • extract_subs: Extracts text based subtitles from video files and saves them as .srt.
    • match_subs: Renames and relocate subtitles to match their associated video file and comply with tagging standards. Also finds dangling subtitle files.
  • shared: functions meant to be used by other scripts and not by the end user

Importing

The modules can be imported as follows:

from video.extract_subs import extract_subs

To run from CLI under windows

Add the path to media-library-helper to a PYTHONPATH environment variable in Windows, and then you can run with, for example:

python -m audio.reencode_flac arguments

media-library-helper's People

Contributors

guiweber avatar

Watchers

 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.