Jump to content

Emby Service Updater


hatharry
 Share

Recommended Posts

Make sure you reinstall the current stable release before you run the script otherwise you will stay on the beta Chanel.

Ah! Thanks.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

iNet services are in limbo at the moment...tried updating through the web mgmt console, timed out at a half-download...long story short, ran the script manually in PS ISE and worked flawlessly.

 

Excellent work sir!

Link to comment
Share on other sites

  • 2 months later...

My updater has stopped working on 3.2.33.12 beta. i'm guessing something to do with moving to the .net core, any chance of a new version?

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

I updated to Emby 3.2.60.0 and now I can't seem to get the new updater to install.  I am running Emby as a service on Windows Server 2016.  It gives me the following error:

 

Get-ItemProperty : Cannot find path 'HKLM:\SYSTEM\CurrentControlSet\Services\Emby\Parameters' because it does not exist.
At C:\Users\WHS\Desktop\EmbyServiceUpdater.ps1:26 char:29
+ ... Location = (Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (HKLM:\SYSTEM\Cu...Emby\Parameters:String) [Get-ItemProperty], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand

Link to comment
Share on other sites

  • 4 weeks later...

Hi @@hatharry Since 3.2.60 my script has failed to find new server versions. I have altered the lines below and it's working again.

 

Edit Repo page changed again:

 

getAssetUrl() {
        if ($this.isCore) {
            if([Environment]::Is64BitOperatingSystem){
                $this.assetUrl = ($this.release.assets | Where-Object {$_.name -match "embyserver-(win|windows)-x64"}).browser_download_url
            } else {
                $this.assetUrl = ($this.release.assets | Where-Object {$_.name -match "embyserver-(win|windows)-x86"}).browser_download_url
            }
        } else {
            $this.assetUrl = ($this.release.assets | Where-Object {$_.name -match "embyserver-(win|windows)"}).browser_download_url
Edited by freddyfinn
Link to comment
Share on other sites

Hi @@hatharry Since 3.2.60 my script has failed to find new server versions.  I have altered the lines below and it's working again again.

 

5a63de271810f_updatescript.png

 

Still not working for me :-(

Edited by jeffshead
  • Like 1
Link to comment
Share on other sites

Still not working for me :-(

 

The they have changed the release page again  @@jeffshead.

 

Try:

getAssetUrl() {
        if ($this.isCore) {
            if([Environment]::Is64BitOperatingSystem){
                $this.assetUrl = ($this.release.assets | Where-Object {$_.name -match "embyserver-(win|windows)-x64"}).browser_download_url
            } else {
                $this.assetUrl = ($this.release.assets | Where-Object {$_.name -match "embyserver-(win|windows)-x86"}).browser_download_url
            }
        } else {
            $this.assetUrl = ($this.release.assets | Where-Object {$_.name -match "embyserver-(win|windows)"}).browser_download_url
 
 

If your still having issues run in Windows PowerShell ISE as administrator and check output.

 

Prior to modifying the script I had an issue with 7zip PowerShell module continually coming up as in use so I uninstalled the module using:

 

Get-InstalledModule -Name 7Zip4Powershell | Uninstall-Module

 

After uninstalling 7Zip4Powershell I ran the updater in PowerShell ISE and the error was gone however the PS script was still searching without result.

 

Note: if you run the PS script in PowerShell ISE continually without restarting between runs you will also get the in use error.

Edited by freddyfinn
  • Like 1
Link to comment
Share on other sites

You need to manually install the new portable version from the main page and service with nssm. info is in the emby wiki

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

 

The they have changed the release page again  @@jeffshead.

 

If your still having issues run in Windows PowerShell ISE as administrator and check output.

Thank you!

 

I got the following error when using PowerShell ISE:

MS1CIGo.png

 

So I edited the code (C:\Users\<YOURUSERNAME>\AppData\Roaming\Emby-Server\updater\EmbyServiceUpdater.ps1) as follows:

    getLatestRelease() {
	[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
        $releases = ConvertFrom-Json (Invoke-WebRequest "https://api.github.com/repos/mediabrowser/emby/releases" -UseBasicParsing)
        $preRelease = $this.localVersion.Revision -ne 0
        $this.release = ($releases | Where-Object {$_.prerelease -eq $preRelease})[0] 
    }

You need to manually install the new portable version from the main page and service with nssm. info is in the emby wiki

Yep... Did that already. Just remember to name the service "emby" or "Emby" or edit the service name in EmbyServiceUpdater.ps1 on or around line 21, to match what you named the service when you created it with nssm.

 

So it's once again working... For now  ;) 

Edited by jeffshead
  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Script is reporting that the server is up to date with 3.5.0.0 but Emby is reporting there is an update to 3.5.1.0

 

What did i mess up?

Link to comment
Share on other sites

Script is reporting that the server is up to date with 3.5.0.0 but Emby is reporting there is an update to 3.5.1.0

 

What did i mess up?

It hasn't been working for me, for a while. It's quicker to just perform a manual update rather than debug this script.

 

I installed the Email Notification plug-in so I get an email when there is an update. Once I get an email, it's simple enough for me to login to my Windows server, open the Emby Dashboard in a browser, click on the update link, run the exe, exit the Emby Server instance in the Systray and restart the Emby Server Service. Done in less than one minute.

 

With that said... It looks like the script is, once again, being maintained on GitHub which contradicts post #3 that instructed us to ignore Github and to download the script from post #1 :rolleyes:

 

Now, post #1 contains a link to GitHub. I'll give it a shot again. Thanks for updating the script, hatharry!

Edited by jeffshead
Link to comment
Share on other sites

  • 5 months later...

It might be because i created a beta release today without the -beta suffix. it was up for probably about 20 minutes today before i fixed it.

 

It was also marked as prelrelease so it did not actually cause any Emby users to get incorrectly updated.

Link to comment
Share on other sites

Hmm not so sure about that. I have two installations in two different time zones and they both updated to a beta release, one 7 hours after the other. So if your beta with no -beta suffix was only up for 20 minutes that should not have happened for both the servers. For now I've disabled my the nightly run of this update script.

Link to comment
Share on other sites

Sure Luke, and that's of course appreciated, thank you. I am too just stating what happened :)

 

Maybe hatharry could look into this?

Link to comment
Share on other sites

Great, thanks hatharry!

 

Your script is a godsend for those of use that's running Emby as a service. Thank you for keeping it up to date!

  • Like 1
Link to comment
Share on other sites

@@hatharry I don't think this works as intended, I updated teh script on both my servers (running server v 4.0.0.2) and none of them updated to the latest server r 4.0.1.0. Unless the news post re this version is not correct, I didn't manually install to check the version.

Link to comment
Share on other sites

@@hatharry - I found the problem.

This line:

#requires –runasadministrato

 

 

should be:

#requires -runasadministrator

 

Not sure why a "dash" has been replaced with those three characters, but I've seen exactly the same error a few times before when downloading your script. So I actually made it a habit to check this, except this time I forgot all about it since it's so long since I've downloaded an update. This is also why I haven't scheduled an update() task for your script.

 

It works fine now, thanks again!

Link to comment
Share on other sites

  • 3 months later...

The previous version of the updater script kept updating Emby to the latest beta so I updated to the latest release of the script but it is not updating Emby. If I manually run my Windows Task, I do get a '0x0' but Emby does not update.

 

I see that there are some new switches. Can someone please tell me the proper way to set up the Windows task? Does it now require an API key and/or server URL?

 

This is what I currently have for my Windows Task action and it worked with the previous version:

 

Progarm/script:

Powershell.exe

Arguments:

-ExecutionPolicy Bypass -file "C:\Users\me\AppData\Roaming\Emby-Server\updater\EmbyServiceUpdater.ps1"
Edited by jeffshead
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...