Jump to content

Looking for a way to cleanup watched content


techchad

Recommended Posts

techchad

I manage my inlaws Emby server and about quarterly I clean up everything that they've watched the hard way (manually).  I'm looking for an easier/automated way to accomplish this.  Wondering if there would be a way to put a watched flag in the reports view for tv episodes & movies and add delete option possibly?  I'm open to writing a script to do so but I'm not entirely sure where or how I'd pull the watched status from Emby.  Any ideas would be greatly appreciated!

 

Thanks!

  • Like 2
Link to comment
Share on other sites

plazma

I maybe wrong but I suspect this is stored in an sql lite 3 database.

 

There is one other way I thought you might accomplish this I with an auto hotkey script and using the gui interface, but that gona be a complete fudge.

 

What I would recommend (I think I did mention some where previously myself) that you put in a feature request to have the watched status be able to reset its self when it hit a pre-set age / time since the time it was last watched.

Link to comment
Share on other sites

plazma

Question when a user is deleted does the watched status for that user get purged, if so a quick ish method would be to delete and re-create the user, if not a delete and modified new username would be a workaround.

 

But ultimately the feature addition I discussed above would be best.

Link to comment
Share on other sites

Question when a user is deleted does the watched status for that user get purged, if so a quick ish method would be to delete and re-create the user, if not a delete and modified new username would be a workaround.

 

 

No, deleting a user will not purge their data.

 

However, my interpretation of what he is asking for is a way to delete all the watched media not the watched status.

Link to comment
Share on other sites

plazma

Re-Reading the request I think your right, my bad, a daily/hourly/etc script to wget/curl and get the recent activity log all things started to be played and log out to file or simple database (including date) when it occurred, the script would then purge all files where playback was started x days/months after. Not ideal but it would sorta get the job done (but would obviously not know if they had fully watched) but from the point a user hits a file they have x period to complete it, its a fudge but using whats there would get close to the goal.

 

Ultimately as he requests being able to have a reporting option in emby for this would be better as a wget/curl of that report would provide the information needed exactly.

Link to comment
Share on other sites

  • 3 weeks later...
paulcdb

I've been wondering about this sort of feature over the last few days but think if this can be added, can we have it set per program? Maybe only delete after a week after being watched? 

 

Some stuff is worth keeping, but some.. isn't!

 

Or maybe by user...

  • Husband = keep
  • Wife = delete 

 

B)

Link to comment
Share on other sites

swhitmore

Could you somehow use the sync function that only syncs the unwatched episodes? I think that deletes watched items.

Edited by swhitmore
  • Like 1
Link to comment
Share on other sites

chef

I could write a program which deletes watched media.

 

Have to make sure it's not used for the dark side though... Lol!

 

Wouldnt be hard, just query watched items, get path and delete the folder which contain the watches movie, or remove the episode from the season folder. Assuming that the OS is windows.

Edited by chef
Link to comment
Share on other sites

... get path and delete the folder which contain the watches movie,...

 

Yeah, be real careful with that.  For someone who stores all their movies in one folder, you just deleted their whole library.

 

If you really want to do this, I suggest using the API for the delete too.

Link to comment
Share on other sites

chef

Yeah, be real careful with that. For someone who stores all their movies in one folder, you just deleted their whole library.

 

If you really want to do this, I suggest using the API for the delete too.

That would be bad... Very, very bad...

 

I see the API to remove media items.

 

I have a generic app outline for emby. I just need to change what buttons do, and change what info is returned by queries.

Link to comment
Share on other sites

Kelmino

It would be awesome if there was an app or plugin that deletes watched Movies or TV Shows once people watched them.

Ideally I'd love something to have options like this.

 

Only delete if User 1, 2, & 3 watch this Movie

 

Only delete is User 1 & 2 watch this movie and the watched status is over 1 month old.

Only Delete if User 1 Watched this episode

 

Only delete is User 1 & 3 watched this episode and the watched status is older than 1 week.

Each series/Movie would need to be manually managed, as there are some shows and movies that I hold onto longer than others as I may re-watch them.

 

And ever have it set so it runs once a week or or so.

That would be my ideal app to delete.  Even if it did it manually it would save time where I wouldn't have to go through each persons watch status on my server to see if someone watched a show or not when I start to run out of space.

Link to comment
Share on other sites

chef

Well in order to get watched status from each user they have to be authenticated. Which means a user button (and if they have a password, then a password input). Then a list can be generated with the criteria mentioned above, and a "remove" button.

 

If all the users are without passwords then you could generate lists without showing a login (just authenticate users because basically they are public accounts).

 

I would think a basic forum application could be written quickly, but I wouldnt want to auto remove items from someone's library, so user input would probably be a safe route.

 

Would be quicker to see a list of items with checkboxes (kind of like email inboxes) check them one by one, or check all/remove.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
bille2021

