Skip to content

fix(keep-in-touch): stop marking newly linked friends Disconnected - #391

Merged
thcolin merged 3 commits into
devfrom
fix/keep-in-touch-disconnected
Oct 11, 2026
Merged

thcolin merged 3 commits into
devfrom
fix/keep-in-touch-disconnected

Conversation

@thcolin

@thcolin thcolin commented Oct 11, 2026

Copy link
Copy Markdown
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.
@thcolin
thcolin merged commit e721c40 into dev Oct 11, 2026
1 check passed
@thcolin
thcolin deleted the fix/keep-in-touch-disconnected branch October 11, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant