@wiecks said:
Mine was doing the same thing…updated the server today…and its deleting again.
Updated to the latest version and still have the same issue.
@wiecks said:
Mine was doing the same thing…updated the server today…and its deleting again.
Updated to the latest version and still have the same issue.
Edit: Double post
@facted It looks like there is a problem with getting a token. Please double check the login information to make sure it is correct
Also the only way to get a token is to connect to plex.tv. Perhaps check if you have a firewall blocking python from connecting to the internet?
Wasn’t a firewall issue (disabled windows firewall and it didn’t fix anything). However, I was able to find my token via instructions found here: https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token
With the token, everything works perfectly again.
Thank you for all your help and the awesome script!
@ngovil21 said:
@CriticalPoint From what you are saying it looks like authorization still works, but perhaps the Library sections may have changed. Could you check the Library Section ID? You can find it by going to the section in Plex Web and looking at the number at the end of the URL. Then the numbers will go in the SectionList option divided by commas.
I should have mentioned that this is the first thing I looked at, thinking that the identifier had changed, I wondered if completely removing and re-adding the library might help, but I didn’t want to fudge my watched-items. I’m waiting for this patch pertaining to watched-items not being removed from the unwatched filter in the LG MediaLink app also, which doesn’t help matters, but I don’t want to destroy my current library.
@wiecks said:
Mine was doing the same thing…updated the server today…and its deleting again.
I’ve just updated Plex from Version 1.1.4.2757, to Version 1.2.6.2975.
Ran the script again; “Failed to load Section 2. Skipping…”
@facted said:
Wasn’t a firewall issue (disabled windows firewall and it didn’t fix anything). However, I was able to find my token via instructions found here: https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-TokenWith the token, everything works perfectly again.
Thank you for all your help and the awesome script!
^ This. This worked a charm for me, thank you. I wonder if the token is dynamic, or something I did caused it to generate a replacement. Hmm.
Hi,
I’ve just added this to my set up and it great. Is it possible to move certain watched shows to a NAS?
Edit: just found the GitHub page
Looks like there is an issue with text encodings if a filename has special characters such as diacritics (accents), or the ‘wrong’ kind apostrophe…
Sometimes everything looks fine in the logs:
INFO:root:<show> - <epsiodeNumer> - Title with àn accent | Viewed: 1 | Days Since Last Viewed: 55 | On Deck: False
INFO:root:Finding files similar to: /Volumes/Media/TV/<show>/<season>/<show> - <epsiodeNumer> - Title with àn accent*
INFO:root:
But not in the script output:
<show> - <epsiodeNumer> - Title with ?n accent | Viewed: 1 | Days Since Last Viewed: 55 | On Deck: False
Cannot print message
The episode was never moved.
Other times it’s a problem in both places:
INFO:root:<show> - <epsiodeNumer> - Episode’s title has an apostrophe | Viewed: 1 | Days Since Last Viewed: 188 | On Deck: False
INFO:root:Finding files similar to: /Volumes/Media/TV/<show>/<season>/<show> - <epsiodeNumer> - Episode’s title has an apostrophe*
DEBUG:root:Error moving file: 'ascii' codec can't decode byte 0xe2 in position 37: ordinal not in range(128)
<show> - <epsiodeNumer> - Episode?s title has an apostrophe | Viewed: 1 | Days Since Last Viewed: 188 | On Deck: False
Cannot print message
Error moving file: 'ascii' codec can't decode byte 0xe2 in position 37: ordinal not in range(128)
(Names have been changed, obviously, but I’ve left the problematic characters the same)
Question i know might be its already answer but here i Go: how can i run this scrip on a remote server? where will i have to drop it so it do his magic on the server?
@“Main Plex” said:
Hi,
I’ve just added this to my set up and it great. Is it possible to move certain watched shows to a NAS?Edit: just found the GitHub page
In each startup you should mount the share and if you have access to cron or another scheduler, you should set a recurring task that checks that the share of your NAS is still mounted every hour or so, if the verification fails I t should log a warning, and should try to mount the share like at startup, rechecking every 10 min. for successful access to the re-mounted but in case that after four (6) tries the check for the shared folder continues to fails, it should continue to retry every 2O min until success or user intervention, a fatal error with a copy of the system logs should be quarantined and emailed to you, so you can remotely connect, see what went wrong and fix it.
If you know Perl and everything (98%) can be done within the python script by modifying it. If you don’t know not there are utilities, automations, shell scripts that will allow to do the same with a little more effort and less reusability.
And I think Python is really good first language to get into coding and learn how to properly do it, using structured programming and besides it can be both procedure/function or object oriented so you can learn both to ] code properly in any other language (dialect).
Moreover, compared to the classical language used to teach structured programming, ANSI C, Python does not have the tediousness and slowness [in writing code] associated with the former due to overly restrictive syntax, and the fact that the coder have to take care of everything on the latter, moreover it’s a pure procedure/function language, so an if you want to learn about object oriented programming you’ll have to move afterwards to C++.
I find it that as a first programming language it could be too tedious/slow/boring for newbies, … As a second language for newbies it is a must, a required foundation to program libraries that have to perform as fast as possible, a great tool for critical parts of any software, compiler or operating system.
many thanks for the info @abetancort
You are very welcome.
Now, you have a great incentive to start coding. When you finish and run your first “useful” program, simply one that do any set of tasks in the way you specifically desire, trust me, you’ll never stop coding and learning new languages.
Coding is similar to playing competitive sports, the hardest part is starting but almost immediately the dopamine rush, realtime feedback and the thrill of winning takes over the effort and gets you hooked for life.
On the other hand, “Coding is an order of magnitude more addicting than any sport or drug.”, you can bank on it.
@eskwire said:
Question i know might be its already answer but here i Go: how can i run this script on a remote server? where will i have to drop it so it do his magic on the server?
Normally you’ll do would place the script itself in the folder “/volume1/@appsstore/plexcleaner”, remember you will need to create the folder plexcleaner. Afterward, you will create a symbolic link from that folder to /usr/local/plexcleaner. Finally, you will setup a scheduled task using your Synology DSM (you can use crontab if you so desire) that executes the script at regular intervals, for most scenarios once a day it is more than enough.
@eskwire said:
Question i know might be its already answer but here i Go: how can i run this scrip on a remote server? where will i have to drop it so it do his magic on the server?
What do you mean by remote server? Is it the same machine the Plex Media server is on? Running the script on the same machine as the Plex Media Server is preferred. And you would configure a scheduled python task according to the OS.
If the script is being run on a separate machine, then you will need to provide the absolute starting position for media on the Plex Media server in RemoteMount, and the path to the media on the Script machine as LocalMount. So for example if you media was at /volume1/media on the Plex Server and X:\media on the script machine, you would put those in RemoteMount and LocalMount, respectively.
@ngovil21 i have a server on internet but whant to run the scrip there. I upload it to an folder but it did not work when i run it, so i was traying to figure out if it was posible.
@eskwire said:
@ngovil21 i have a server on internet but whant to run the scrip there. I upload it to an folder but it did not work when i run it, so i was traying to figure out if it was posible.
Is it Plex Cloud? If so I don’t know how it works and if this script will work with it.
Otherwise what type of server is it? If it is some some sort of seedbox or managed hosting, then you will need to check with your provider if you can run python scripts. If you have full access to the server then you can setup the script through terminal or remote desktop.
Am on a seedbox I upload the scrip true ftp and then use ssh to connect to the server and try run it.
@eskwire said:
Am on a seedbox I upload the scrip true ftp and then use ssh to connect to the server and try run it.
Ya I don’t know what the setup on the seedbox is. You will have to contact them and see if they will allow you to run a python script.
Is it possible to have the script remove tv folders if they’re empty, not just movie folders?