clara-j / media_cleaner

Python script to delete watched content on Emby
31 stars 17 forks source link

option for just summary output from script #31

Closed keppo070 closed 2 years ago

keppo070 commented 2 years ago

Hi, I'm still in the dry run phase and I start the script form cron. I would like to have an option to only see the result which I can redirect for some logging.

Just an option to log only the summary what is deleted.

I have already noticed that I should change the metadata to let this script do its work. The Date Added should be set correctly which is in the library settings. A old movie would be deleted immediately in my setup.

@terrelsa13 you asked to be mentioned

terrelsa13 commented 2 years ago

Hey @keppo070

Will you help me understand what you are trying to achieve?

My first thought is the output can be pushed into a text file and the unwanted text lines removed. This would leave the "deleted summary".

I am using the below crontab entry to push the output to a text file called media_cleaner.log in the /var/log/ directory. 13 2 1 /usr/local/bin/python3.8 /opt/media_cleaner/media_cleaner.py > /var/log/media_cleaner.log 2>&1

keppo070 commented 2 years ago

Thnx, I will try that. I'm not to concerned about the whole list of keeping per user. I just like to see the result.

I was thinking about a -v or -vv option to limit the output, but this is much simpler approach

terrelsa13 commented 2 years ago

Hey @keppo070 I have added config options to control what is shown in the console output. You can find the most up to date version of this script on my fork.

Look for the "Control output printed to console" config options.

keppo070 commented 2 years ago

Thanks, I will check it out. The script has evolved big time!! Still using the "original".