terrelsa13 / MUMC

Multi-User Media Cleaner aka MUMC (pronounced Mew-Mick) will go through movies, tv episodes, audio tracks, and audiobooks in your Emby/Jellyfin libraries deleting media items you no longer want.
GNU General Public License v3.0
92 stars 6 forks source link

Feature Request: Monitor for delete based on tag(s) #14

Closed SenorSmartyPants closed 2 years ago

SenorSmartyPants commented 2 years ago

Only monitor for delete if a tag is set on object. Sort of like favoriting, but in reverse. Most things in my (TV) library I want to keep but there are some (daily and weekly shows) that I definitely want to get rid of. I could tag these to be monitored.

If the tag option is enabled for a library, then only tagged items would be checked for deletion.

terrelsa13 commented 2 years ago

This could be a good idea. But I have a couple questions.

  1. I see how to add tags in the Emby/JF GUIs. But how are you adding tags to media items (i.e. GUI, script, etc...)?

  2. Will you help me see how over a long period of time it is more efficient to select what to delete vs what not to delete?

I will try to explain how I am seeing it in my head: All storage has a limit. If lots of media is being permanently kept sooner or later the limit is reached. When this happens I see two options; adding storage or untagging the media that is tagged to not be deleted. Upfront it may lower the number of media items that need to be touched. But it pushes the cleanup work to the backend when disk space is low. It seems at that point it would become a more critical nuisance. The script has the ability to keep all children if series or season are set to favorite. Yes, that means the media has to be favorited upfront. But it also forces that upfront thought to go into what will be taking up disk space vs what will not take up disk space. It seems unintuitive. Am I missing something?

SenorSmartyPants commented 2 years ago
  1. GUI
  2. I don't know if something will become a favorite when I start watching. I could make the delete days several months to decide I suppose.

But the other thing is eventually almost everything will be set as a favorite because everything else will be deleted. And then favorite becomes an almost meaningless distinction. Yes, I have a bit of a data hoarder mentality.

terrelsa13 commented 2 years ago

Ok. I follow you now. I like the idea of tags, I will start to implement this when I have free time (you know, between the job that pays and other life stuff).

My Vision On How This Gets Implemented Into The Script:

Any feedback/suggestions you have on how I am seeing this implemented?

SenorSmartyPants commented 2 years ago

Implementation seems fine. I'm assuming you've got a working test API call with tag filtering working. If not, I'm happy to assist/test.

As far as my use goes, I mainly plan on tagging series.

terrelsa13 commented 2 years ago

I do not. If you want to send a working test API call my way I'd greatly appreciate it

SenorSmartyPants commented 2 years ago

http://server:8096/Users/<userID>/Items/?IncludeItemTypes=Series,Season&ParentID=<LibraryID>&Recursive=true&SortBy=SortName&tags=<tagname> That would return all tagged Series and seasons. You'd have to walk thru all the IDs to get the child episodes for each tagged series/season

http://<server>:8096/Users/<userID>/Items/?Filters=isPlayed&IncludeItemTypes=Episode&ParentID=<season or seriesID>&Recursive=true&SortBy=SortName Get's played episodes for that season/series.

terrelsa13 commented 2 years ago

Wrong place. Moving to the correct issue.

terrelsa13 commented 2 years ago

@SenorSmartyPants I did not forget about this. I have been working on it when I can. I have it implemented for movies, movie libraries, episodes, seasons, series, and tvshow libraries. Only videos, trailers, audio, and audio books left. These should be easier to implement after getting movies and tvshows working. Do you mind testing it out once I finish implementing it for the other media types? I am estimating I'll have something to test out in about 1-2 weeks.

SenorSmartyPants commented 2 years ago

I can test it against my library. I would only be running against TV stuff at the moment. Maybe Movies.

terrelsa13 commented 2 years ago

@SenorSmartyPants

~~Ok, try out this branch whenever you get a chance. Let me know if you run into any issues. Audio and Audio_Books are WIP, the script may error out if they are enabled. Once Audio and Audio_Books are updated they will work normally.~~

Tags can be used for all media types. I will keep this BETA branch open for a little while longer. Then it will be merged into main and delete.

Breaking Changes In This Branch: Old Configuration will not work; a new config will need to be created

Add blacktag feature for episodes, seasons, series, movies, and audio, and audio books Add whitetag feature for episodes, seasons, series, movies, and audio, and audio books *Multiple blacktags and whitetags allowed (must be comma separated)

SenorSmartyPants commented 2 years ago

Sorry I haven't tested this yet. Life has been getting in the way. I will get back around to looking at this.

terrelsa13 commented 2 years ago

Np. I have been trying to test this every which way I can. I am sure I have missed something. But the bulk of it should be there.