I made a thing! A python script to delete old, unwatched movie content. (update)

About a year and a half ago I posted a script I made for deleting movie content in your library not being watched. Folks really seemed to like it, and I still get comments on that thread every so often. So I’ve updated it!

Far and away, the two biggest requests I got were:

  • Make it do TV, too
  • Make a dry-run mode
  • Edit: Added just now: a protected mode when you volume mount a protected file!

The code is now available on github here:

github.com/ASK-ME-ABOUT-LOOM/purgeomatic

Even better, no installation is required. You can run it as a docker container like so:


<span style="color:#323232;">docker run --rm -it --env-file .env --network=host ghcr.io/ask-me-about-loom/purgeomatic:latest python delete.movies.unwatched.py
</span>

It now supports TV series as well. Thanks to a suggestion from /u/JimLahey-, I was able to get my head around the idea - I had always thought of managing TV shows as “collections of seasons” of media, but the reality is, if nobody has watched anything related to a TV show in a while, the whole thing can go! And that’s what this does:


<span style="color:#323232;">docker run --rm -it --env-file .env --network=host ghcr.io/ask-me-about-loom/purgeomatic:latest python delete.tv.unwatched.py
</span>

No more editing python, either. Create yourself a .env file, set up all of your config, and even enable dry run mode, so you can test to your heart’s content:


<span style="color:#323232;">$ docker run --rm -it --env-file .env --network=host ghcr.io/ask-me-about-loom/purgeomatic:latest python delete.movies.unwatched.py
</span><span style="color:#323232;">DRY_RUN enabled!
</span><span style="color:#323232;">--------------------------------------
</span><span style="color:#323232;">2023-08-25T12:40:57.288608
</span><span style="color:#323232;">DRY RUN: Chaos Walking | Radarr ID: 1445 | TMDB ID: 412656
</span><span style="color:#323232;">DRY RUN: Captain Marvel | Radarr ID: 885 | TMDB ID: 299537
</span><span style="color:#323232;">DRY RUN: Captain America: Civil War | Radarr ID: 1768 | TMDB ID: 271110
</span><span style="color:#323232;">DRY RUN: Black Widow | Radarr ID: 1517 | TMDB ID: 497698
</span><span style="color:#323232;">DRY RUN: Birds of Prey (and the Fantabulous Emancipation of One Harley Quinn) | Radarr ID: 1092 | TMDB ID: 495764
</span><span style="color:#323232;">DRY RUN: Bill &amp; Ted's Excellent Adventure | Radarr ID: 1777 | TMDB ID: 1648
</span><span style="color:#323232;">DRY RUN: Bill &amp; Ted's Bogus Journey | Radarr ID: 1778 | TMDB ID: 1649
</span><span style="color:#323232;">DRY RUN: Big Hero 6 | Radarr ID: 71 | TMDB ID: 177572
</span><span style="color:#323232;">DRY RUN: Big | Radarr ID: 71 | TMDB ID: 177572
</span><span style="color:#323232;">DRY RUN: Batman Begins | Radarr ID: 1745 | TMDB ID: 272
</span><span style="color:#323232;">DRY RUN: Assault on Precinct 13 | Radarr ID: 1212 | TMDB ID: 17814
</span><span style="color:#323232;">DRY RUN: 21 Jump Street | Radarr ID: 1096 | TMDB ID: 64688
</span><span style="color:#323232;">Total space reclaimed: 164.88GB
</span>

To use protected mode, just create a text file with one TMDB/TVDB ID per line and volume mount it as /app/protected like so:


<span style="color:#323232;">docker run --rm -it --env-file .env --network=host -v /home/user/protected:/app/protected ghcr.io/ask-me-about-loom/purgeomatic:latest python delete.movies.unwatched.py
</span>

Good luck! Please let me know if you have questions or problems and I’ll do my best to help out!

PlasmaDistortion,

I have terabytes of movies and shows I will probably never watch again but I still would never delete them.

ASK_ME_ABOUT_LOOM,

👍

Chup,

Do people download, store, wait, watch or not watch and then after a while delete? Storage is cheap and I’m even collecting some movies or shows knowing I will never watch them.

E.g. highly rated old mono film, or it got lots of awards but I totally don’t care about the topic. Or a few childhood cartoons, which I’ll probably never watch again.

I only delete faulty data or when getting a higher quality/remastered version etc.

ASK_ME_ABOUT_LOOM,

On my server, people don’t have access to delete, so content tends to either fall into the category of “rewatchable” (classics, series, Oscar winners, etc) and “everything else.” Even a given year’s really popular Oscar winners will stop being watched after a period of time, and odds are good that nobody will watch it ever again. When is the last time someone with access to your server watched The Color of Water or The Life of Pi?

Storage may be cheap, but downloading is cheaper. There’s nothing I’ve gotten that can’t be re-gotten.

Libraries do the same thing with books, it’s called “weeding.” People get up in arms about the idea that a library would voluntarily discard a book until they learn that they’re getting rid of titles like “An Expert’s Guide to Windows NT.” The librarian’s response? If you like a book, check it out. Titles that are borrowed don’t get weeded.

Faceman2K23,
@Faceman2K23@discuss.tchncs.de avatar

… delete? What is delete?

Send help I have a hard drive addiction

  • All
  • Subscribed
  • Moderated
  • Favorites
  • plex@lemm.ee
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Durango
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • tacticalgear
  • ethstaker
  • JUstTest
  • InstantRegret
  • Leos
  • normalnudes
  • everett
  • khanakhh
  • osvaldo12
  • cisconetworking
  • modclub
  • anitta
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines