Closed elvis0288 closed 3 years ago
this is how it looks on the config
@elvis0288 On the surface this appears to be the same issue of having a single quote in your path name. I understand Windows and Linux allow the use of single quotes in a path name. But why is it necessary for your media library paths?
Find and replace the two instances of this...
libfolders.replace('\'','\\\'')
With This...
libfolders.replace("'","\'")
\ If that works, I will update the script.
that did not work but i am actually changing all my folder names so it will not have that ' anymore
Thanks!
so i download you latest script and remove all the ' from my folders but i am getting an error when running the script after the configuration
Backslash is the escape character in python.
I do not have a windows. So I am able to set up an emby/jellyfin server to test this. Will you try two possible solutions for me?...
Open your config file...
"\"
to this "\\"
. Try running the script like this.Then re-open your config file...
"\\"
to this "/"
. Try running the script like this.Which of these works?
@elvis0288 Will you also send a screenshot of the FULL paths shown when the script is run for the first time and blacklist and/or whitelists are being selected for a user?
this is how it shows and this is how you have it on the config
the first option was still giving the error.. the second option went through with the -1 of the media to delete but when i put 180 days it displayed a different error.
but if the error is not related then the correct way would be:
That last error (KeyError: 'Size')
means the metadata item ['Size']
does not seem to exist for the episode it is currently making a keep/delete decision on. I added this check because I came across what appeared to be a placeholder media item that was created by the server before it was actually moved from its initial folder into where it will be located in the tv/movie/etc... folder structure. That can probably be fixed by checking if the metadata item exists before trying to use it. Then make to decision to use one, both, or none in this case.
As for the paths issue: I will need a little bit of time to get a Windows emby/jellyfin server up and running so I can try a few things out for handling Windows paths. I have to figure out how to store these Windows paths and then read them back out. What I do not know is if using the forward slash will still match paths when reading the config to deciding if the media item is blacklisted or whitelisted. For now, manually edit the config with forward slashes in the whitelist/blacklist.
This branch should get you past the KeyError: 'Size'
issue.
hello after using the new branch and the forward slash this happens
so it looks like no errors but nothing shows as watched and i do have a lot of items right now that has been watched
Thanks!
What I do not know is if using the forward slash will still match paths when reading the config to deciding if the media item is blacklisted or whitelisted.
Yeah, I mentioned that. When it is looking for a matching path "/" is not he same as "\". So nothing is seen as needing to be deleted.
I will be able to fix this after I get a Windows emby/jellyfin server up and running.
Hello @terrelsa13 any news on this?
Thanks!
Try this this branch.
Let me know if this fixes the issue with handling paths in Windows.
I suggest creating a new configuration file.
i am trying blacklist with the same result.. nothing is found
trying to use whitelist to see if that works but the config file cannot be created
actually blacklist also have this issue if i do not select another user.. so if i just pick 1 user it will show that error
actually it is happening in both if i do not select all my users.. so if i select just something other than my 6 users then it will throw that error
ok sorry so many messages, i just tested whitelist and it is scanning and bringing back info so it looks like there is 2 issues. one is the blacklist not working correctly and two is that if you do not add all users it will display an error and it will not create the config file
but it looks like at least on whitelist the path on windows is working now Thanks!.
i am trying blacklist with the same result.. nothing is found
For this, please read the "ATTENTION!!!" message and enable at least one media type to be monitored.
I will have to look into the user selection issue.
The user selection bug has been fixed and committed to the same link as above.
it is working perfectly now thank you so much
Hello @terrelsa13 using the latest config will throw this error