michealespinola / syno.plexupdate

A script to automagically update Plex Media Server on Synology NAS
GNU General Public License v3.0
279 stars 23 forks source link

DSM7/Plex changes #4

Closed Nedlinin closed 2 years ago

Nedlinin commented 3 years ago

I know DSM7 and the associated Plex change are in beta/preview. I just happened to have my task scheduler fail out overnight on the task and figured I'd log an issue here as there does appear to be some changes in the Plex installer when migrating from DSM6->DSM7 that you might want to make a note of/play with.

https://forums.plex.tv/t/dsm-7-plex-media-server-forum-preview/653717

When running the script on my DSM918+ after manually following the post about to migrate from the DSM6 to 7 release the log of the script output looks as:

SYNO.PLEX UPDATER SCRIPT v2.9.9.3

         Script: syno.plexupdate.sh v2.9.9.3
     Script Dir: /volume1/Scripts
    Running Ver: 2.9.9.3
     Online Ver: 2.3.3
       Released: 2020-09-06 08:34:14-05:00 (94+ days old)
             * No new version found.

cat: '/Failed to get log file 255/Preferences.xml': No such file or directory
cat: '/Failed to get log file 255/Preferences.xml': No such file or directory
       Synology: DS918+ (x86_64), DSM 7.0-41222 Update 0
       Plex Dir: /Failed to get log file 255
     Plex Token:
    Running Ver:
     Online Ver: 1.21.0.3711-b509cc236 (Public Channel)
       Released: 2020-12-01 16:19:08-06:00 (7+ days old)
             * Newer version found!

    New Package: PlexMediaServer-1.21.0.3711-b509cc236-x86_64.spk
    Package Age: 7+ days old (7+ required for install)

INSTALLING NEW PACKAGE:
----------------------------------------
{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

{"error":{"code":0},"results":[{"action":"install","beta":false,"betaIncoming":false,"error":{"code":261,"description":"invalid package info content"},"installReboot":false,"installing":true,"language":"enu","last_stage":"prepare_install","package":"Plex Media Server","packageName":"Plex Media Server","spk":"/volume1/Scripts/Archive/Packages/PlexMediaServer-1.21.0.3711-b509cc236-x86_64.spk","stage":"install_failed","success":false,"username":""}],"success":false}

{"action":"prepare","error":{"code":150,"description":"Failed to load package info"},"stage":"prepare","success":false}
----------------------------------------

    Update from:
             to: 1.21.0.3711-b509cc236 failed!

I suspect this is due to the Plex share no longer being used.

JD2005L commented 3 years ago

@trumpy81 thanks for the info, appreciate the explanation, I'll stick with V3.0.6 then until this plex update lands. Just in case this is helpful, /volume1/... may not be the default location in all cases, as for example my /volume1 is for my virtual machines, and my data (and where my apps are configured to be installed) is on /volume3/... Just mentioning this in case you're assuming /volume1 in all cases and is hardcoded into the script, as it may instead need to be scraped somehow given people's various configs.

trumpy81 commented 3 years ago

It does not matter what actual volume you have things installed on. The script can adapt to any volume used.

You are correct though, I should have written the default location will be /volumeX/PlexMediaServer.

smosse commented 3 years ago

Question: Do you think it is necessary to have the MinimumAge value set to other than 0 ? if you are on the beta channel that is idea no ?

trumpy81 commented 3 years ago

You may set the minimum age to anything you like.

I have it set to 0 so that any updates are installed straight away, but some folks like to wait for a while before installing any update.

trumpy81 commented 3 years ago

Plex version 1.24.2.4973 has just been released for Plex Pass users. This version contains the change to the Plex data folder.

The Plex data will now be found in PlexMediaServer, which is accessible in File Station by your admin user only.

I have also been able to test my version of the update script and confirm that it is also working for DSM 7 with the latest release of Plex 1.24.2.4973.

I have attached the script here: syno.plexupdate.zip

Macronot commented 2 years ago

Thanks @trumpy81 , I have been running your version without issue since you uploaded here. Can you clarify if there was a change in synology to the release date. The variable NewVerDate appears to be the date when it was released to beta and not the public release date. Therefore when released to public it is giving a package age greater than the public release date. For example 1.24.3.5033 released to public yesterday and my scheduled update kicked in today and updated as it was showing a package age of 6+

Synology: DS918+ (x86_64), DSM 7.0-41890 Update 0

Plex Dir: /volume1/PlexMediaServer/AppData/Plex Media Server Plex Token: xxxxxxxxxxxxxxxxxxx Running Ver: 1.24.2.4973 Online Ver: 1.24.3.5033 (Public Channel) Released: 2021-09-14 18:34:24+01:00 (6+ days old)

  • Newer version found!

New Package: PlexMediaServer-1.24.3.5033-757abe6b4-x86_64_DSM7.spk Package Age: 6+ days old (3+ required for install)

Thanks

trumpy81 commented 2 years ago

I believe this is because Plex have not updated the release date for the Public channel and it is set to the same date as the Beta channel.

If you go to the Plex downloads page you will see the release dates are the same for both Public and Beta.

The json also returns the same date for both Public and Beta channels.

Rather annoying, but there's little we can do about that I'm afraid.

aerasya commented 2 years ago

A big thanks to you @trumpy81. I can finally running again this script ! :)

