-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some Watchlist "Problems" #21
Comments
Hello! I'm sorry you're experiencing some issues...
I've recently noticed an access error with the watchlist feature. Upon checking, I found that the updated plexapi now requires the api call to specify when it's using a token, instead of merely passing the token as before.
No, it fetches all users.
I only utilize the external domain for Plex. Due to my intentional firewall settings, I can't access Plex using the internal IP from the server running the script. Therefore, any issues related to domain access shouldn't originate from the code but I can't rule it out completely, I base myself on the fact no other user is experiencing it and during my quick review of the code it still uses up-to-date plexapi calls.
This is odd, I'm guessing from the size of the file you actually have a list of media inside? Try with the updated code, let me know, if it still doesn't work, run it with debug on and send me the log, I'll try and have a look when possible. |
Thanks for answering that fast ;) I updated your script, deleted the watchlist_cache and rerun the script with debugging enabled: plexcache_watchlist_cache.json is filled with my stuff (no other users media) with a correctly edited path. The media can also be found on my server. The DNS topic does not matter... I was only thinking if that could be related. I get this: But like I said, I'd be more than happy if the watch list and other users would work ;) |
With chronos I had this kind of issues, literally randomly, sometimes I just had to reboot the container, sometimes change the network of the container. That's why I stopped using it and advising it as the best way to run the script. Regarding the error, I've updated the code once again, I'm not sure why it gives you that error. |
Okay, understood.... I think I will change from Chronos to User-Scripts then. But sadly it still does not catch the other users watchlist....only my data gets populated in the file, BUT also not copied, even though available. |
Try directly with userscripts, if it still gives the same error I’ll have a
look again.
On Wed, 23 Aug 2023 at 20:10, dominikheiss ***@***.***> wrote:
Okay, understood.... I think I will change from Chronos to User-Scripts
then.
But sadly it still does not catch the other users watchlist....only my
data gets populated in the file, BUT also not copied, even though available.
https://pastebin.com/wW4c1tsQ
—
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDVY32LUYQL54QDPZ4PVVDXWZISXANCNFSM6AAAAAA33GLMNA>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
|
I just did and sadly it's exactly the same :( Thanks for your effort though! |
//UPDATE: Despite that I still get the errors from the watchlists and no media from the watchlist file gets pulled to the cache. Also one more question: how does the "watched_move" process act, if movieX is on two users decks and one of them watched it. Will it be moved back to the array or only if it is watched from all user's decks? |
That's great!
The common media will be moved only when nobody has it in the watchlist or ondeck, when iterating all the media, the script lists all the files that needs to go the array and to the cache, and before actually moving them, it "compares notes" and skips any files destined to the array if the same file is meant to stay or be moved to the array. (Otherwise you will have a ping pong effect, wasting time and energy).
Can you try this? It's the standalone version of the watchlist fetching, it will print the whole fetched media for each user. |
Here is the output of the file: I tried to troubleshoot with ChatGPT like 2 hours today, but he is no magician it seems ;) |
Yeah I wish it could fix the (whole) code but unfortunately it isn't as capable yet... I've implemented an error catching, so for the users it cannot "find" it will still continue but in a clean way. I'm having trouble understanding why this issue is occurring. |
Here is the output: https://pastebin.com/MaTkswQt Yes I agree, the error is super weird. But even if we ignore that it runs into the supposed "API errors", it should read the content of the "plexcache_watchlist_cache.json" (which contains my content - with correct path) and move it to the SSD. But man, if I am the only one with this problem, don't spend too much time with it. |
It's because it ends with an error and it doesn't proceed, if I manage a decent error catching when is having this issues, it should then continue and copy whatever it managed to fetch from the watchlist(s). https://pastebin.com/pctPrGFi |
It can't be an error in my settings.json right? |
Well no, you are having the same user error not found even on my test script which doesn't touch the settings files at all. And I have set a fairly decent settings loader to avoid settings error (at least obvious ones). The last error you had it's entirely on me, I forgot to paste It should hopefully work now? |
Look, that's what I meant: plexcache_log_20230824_2025.log ---> without touching other users it shows no errors, but does not proceed processing the watchlist, or am I mistaken? |
What is the content of the watchlist file? I've re-updated the code on pastebin, it includes another error catching for BadRequests (too many requests). I really gotta make myself work on the rewrite of the script so that debugging and improving the script will be way easier. |
The watchlist file content seems valid...I checked the paths. The new script is running for 2 minutes, no output yet :) |
I've checked the files you have on the watchlist_cache file and they are present in the plexcache log file, it means they are in the list of files that needs to be moved. Debug was on, so obviously it wasn't moving anything. About the other script running for that long...I guess I went too far with the delay time, just stop it. |
Yeah sure, I also did that, but with debug it should calculate the GB of the files it would move. At least that's what I saw in other Debug runs. And even without debug it does not move them :( Here is the output: https://pastebin.com/GLn5ZkYy |
So this file I suppose is not on the cache drive? I've updated the main script including what I've learned from the pastebin, I've also added a listing of all the cache files at the end of the script, right before moving files to the cache, just to have some extra info. |
Sadly it isn't: It sits here: Log from the updated version: Here with Debug enabled: |
Okay try now, it should work..................................... |
It really works - at least for my user ;) |
Yeah unfortunately I haven't came up with a solution for that yet...at least the main user works for you... Thank you for your patience :) |
I have to thank you!!
I'm going to buy you a beer 🍻😂
Von meinem/meiner Galaxy gesendet
…-------- Ursprüngliche Nachricht --------
Von: "Emanuele B." ***@***.***>
Datum: 24.08.23 22:37 (GMT+01:00)
An: bexem/PlexCache ***@***.***>
Cc: Dominik Heiß ***@***.***>, Author ***@***.***>
Betreff: Re: [bexem/PlexCache] Some Watchlist "Problems" (Issue #21)
Yeah unfortunately I haven't came up with a solution for that yet...at least the main user works for you...
I'm curious if any other user is experiencing your same issue, either way I will carry on and working on it as well as the zfs issue I've left for a while.
Thank you for your patience :)
—
Reply to this email directly, view it on GitHub<#21 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQWQPWGRSOTZUEIAEEDBP2TXW63Q5ANCNFSM6AAAAAA33GLMNA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
What is the ZFS issue, if I may ask? (as my cache disk is a raid1 ZFS array ;) ) |
I have one more question regarding the watchlist of other users: Because the script uses "switchHomeUser" and my users are "remote". Other user's on-deck stuff works, because it's stored on my actual server, but their watchlist data is like in their own account, hence I get the weird authentication errors and such. |
Apologies, I should have tested it...I've changed how I passed the variable and it seems to be working fine on my end! |
No problem ;) The variable error is gone, but now we have the same situation as before: plexcache_log_20230825_2005.log |
All the errors you mean? This an extracted and improved version of the watched fetching...It will fetch all users and should handle unauthorised users like the watchlist one. |
Naaah stop. It is soooooo weird ;) I don't know why, but I just did another Debug-Run and now it has populated the watched file (which it did not the last time) and told me that it would move 100GB to the array. But doesn't matter, it moves something back^^ |
So it works...odd about the two different numbers but I guess is what plex told to the script...Anyways the improved version should not affect much, if you don't mind testing it anyway before I commit it? |
Yeah, works!! Thank you very much! I will test it asap... just need to wait for the 71GB transfer. |
So I've tested it quite few times now and improved it a little more, I've also submitted it in the last commit, so you can either try the script directly or the pastebin one, they are virtually the same. |
haha....yeah took quite a while. but I also tested the new version and it worked. Ty ;) |
Perfect, I'm glad it works. |
Sure, just tell me if you want me to test something.
Von meinem/meiner Galaxy gesendet
…-------- Ursprüngliche Nachricht --------
Von: "Emanuele B." ***@***.***>
Datum: 25.08.23 20:49 (GMT+01:00)
An: bexem/PlexCache ***@***.***>
Cc: Dominik Heiß ***@***.***>, Author ***@***.***>
Betreff: Re: [bexem/PlexCache] Some Watchlist "Problems" (Issue #21)
Perfect, I'm glad it works.
Still baffled about your users situation I will keep investigating!
—
Reply to this email directly, view it on GitHub<#21 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQWQPWEPIBWESYUD7PDSPETXXDXURANCNFSM6AAAAAA33GLMNA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
You are also using Unraid, right? I have the issue, that ur script is running with root privileges and messing with my permissions in the copy process ;) |
I am using unraid as well, and I did encounter some issues with the permissions but the script is not the only one messing around with it and I have a secondary script to make sure the permissions are always correct in the media folders... But anyway you are right and the script should not mess with the permissions and rather keep them as they are. I've updated the code, I've quickly run it but because there is nothing to move I can't tell you for sure how well it works. |
Thanks for the fast response and help - seems to work as it should ;) |
Hey there, I hope everything is still working fine! Unfortunately I've not managed to fix your users error, but another user on reddit was having some issues with the folder creation in the version of the script we have been editing (and you, probably still using). I have also implemented a duplicate check, so it will remove the media file from the source if already present in the destination, avoiding back and forth file moves. I will implement a setting for it eventually! |
Hey, yeah everything's cool, thanks for asking ;) |
Hey, I don't know if it's the new version or some randomness, but I got an error, which prevents the function itsself. I disabled watchlist for now, but does not change anything. |
Uhm that's odd, just to be sure, the script you are using, when did you get it? Because I did commit 5h ago, just want to be sure it is the latest one you are using |
I did not update it today. I think yesterday's commit.
Von meinem/meiner Galaxy gesendet
…-------- Ursprüngliche Nachricht --------
Von: "Emanuele B." ***@***.***>
Datum: 30.08.23 18:33 (GMT+01:00)
An: bexem/PlexCache ***@***.***>
Cc: Dominik Heiß ***@***.***>, Author ***@***.***>
Betreff: Re: [bexem/PlexCache] Some Watchlist "Problems" (Issue #21)
Uhm that's odd, just to be sure, the script you are using, when did you get it? Because I did commit 5h ago, just want to be sure it is the latest one you are using
—
Reply to this email directly, view it on GitHub<#21 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQWQPWE25D4KI5BGIEZOGETXX5TLZANCNFSM6AAAAAA33GLMNA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
If you don't mind testing the latest one as I did change some stuff and fixed others, hopefully it fixes your new issues as well... |
I've reversed some changes, just updated the repository, it did start giving the same issues on my end too (even tough I run it like 5 times with me playing around with files and permissions earlier and it gave me no issues)... |
Hey, I just ran the updated version and got the same error with the same file :/ |
Now it moves stuff to the array, after deleting watched-cache. |
might have put the wrong paths in the cache file. Let me know if it continue to work. Otherwise this the same version you were using before updating at all: https://pastebin.com/w97WAjk4 UPDATE: I've, once again, committed another update, just because the permissions were not set consistently all the time. Now it should and appears so judging by my testing and another user! 🎉 |
I can also confirm the new version is working! |
Mhhh... sadly I got the same error again. |
Is it exactly the same error as your last log? What permissions does the Show and Season folder have? And, when removing the watched cache file it would actually move that same file with no issues? Also (I need to start using version number inside the script), considering your previous comment, you are using the latest commit, right? |
Yeah, was the same error as you mentioned: The permissions are "nobody" as owner and rwx as actual permission. I had the latest revision of yours. |
The permissions appear correct then. I did a commit last night (~10h ago), did not change much, just the order on when the script resets its umask to then give the right permissions to files and folders and, finally, the "to the array" incorrect text. Unfortunately it is not tested as my cache drive is sort of dead, so I can't run my own script currently |
Oh okay, dead cache drive sucks. |
I will definitely take a look at it. It's odd that I didn't make any changes to the watched media or the caching system. The last time I used the script, it was working okay. Additionally, the other active user (there might be more, I hope) of the script hasn't reported any issues either. Nevertheless, when I come around to rewriting the script, I'll ensure that it's handled better, I suppose. At least it functions without the cache. To be fair, since it's fetched locally, it shouldn't significantly impact the run time of the script. The watchlist, on the other hand, could have been more troublesome without cache. The funny part is that they use the same functions. |
Hey guys,
I managed to get everything working in my UNRAID environment, despite the fact, that it's throwing errors from the Watchlists others users using my Plex server (does this only work for "local users"?
Also my watchlist is being created, but not copied to cache :(
Don't know where to start sadly...I hope someone can support me :)
I also couldn't use my public dns name for my plex server (even valid certificates and stuff, but it told me "token is malformed"...)
The text was updated successfully, but these errors were encountered: