0.1.2 โ€ข Published 7 years ago

limpia-plex v0.1.2

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
7 years ago

limpia-plex ๐ŸŽฅ ๐Ÿ” ๐Ÿ—ก

Cleans folders with no video files in Plex libraries.

Ever erased something from the Plex interface? Did you realize the folder just kept sitting there, along with subtitle files or any other leftovers? Then this is for you!

This little tool crawls through your Plex library folder(s), finds every top-level folder with no video files and moves them to the trash. It also keeps torrent and part files safe, just in case.

Features ยท Installation ยท Usage ยท Example

Features

  • Crawls nested subfolders deep into the tree
  • Detects mp4, m4v, avi and mkv for video files. Also torrent and part for the downloading folks.
  • Skips those pesky "sample" folders.
  • Supports custom extensions. Have a lot of video files in an obscure format? Well this is your day then, just write limpia-plex -e mvf "My Library" (macarena video file). Want it supported out-of-the-box? Open an issue
  • Moves to trash, doesn't remove directly. The best if you have trust issues.
  • Great, informative, colorful output.
  • It actually has an API! Self-documentative, though ๐Ÿ˜.
  • Actually compatible with plain folder trees, no need for Plex, if you're that organized. Therefore, possibly compatible with XMBC or other media managers.
  • Tested in Mac, should be compatible with Windows and Linux (and their trash folders).

Installation

npm install -g limpia-plex

Usage

$ limpia-plex -h

  Usage: limpia-plex [options] <dirs...>

  Cleans folders with no video files in Plex libraries.

  Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -v, --verbose            enable verbose mode
    -d, --debug              enable debug mode
    -e, --extensions [exts]  list of additional extensions to consider as video
    -l, --list               lists currently supported extensions

Example

My Plex Library is, surprisingly, at ~/Movies/Plex Library. There, I have some movies I've downloaded from BitTorrent. I've already seen Sintel, but when I erased it to save space in my laptop, the subtitle file was left over. We're going to remove that folder, leaving alone the movies I've still haven't seen (Big Buck Bunny) and the ones still downloading (Tears of Steel).

$ cd ~/Movies
$ tree "Plex Library"
Plex\ Library
โ”œโ”€โ”€ Big\ Buck\ Bunny
โ”‚ย ย  โ”œโ”€โ”€ Big\ Buck\ Bunny.en.srt
โ”‚ย ย  โ”œโ”€โ”€ Big\ Buck\ Bunny.es.srt
โ”‚ย ย  โ””โ”€โ”€ Big\ Buck\ Bunny.mp4
โ”œโ”€โ”€ Sintel
โ”‚ย ย  โ””โ”€โ”€ Sintel.en.srt
โ””โ”€โ”€ Tears\ of\ Steel
    โ””โ”€โ”€ Tears\ of\ Steel.mp4.part

3 directories, 5 files
$ limpia-plex "Plex Library"
--- Processing Plex Library ---
Keep 	 Big Buck Bunny
Remove 	 Sintel
Keep 	 Tears of Steel

Apply? (Y/n) Y
Success!
$ tree "Plex Library"
Plex\ Library
โ”œโ”€โ”€ Big\ Buck\ Bunny
โ”‚ย ย  โ”œโ”€โ”€ Big\ Buck\ Bunny.en.srt
โ”‚ย ย  โ”œโ”€โ”€ Big\ Buck\ Bunny.es.srt
โ”‚ย ย  โ””โ”€โ”€ Big\ Buck\ Bunny.mp4
โ””โ”€โ”€ Tears\ of\ Steel
    โ””โ”€โ”€ Tears\ of\ Steel.mp4.part

2 directories, 4 files

Et voilร ! Everything is left just as I wanted.

0.1.2

7 years ago

0.1.1

8 years ago