Hi, I created a python script that will look for all watched content for a specific user. If the last played date is past the cut off date it will delete the file.
I built this for myself and it works good enough for me, but I have only tested it on my system (ubuntu 18.04) with my server. So no guarantee it will work for everyone, and since it can delete files have a backup to be safe. By default it does not delete files until you modify the config file to be safer.
It first lists all the files, then will list the files that will be deleted.
On first run it will ask you some questions to generate the config file, or you can create it manually
Here is the script if anyone else is interested in trying it out: https://github.com/c...j/media_cleaner

Emby Media Clean - Delete Watched Video
#1
OFFLINE
Posted 18 September 2019 - 06:52 PM
- hieroglyph, Kurosh and Crowley_00 like this
#2
OFFLINE
Posted 18 September 2019 - 07:51 PM
Kurosh asked for the ability to treat TV vs Movies different.
For my use case I don't care and delete all files the same. But I will try to add the ability to configure if you want Episodes, Movies or Videos to be deleted or ignored.
- Kurosh likes this
#3
OFFLINE
Posted 18 September 2019 - 08:31 PM
I have pushed the new version. Config file will need to be re-generated. You can now have the following three options
video_action='delete'
movie_action='delete'
episode_action='delete'
Anything other then delete will ignore that content type.
- Kurosh likes this
#7
OFFLINE
Posted 24 September 2019 - 06:35 AM
I have pushed the new version. Config file will need to be re-generated. You can now have the following three options
video_action='delete'
movie_action='delete'
episode_action='delete'
Anything other then delete will ignore that content type.
Thanks for this, so "movie_action" = movies and "episode_action" = TV shows. Therefore what is "video_action"?
#10
OFFLINE
Posted 24 September 2019 - 08:22 PM
Thanks for this, so "movie_action" = movies and "episode_action" = TV shows. Therefore what is "video_action"?
video is for things in the home video or other video category. I use that for random videos I download off the internet like youtube videos where I don't have metadata for.
#11
OFFLINE
Posted 27 October 2019 - 06:56 PM
I have pushed a couple of new updates. Some users were getting error depending on the results their servers were returning. That should all be fixed now, if anyone is still getting errors let me know.
I also added a new option to ignore favorite files so they don't get deleted.
#13
OFFLINE
Posted 15 November 2019 - 01:31 PM
excactly what i have been looking for, but it trows me this error in debian stretch (openmediavault)
i have both python 2.7 ant python 3 an have tried running with python3 command (Anyone that can help me)
#16
OFFLINE
Posted 17 November 2019 - 12:10 PM
python 3.5.3
this is the exact error
#19
OFFLINE
Posted 19 November 2019 - 06:52 AM
@Michael sorry but I can't seem to re-create the issue your having. Are you using Windows, Linux or Mac?
@Crowley_00 I can look into creating a log file. So your looking for a log file that just appends the file name, date watched for any file deleted. I assume you would want the log file to append between runs.
#20
OFFLINE
Posted 19 November 2019 - 07:12 AM
Edited by Crowley_00, 19 November 2019 - 07:13 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users