Skip to content

Darklyter/StashFileRenamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

StashFileRenamer

This is a simple (and ugly) python script to process a directory of files into something useable by systems that use sidecar files such as Kodi or Plex (Plex with XBMCNfoImport plugin: https://github.com/gboudreau/XBMCnfoMoviesImporter.bundle).

WithoutPants has a Stash plugin to do the same sort of thing (https://github.com/stashapp/CommunityScripts/tree/main/scripts/kodi-helper), but it doesn't do file renaming

There is also a file renamer (https://github.com/stashapp/CommunityScripts/tree/main/scripts/Sqlite_Renamer), but for my personal uses I wanted something to handle full pathing. I also preferred something that didn't require direct access to the database

So essentially what this script will do is to parse a directory of files, compare the file basename against the Stash database, then rename the file based on metadata and create the sidecar files.

By default it will create a directory structure based on the studio tree, following the studio parent nodes as far as they go, then move the file and sidecar files into the lowest level of that tree.

Essentially I like having my files organized, and "\network\site\filename" is how I like to do it. :-)

Also a lot of the functionality in Stash connection is untested, since I run mine with http/unsecured. I stole the connection logic from the TPDB Stash scraper (https://github.com/ThePornDatabase/stash_theporndb_scraper), but I'll test it one of these days

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages