Jump to content

Recommended Posts

Posted

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
Posted

This is sweet!!!

 

 

Sent from my iPhone using Tapatalk

  • 2 months later...
Posted

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!

  • 2 months later...
Posted

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?

  • 3 weeks later...
Posted

Updated to support new server releases

  • Like 4
  • 1 month later...
Posted

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

Posted

Never mind.  I finally figured it out.  Thanks for all of your hard work hatharry.

  • 4 weeks later...
Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted

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
  • 1 month later...
Posted (edited)

 

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
Posted

@@jeffshead

 

Thanks, I was getting the same error as well.

  • 4 months later...
Posted

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?

jeffshead
Posted (edited)

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
  • 5 months later...
Posted

After updating to Emby server v4.0.0.2 this script starts to update to the beta channel server releases.

Posted

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.

Posted

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.

Posted

Right I'm simply telling you what happened today in case it might be helpful. Thanks.

Posted

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

 

Maybe hatharry could look into this?

Posted

This was due to the version numbering. The script has been updated to download stable releases only

  • Like 1
Posted

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
Posted

@@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.

Posted

@@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!

  • 3 months later...
jeffshead
Posted (edited)

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

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
×
×
  • Create New...