This is an option I want that will get me off Plex all-together I think. I have a Python script (link below) that will delete my watched content in Plex. You can do it with all content, I choose only to do it with TV shows. You can also set a time period for deletion after watched. For instance, I set the script to delete watched TV shows after 7 days of being marked watched. I don't need users, so I don't have that complication though.

 

If anyone was willing/able to port something like this I would be more than willing to be a test subject. I'd just create a VM to run so noting catastrophic happens to my real repository. I am in no way a programmer, I can recognize enough to edit simple (very simple) lines, no more.

 

Plex Autodelete script (https://forums.plex.tv/discussion/84822/plex-auto-delete-script)

Link to comment
Share on other sites

bille2021

I just found a way to make this work...but I have to use Plex in conjunction with Emby. I already am so its not an issue for me (wife is already used to Plex and doesn't want to change)

 

If you use Trakt to sync your watched items in both Plex and Emby, and use the script for Plex (below) you can have your media auto clean based on the parameters you set in the Python script for Plex.

 

The script was pretty easy for me to use and has been reliable. My only issue is that it doesn't seem to want to run in task scheduler in Windows, I just use a desktop shortcut to run it daily.

 

Plex Autodelete script (https://forums.plex....o-delete-script)

 

Good luck! 

Edited by bille2021
Link to comment
Share on other sites

  • 9 months later...
e123enitan

Has anyone makes headway with deleting watch status, in my case I have an account set for guests, who have various in completed watch movie or tv status, this looks very messing, I wish to have nothing left in the in-progress watch section, so when the next guests come along he/she would have a clean watch status.

So as many times that I have  deleted the guest profile or restore my server from scratch, the same watch status reappeared, it would be nice to have a tool (script) which is target a specific user and restore watch status to default, or where in Windows 7 this file is located, if it's possible to identify the user profile and change watch state, becos as many times that I restore the server, this file seem not to be included with the rest of uninstall files.

 

 

Thanks  

Edited by e123enitan
Link to comment
Share on other sites

Has anyone makes headway with deleting watch status, in my case I have an account set for guests, who have various in completed watch movie or tv status, this looks very messing, I wish to have nothing left in the in-progress watch section, so when the next guests come along he/she would have a clean watch status.

So as many times that I have  deleted the guest profile or restore my server from scratch, the same watch status reappeared, it would be nice to have a tool (script) which is target a specific user and restore watch status to default, or where in Windows 7 this file is located, if it's possible to identify the user profile and change watch state, becos as many times that I restore the server, this file seem not to be included with the rest of uninstall files.

 

 

Thanks  

 

Hi, you can toggle watch states directly in the server's web interface. Many other Emby apps also support it too.

Link to comment
Share on other sites

e123enitan

Hi, you can toggle watch states directly in the server's web interface. Many other Emby apps also support it too.

Would this function apply to individual user? And once it's turned on is retroactive?

Link to comment
Share on other sites

I'm not exactly sure what you're trying to ask but why don't you just try it? All you have to do is click the checkmarks on detail screens.

Link to comment
Share on other sites

e123enitan

I'm not exactly sure what you're trying to ask but why don't you just try it? All you have to do is click the checkmarks on detail screens.

@Luke "retroactive" I meant once the function is turned on, all watched status for a particular user would restore to default, anyway, I shall give it a try and see how it comes out.

 

Cheers!

Link to comment
Share on other sites

e123enitan

Hi, you can toggle watch states directly in the server's web interface. Many other Emby apps also support it too.

@Like -My bad, I have reviewed every menus/submenus in web server interface, I couldn't locate -watch state, any suggestions?

 

Thanks 

Link to comment
Share on other sites

I could write a program which deletes watched media.

 

Have to make sure it's not used for the dark side though... Lol!

 

Wouldnt be hard, just query watched items, get path and delete the folder which contain the watches movie, or remove the episode from the season folder. Assuming that the OS is windows.

 

Could you throw in a move media as well. Could be a nice archiving feature for watched media. So after watching it gets moved to a archive drive, then later if we want we can delete what we don't want on the drive. Have it be able to work on user selectable library so that if we only want it to take action on movies or tv. I know I like to keep all movies but some TV can go away, like reality tv.

 

Bonus: if we had a dislike button it could be awesome to have it auto delete or move so we don't have to look at it anymore. :D

Link to comment
Share on other sites

  • 2 weeks later...
b0dyr0ck2006

I don't think auto delete is the way forward but definitely could do with a way of seeing the watched status of all users of all files at once

Link to comment
Share on other sites

  • 1 month later...
e123enitan

@ Luke or Anyone  This weekend I rebuild my server several times with the expectation that all watch status will be clean and everything start afresh, but it appears that when I uninstall, the file that holds the watch status remain and keep reinventing. I am on windows 7, could you point me to the location where the file is kept so I can delete manually since uninstall process would perform the task.

 

Thanks  

Link to comment
Share on other sites

The userdata database files.  You will also lose favorites.

 

Or, you could just use one of the interfaces to mark everything unwatched.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...