npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

limpia-plex

v0.1.2

Published

Cleans folders with no video files in Plex libraries.

Downloads

10

Readme

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.