PmsService icon indicating copy to clipboard operation
PmsService copied to clipboard

Plex Update

Open hessercan opened this issue 5 years ago • 6 comments

Are any updates being worked on to address the update issue? It shouldn't be hard for the updater to be automatically run as administrator without the UAC prompt.

hessercan avatar Dec 25 '19 12:12 hessercan

If by update issue you mean you shouldn't use the updates via the plex web interface if you use this service... the anwser is no.

Years ago I started speaking to the plex guys about looking for a specific exit code so I could know it was an update and not auto restart the service. Then the plex forum hack happened and we never got back to it.

This service specifically does not require admin rights, therefore, it won't be installing anything.

cjmurph avatar Dec 25 '19 13:12 cjmurph

@cjmurph , @hessercan - Almost got a fix for this one worked out too.

By using the registry to find the pms data path, then setting a filewatcher on the log for the plex update service, it's pretty easy to determine when Plex has stopped itself to install an update - then wait for the log to indicate it's been restarted, then kill the process and grab it again with the service. ;)

Just testing it out now to ensure I didn't do anything dumb, and that'll be pushed to my fork of this till murph and I can chat a bit.

d8ahazard avatar Dec 07 '21 21:12 d8ahazard

Just curious which registry key you are using? The LocalAppData value in the Plex registry key isn't reliable as not all installs have the key. That key isn't needed to run Plex.

TechieGuy12 avatar Dec 08 '21 02:12 TechieGuy12

Just curious which registry key you are using? The LocalAppData value in the Plex registry key isn't reliable as not all installs have the key. That key isn't needed to run Plex.

Good point!

That is the key I was looking for, and given your suggestion, I've added a bit to the helper that starts by looking in %localappdata%... (default) location, and then checking in the registry if it's not in the default position.

image

d8ahazard avatar Dec 08 '21 03:12 d8ahazard

That should work. I believe the LocalAppDataPath registry key doesn't include the Plex Media Server folder, so if you are returning that folder, as you do with the first Environment.SpecialFolder.LocalApplicationData check, you will need to append "Plex Media Server" to the registry key value.

TechieGuy12 avatar Dec 08 '21 13:12 TechieGuy12

Noted and done. 😄

On Wed, Dec 8, 2021, 7:15 AM Paul Salmon @.***> wrote:

That should work. I believe the LocalAppDataPath registry key doesn't include the Plex Media Server folder, so if you are returning that folder, as you do with the first Environment.SpecialFolder.LocalApplicationData check, you will need to append "Plex Media Server" to the registry key value.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cjmurph/PmsService/issues/45#issuecomment-988805507, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMO4NH7YOEU4DTCGZXCFYDUP5LABANCNFSM4J7EWURQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

d8ahazard avatar Dec 08 '21 13:12 d8ahazard

Sorry, trying to understand this one - and not fully getting it 😞. Is this the case where PMS is stuck in the state of Plex updating?

Thanks!

arrmo avatar Jan 12 '23 20:01 arrmo

Sorry, trying to understand this one - and not fully getting it 😞. Is this the case where PMS is stuck in the state of Plex updating?

Thanks!

no, this issue is for the plex service to handle updates at all. I see why it would get stuck in updating, I noticed last night while testing that while one update worked, another seemed to require user input and since the update was happening in session 0, that wasn't possible. In that case, plex was stuck "updating" and in fact will not update and will not restart. That is in fact a seperate issue.

cjmurph avatar Jan 13 '23 07:01 cjmurph

Meaning the update was waiting for user input => and it's hidden, so can't see it, nor respond. Correct? The problem in that case is no real way to restart it?

Thanks!

arrmo avatar Jan 13 '23 23:01 arrmo

It seems like it.

cjmurph avatar Jan 13 '23 23:01 cjmurph

That makes sense - and no real way around it I assume?

Thanks!

arrmo avatar Jan 14 '23 00:01 arrmo