Coder Social home page Coder Social logo

morristech / plex-orphaned-files Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jakewharton/plex-orphaned-files

0.0 0.0 0.0 87 KB

Find files in your Plex libraries which are not indexed

License: Apache License 2.0

Dockerfile 2.93% Kotlin 97.07%

plex-orphaned-files's Introduction

Plex Orphaned Files

Find files in your Plex libraries which are not indexed by Plex.

Available as a standalone binary and Docker container.

Usage

You will need a Plex authentication token to use this tool. See Plex's documentation on how to obtain yours.

From there, you can access the tool in one of two ways:

Binary

Install on Mac with:

$ brew install JakeWharton/repo/plex-orphaned-files

which will put the plex-orphaned-files on your shell path (assuming Homebrew is set up correctly).

For other platforms, download ZIP from latest release and run bin/plex-orphaned-files or bin/plex-orphaned-files.bat.

See command-line usage for how to run the binary.

Docker

The binary is available through Docker to simplify use:

$ docker run jakewharton/plex-orphaned-files:1

(Image also available at ghcr.io/jakewharton/plex-orphaned-files:1)

Docker Image Version Docker Image Size

The tool will need to access the filesystem in the same way Plex would. For simplicity, it's easiest to mirror the volume mounts of your Plex Docker container. If you are not running Plex in Docker, you can mount your library folders in the container using the same paths as they exist on the host.

If for whatever reason you cannot mirror the filesystem in the container exactly as Plex sees it, use the --folder-mapping argument to change Plex's file paths into paths that can be read inside the container.

See command-line usage for how to run the binary.

Command-Line

Usage: plex-orphaned-files [OPTIONS] [LIBRARY]...

  Find files in your Plex libraries which are not indexed by Plex.

Options:
  --base-url URL            Base URL of Plex server web interface (e.g.,
                            http://plex:32400/)
  --token TOKEN             Plex authentication token. See:
                            https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/
  --folder-mapping MAPPING  Map a Plex folder path to filesystem path (e.g.,
                            /media:/tank/media)
  --exclude-files GLOB      Glob pattern of files to ignore (e.g.,
                            /media/**/*.nfo, /music/**/cover.*)
  --exclude-library NAME    Name of libraries to exclude. Mutually exclusive
                            with LIBRARY arguments.
  -h, --help                Show this message and exit

Arguments:
  LIBRARY  Name of libraries to scan. All libraries will be scanned if none
           specified. Mutually exclusive with --exclude-library

The --base-url and --token arguments are required.

When run, the tool will traverse all of your Plex libraries to get their folder paths. Then, it will obtain every file in those paths and compare it to items in that Plex library. Any files which are not indexed by Plex will be output, and the command will have an exit code of 1.

$ plex-orphaned-files --base-url http://plexms:32400/ --token MY_TOKEN
Photos: /media/photos/Area_51/blueprints.png

Development

To run the latest code build with ./gradlew installDist. This will put the application into build/install/plex-orphaned-files/. From there you can use the command-line instructions instructions to run.

The Docker containers can be built with docker build ., which also runs the full set of checks as CI would.

License

Copyright 2021 Jake Wharton

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

plex-orphaned-files's People

Contributors

jakewharton 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.