Okay, total newb here, so bear with me. I’ve got the script installed, configured, and when I run it with the test flag, the output I’m seeing is spot on. My question is: does this script always run in the background after the initial launch? Do I need to set something up so that it runs at intervals?
@darr3n said:
Okay, total newb here, so bear with me. I’ve got the script installed, configured, and when I run it with the test flag, the output I’m seeing is spot on. My question is: does this script always run in the background after the initial launch? Do I need to set something up so that it runs at intervals?
Script won’t run in the background on its own. You will need to use a scheduler to run the script. Look at Task Scheduler for Windows or cron for Linux.
@ngovil21 said:
@darr3n said:
Okay, total newb here, so bear with me. I’ve got the script installed, configured, and when I run it with the test flag, the output I’m seeing is spot on. My question is: does this script always run in the background after the initial launch? Do I need to set something up so that it runs at intervals?Script won’t run in the background on its own. You will need to use a scheduler to run the script. Look at Task Scheduler for Windows or cron for Linux.
Cron did the job. Thanks!
Updated script to 2.01, by default the log will be emailed only when there are changes or errors. If you would like to always get emails, then run with the --always_email flag. If you would like to see the size of the files scanned then run with the show_size flag.
@ngovil21 said:
Updated script to 2.01, by default the log will be emailed only when there are changes or errors. If you would like to always get emails, then run with the--always_emailflag. If you would like to see the size of the files scanned then run with theshow_sizeflag.
Updated to the latest version, however the script ends prematurely now and will not finish after several tries. Verified previous version is working properly and reverted.
@MovieGhoul said:
@ngovil21 said:
Updated script to 2.01, by default the log will be emailed only when there are changes or errors. If you would like to always get emails, then run with the--always_emailflag. If you would like to see the size of the files scanned then run with theshow_sizeflag.Updated to the latest version, however the script ends per-maturely now and will not finish after several tries. Verified previous version is working properly and reverted.
Where is it ending? You can run the script with --debug and PM me the log.
Any any have expirience running this scrip on a remote server?
@eskwire said:
Any any have expirience running this scrip on a remote server?
I am trying to get this to work on my remote server which is being hosted on a seedbox but although it connects to the server it cannot delete any shows. I get an error “the system cannot find the file specified”.
On the remote server, I have checked the box allowing remote users to delete content and set up Kodi on my local machine with the plexkodiconnector. This gives me an option to delete episodes from the server from within Kodi and it works, so I know that the remote server has the required permissions to delete files from my seedbox.
I have a feeling the problem lies within the Remote mount and Local mount config settings but I have no idea what to put here.
@warrender For deleting files on a remote host, I would recommend using the setting plex_delete. This will use the plex config to delete the file. This won’t work with the option similar_files.
Otherwise you will need the remote filesystem mounted on your local computer. Kodi has this mounting built-in, but this won’t work with the script. You will have to look up something that will do this for you on your OS, but I wouldn’t recommend this route unless you technincally minded.
Yes my case is a seedbox also. And would be cool that with only adding the up or URL of the server and port it would work in my case don’t work. And it seem that am the only one that need this to run on a server.
@ngovil21 said:
@warrender For deleting files on a remote host, I would recommend using the settingplex_delete. This will use the plex config to delete the file. This won’t work with the optionsimilar_files.Otherwise you will need the remote filesystem mounted on your local computer. Kodi has this mounting built-in, but this won’t work with the script. You will have to look up something that will do this for you on your OS, but I wouldn’t recommend this route unless you technincally minded.
Yeah I tried the plex_delete config but it didn’t work, I can’t map the seedbox drive directly within windows explorer as an ftp because it uses TLS encryption.
@warrender If plex_delete isn’t working for you, would you mind running the script with --debug and plex_delete set to true and PMing me the log if it doesn’t work? Make sure there is a file that needs to be deleted.
@ngovil21 i’m at work just now but I’ll be able to test that for you tomorrow.
Is there any way to move a whole folder with this script? My movies are in folders as per required in Radarr and when I move a watched one to my watched folder, I’d like to keep the folder hierarchy intact. Couldn’t find anything like this in the settings. Thanks!
@facted said:
Is there any way to move a whole folder with this script? My movies are in folders as per required in Radarr and when I move a watched one to my watched folder, I’d like to keep the folder hierarchy intact. Couldn’t find anything like this in the settings. Thanks!
No way to just move folders yet. I’ll think about it, don’t want to do something that will cause someone to mess up their library if they setup the script wrong.
I have a show I don’t want to delete until my guest user also watches it. Edited the script for a specific show with “homeUsers”: “MyUser, GuestUser”.
However, in the log I get: INFO:root:Do not have the token for GuestUser. Please check spelling or report error on forums.
Am I not able to use Guest users to specify when to delete a watched show? Is there a workaround for this?
@MovieGhoul said:
I have a show I don’t want to delete until my guest user also watches it. Edited the script for a specific show with “homeUsers”: “MyUser, GuestUser”.
However, in the log I get: INFO:root:Do not have the token for GuestUser. Please check spelling or report error on forums.
Am I not able to use Guest users to specify when to delete a watched show? Is there a workaround for this?
So there are two types of users, Home Users and Shared Users. Home Users are users you can switch between and the script can get tokens for those users. Shared Users are other people you share your server with. The script cannot get tokens for those people without actually logging in for them. Might be able to get the token for shared users and use that. I’ll look into adding that.
@ngovil21 said:
@MovieGhoul said:
I have a show I don’t want to delete until my guest user also watches it. Edited the script for a specific show with “homeUsers”: “MyUser, GuestUser”.
However, in the log I get: INFO:root:Do not have the token for GuestUser. Please check spelling or report error on forums.
Am I not able to use Guest users to specify when to delete a watched show? Is there a workaround for this?So there are two types of users, Home Users and Shared Users. Home Users are users you can switch between and the script can get tokens for those users. Shared Users are other people you share your server with. The script cannot get tokens for those people without actually logging in for them. Might be able to get the token for shared users and use that. I’ll look into adding that.
Thanks. I’ll be eagerly waiting and watching. I know that Plexpy is able to track watch statistics for Shared Users, so hopefully it’s fairly simple.
@MovieGhoul said:
Thanks. I’ll be eagerly waiting and watching. I know that Plexpy is able to track watch statistics for Shared Users, so hopefully it’s fairly simple.
I think PlexPy is only able to track watch statistics for Shared Users because it’s constantly running/monitoring, and picks up when the shared users connect, what they watch while connected, how long they’re connected, etc. If you delete your PlexPy history all that watched history for shared users is lost. I found out the hard way ![]()
I’m getting Unicode failures with python2 and python 3 on script version 2.1.
**python3 fail: **
Am?lie | Viewed: 0 | Days Since Viewed: 0 | On Deck: False
[Keeping] /media/bigbastard/media/media/movies/Am?lie (2001)/Am?lie.mkv
Traceback (most recent call last):
File “/opt/PlexCleaner/PlexCleaner.py”, line 1166, in
changed = checkMovies(doc, Section)
File “/opt/PlexCleaner/PlexCleaner.py”, line 700, in checkMovies
if os.path.isfile(m[‘file’]):
File “/usr/lib/python3.4/genericpath.py”, line 30, in isfile
st = os.stat(path)
UnicodeEncodeError: ‘ascii’ codec can’t encode character ‘\xe9’ in position 39: ordinal not in range(128)
**python2 fail: **
Disjointed - S01xE005 - Schr?dinger?s Pot | Viewed: 1 | Days Since Last Viewed: 83 | On Deck: False
Traceback (most recent call last):
File “/opt/PlexCleaner/PlexCleaner.py”, line 1169, in
changed += checkShow(DirectoryNode)
File “/opt/PlexCleaner/PlexCleaner.py”, line 865, in checkShow
location=show_settings[‘location’]):
File “/opt/PlexCleaner/PlexCleaner.py”, line 431, in performAction
if not os.path.isfile(file):
File “/usr/lib/python2.7/genericpath.py”, line 29, in isfile
st = os.stat(path)