Repository navigation
fix(keep-in-touch): stop marking newly linked friends Disconnected - #391
Merged
Merged
Conversation
thcolin
commented
Oct 11, 2026
Owner
- A friend with an empty movie Watchlist no longer shows as Disconnected after their first keep-in-touch pass.
- Only a 401 on the Plex ping marks a token dead. An outage of plex.tv, or a failure on the account or the Watchlist, logs a warning and leaves the token as it is.
- The ping sends the token in a header, so it no longer reaches the job logs through a network error.
…the friend disconnected Plex sends an empty watchlist without Metadata. The movie loop spread it, threw, and the catch took the TypeError for a dead token: every new friend with nothing on their Watchlist showed as Disconnected from the first pass. Movies and shows now read their watchlist through the same watchlistOf.
Any error past the ping, on the account, the Sensorr API or the watchlist, was taken for an expired token: the friend showed as Disconnected and could be mailed to reconnect. Measured on the running instance, /api/v2/ping answers 401 for the two expired tokens and 200 for every other, the two new friends included. pingToken now returns false on a 401 only and throws on any other answer. keep-in-touch leaves the token as it is when plex.tv cannot be reached, and a failure past the ping only logs a warning.
node-fetch writes the request URL in its network errors, and keep-in-touch logs that message to Mongo: a guest's token could land in the job logs. plex.tv answers the header the same, 401 or 200, checked on the running instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.