Scripting Upgrade Process On Windows Server

Server Version#: 1.40.3.8555
Player Version#: N/A

The Plex Media Server download URL is constructed like:

https://downloads.plex.tv/plex-media-server-new/{latest_version}/windows/PlexMediaServer-{latest_version}-x86_64.exe

However, it does not seem that you can parse the https://downloads.plex.tv/plex-media-server-new/ for a latest_version and then construct the download url and download it that way.

I have my server functioning as a mostly “unattended” server. Many of the operations are automated through scripts. I have configured Plex Media Server to run as a windows service so using the built in update function doesnt work. I have to stop the service, manually download the new package, install it, then start the plex service again.

I have constructed scripts to do this same thing for many other services/applications; however, Im having trouble with plex. Im trying to something like this in Python:

Plex Media Server Downloads

plex_url = “https://downloads.plex.tv/plex-media-server-new/

Get the latest version

latest_version = get_latest_version(plex_url)

if latest_version:
# Construct the download URL
download_url = f"https://downloads.plex.tv/plex-media-server-new/{latest_version}/windows/PlexMediaServer-{latest_version}-x86_64.exe"
print(f"\nLatest Plex Media Server version: {latest_version}“)
print(f"Download link: {download_url}”)
else:
print(“\nError fetching the latest version. Please check the provided URL or try again later.”)

But the functionality will not get passed https://downloads.plex.tv/plex-media-server-new/ because it doesnt see this as a valid link.

Has anyone else scripted any such functions. Or is there another valid location to potentially grab Plex Media Server downloads.

Look at this project.

That should work.

Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.