Search the Community
Showing results for tags 'utility'.
-
Several times it has happened that I have done something (like moving my library around) that has caused items to be removed from my playlists to the point that it bugged me enough to write the following BASH script. What this does is to write out a VERY PRIMITIVE html file for each playlist on the server that the defined user has access to. It also creates an even more PRIMITIVE index file, with the current timestamp as its file name, with each of the playlists hyperlinked in it. In each playlist file, the name of each item on the list is written, and it's hyperlinked to the page on the Emby server for that item. Makes it real handy when you want more info about a particular item on the playlist. This also includes the overview of each item which solves another aggravation of mine which is not being able to see the overview in the playlist unless you go in and edit the metadata. I would point out, the script has to run under an OS that supports BASH and other common linux utilities, HOWEVER, the server can run on any system Emby supports. I'm running this on my linux machine to access the playlists from my Windows server. If you don't have such an OS running, I highly recommend, at the very least, getting cygwin, but preferably grab the FREE Windows version of VM Player and install a linux distro on it (I personally prefer Debian <g>). Also, this script relies heavily on JQ (https://stedolan.github.io/jq/download/) to parse the JSON data from the Emby server so if you don't have it installed already, you will need to do that first. Other than that, this script is VERY simple. Just set the 4 variables at the top and your good to go. If you use this, please let me know. Down the road, I might add more to it if there's a desire for it. One thought I'm toying with now is to zip up a week's worth of backups for archival reasons. Of course, if I did this, would likely also just add the option of deleting old ones, but we'll see down the road. As a final note, I've only tried this on playlists with movies and TV shows in them. No idea how it would handle with music or other such lists. save_playlist.sh
-
Duplicate Clean Backdrops of mixed resolution and duplicates
ginjaninja posted a topic in Tools and Utilities
https://dl.dropboxusercontent.com/u/84611964/OrderBackdrops.cmd Requires mediainfo and imagemagick command line utilities Background I wanted to keep my backdrops clean of mixed resolution, non contiguous naming, and duplicate images, The script uses imagemagick to yield a comparison value to identify duplicates. Install Download mediainfo and imagemagick clis, Extract to folders of choice Download CMD file above and copy to shell:sendto edit CMD with paths to mediainfo and imagemagick and turn on/off log only Functions For each folder in path, re cursing subfolders) If low res images exist AND 1+ high res then delete low res images If duplicates exists delete duplicates rename backdrops into order - backdrop.jpg, backdrop1.jpg, backdrop2.jpg, etc creates a processed.txt in every processed folder, in case needs to be rerun...they can be easily deleted once happy Usage Test 1st before using on real folders Right click a folder eg. movie and send to the script, each separate folder is enumerated separately The threshold value should be increased/decreased if duplicates are not being detected/uniques being detected as duplicates. use imagemagick\compare -metric NCC backdrop1.jpg backdrop2.jpg null: manually from the command line to find a threshold value for comparison for use in your script Notes Backdrop order is not well respected, backdrop.jpg (the first one) shouldn't be deleted, unless it is a low res image amongst 1 or more high res images..Backdrop 11 will be ordered higher than Backdrop 2 due to batch order. As with all my scripts its very crude, im guessing as i go along. The Comparison function of image magic, could be improved upon, there may be quicker more appropriate functions and the use of a threshold could break out of comparison once its known to be different enough (for performance considerations) Temporary files could be used to compare different resolution images, but that would take even longer and would require more understanding of imag magick comparison than i have. if i could get the comparison value out of image magic without using a file, it would be more media browser change detection friendly. have tried to use identity function to compute a quick hash to weed out 100% identity quickly, however the duplicates in practise are too nuanced for this function to yield match. advice as always welcomed... The NCC comparison can deal with different jpg quality factors, but cant detect identity where there is a slight offset between the two images, or if one image is a subimage of another (would be too computationally intensive, besides the script is looking for more identical ness that that..eg same image on fanart and tmdb.. edit fixed crash when_result was not defined