ngthwi commented 2 years ago

Thanks @trumpy81

The script doesn't work on non x86-64 arch (DS214play, DS215j, DS216j, DS216play, DS218j : it failed to update on those 5 NAS). It doesn't find the correct download url.

SYNO.PLEX` UPDATE SCRIPT v3.0.2e

     Script: syno.plexupdate.sh v3.0.2e
 Script Dir: /volume1/xxxxxx
Running Ver: 3.0.2e
 Online Ver: 3.0.2
   Released: 2021-03-31 10:55:38+02:00 (204+ days old)
             * No new version found.

   Synology: DS216play-j (armv7l), DSM 7.0-41890 Update 0
   Plex Dir: /volume1/PlexMediaServer/AppData/Plex Media Server
 Plex Token: xxxxxxxxxxxxxxxxxxxxx
Running Ver: 1.24.3.5033
 Online Ver: 1.24.4.5081 (Public Channel)
   Released: 2021-09-24 17:43:23+02:00 (27+ days old)
             * Newer version found!

New Package:
Package Age: 27+ days old (7+ required for install)

INSTALLING NEW PACKAGE:

wget: missing URL Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

  • Package download failed, skipping install...

    Update from: 1.24.3.5033 to: 1.24.4.5081 succeeded!

FIXED FEATURES:

  • (EPG) DVR set up using XMLTV guide data could show overlapping airings in the grid.
  • (Library) Some albums could fail to load their metadata properly (#13100)
  • (Linux) Initial server setup and certain filesystem operations could fail on certain Linux systems (#13027)
trumpy81 commented 2 years ago

The DS214Play & DS415Play were unsupported by Plex, but they gained a reprieve for some reason, I do NOT know why.

The script does NOT work on the DS214Play or the DS415Play in preparation of their status reverting to unsupported though as they are both on the verge of not being able to run Plex adequately at all.

The other models are all ARMv7 of various flavours. Unfortunately, I have no way of testing for these models as some require the Neon package and some do NOT and DSM does NOT report their architecture correctly.

All of the ARMv7 models report as armv71 as far as I am aware, so there is no easy way to determine which package is needed for which model.

I do know that the DS216Play actually requires the Neon package.

I have been hoping that Michael has a solution for this issue ... lol

ngthwi commented 2 years ago

DS215j, DS216j, DS216play and DS218j all require the Neon package 😉

ngthwi commented 2 years ago

Here's a fix to the ARMv7/x86 (32 bits) arch issue:

syno.plexupdate-3.0.2f.zip

The following is to place right after this line ArchFamily=$(uname -m) (in #SCRAPE SYNOLOGY CPU ARCHITECTURE FAMILY)

if [[ "$ArchFamily" =~ armv7 ]]; then declare -A model_machine_map model_machine_map[DS414j]=armv7neon model_machine_map[DS115j]=armv7hf model_machine_map[RS815]=armv7hf model_machine_map[DS216se]=armv7hf model_machine_map[DS215jv10-j]=armv7neon if [[ "${model_machinemap[$SynoHModel]+}" ]]; then ArchFamily=${model_machine_map[$SynoHModel]} elif [[ "${SynoHModel//[^0-9]/}" =~ 1[5-8]$ ]]; then ArchFamily=armv7neon else ArchFamily=armv7hf fi elif [[ "$ArchFamily" =~ i686 ]]; then ArchFamily=x86 fi

(the mapping arch/model comes from cowboy/synology-update-plex)

trumpy81 commented 2 years ago

I have updated the script to include a selector for the armv7Neon or armv7hf package. The script is attached below.

You will need to modify the script to suit if you own an ARMv7 model.

If running the 3.0.2f script for the first time, make sure you delete any config.ini file created by a previous script before doing so. The config.ini file will be located in the same folder as the script. You will only need to do this the first time you run this script.

On first run, you should see this message in your email:

Configuration File (config.ini) Is Missing, Creating Default Setup...

You will also need to Edit the script and search for this line (line 46):

printf "%s\n" "Neon=1" >>"$SPUSFolder/config.ini"

If you need the armv7neon package set Neon=1 If you need the armv7hf package set Neon=0

The default is Neon=1.

Note: The DS214Play & DS415Play will NOT be supported.

syno.plexupdate.zip

cmatte commented 2 years ago
ferboiar commented 2 years ago

Hi guys

Is this project abandoned? The last commit is from May 2021, and it seems that @michealespinola has not been active since then ... There are several pull requests pending to be attended since June ...

Is there a working fork of this project for DSM7?

regards!!

tillkruss commented 2 years ago

@ferboiar Yeah, I'd sponsor a working fork.

ferboiar commented 2 years ago

https://github.com/YuriyGuts/syno-plex-update

michealespinola commented 2 years ago

The code has been updated to support DSM 7. After an unfortunate hiatus, I'm able to resume direct support of the script.