Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSM7/Plex changes #4

Closed
Nedlinin opened this issue Dec 9, 2020 · 68 comments
Closed

DSM7/Plex changes #4

Nedlinin opened this issue Dec 9, 2020 · 68 comments
Assignees
Labels
bug Something isn't working discussion DSM7 Synology DSM 7

Comments

@Nedlinin
Copy link

Nedlinin commented Dec 9, 2020

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.

@michealespinola michealespinola self-assigned this Dec 9, 2020
@michealespinola
Copy link
Owner

Based on these errors, there appear to be fundamental changes that require alterations to how this script works. This isn't unexpected, and I was forewarned about this by @ChuckPa at Plex. Based on the error, the PMS location seems to have been moved and/or determining it's location cannot be done with the same method the script currently uses.

Thank you for that Plex forums link! My problem assessment (as well as yours) appears to correlate with the forum post. Another thing that worries me is the installation section output. I've never seen errors like that in DSM 6, so there may also be changes regarding the synopkg package installation utility.

I admit I have not been following along with Plex/DSM 7 info, because I am not a fan of beta-level discussions or running beta version software. However, I will re-read through it a couple of times and see if there is anything I can extrapolate and work with.

I'm likely at a disadvantage to effectively troubleshoot the problem until I am personally running DSM 7.

@michealespinola michealespinola added bug Something isn't working DSM7 Synology DSM 7 labels Dec 9, 2020
@Nedlinin
Copy link
Author

Nedlinin commented Dec 9, 2020

@michealespinola : During installation one of the prompts asks you where to store the log file. If left as default it appears to be

/<volume>/@apphome/PlexMediaServer/Plex Media Server/Logs

Simply hard coding the PlexFolder

PlexFolder="/volume1/@apphome/PlexMediaServer/Plex Media Server"

appears to mostly work on my DSM7 install but obviously this assumes everyone picked volume1 for the install location and left the custom log location as default..

Also while digging through I noticed this check (line 255)


# COMPARE PLEX VERSIONS
/usr/bin/dpkg --compare-versions "$NewVersion" gt "$RunVersion"
if [ "$?" -eq "0" ]; then

My output there:

Running Ver: 1.21.0-3744
     Online Ver: 1.21.0.3711-b509cc236 (Public Channel)

I assume Plex intends to bump the version code after the preview but, as of right now, dpkg believes the online one is newer than the preview due to the formatting differences in the version number which may cause problems trying to use things before the final (or at least Plex beta) release anyway.

@michealespinola
Copy link
Owner

One of the reasons v3.0 of this script hasn't been released yet is because I have been contemplating a "force update" option. I think that this situation further reinforces the need. All of this is giving me reason to expand the command-line/terminal options.

Thank you for all this info!

@Nedlinin
Copy link
Author

Nedlinin commented May 7, 2021

@michealespinola : Is the new script (v3) supposed to be supporting DSM7 already? Or is there no longer an intent to support it?

@michealespinola
Copy link
Owner

DSM 7 is still beta, and I have no means of testing/developing for it, so I cannot support it at this time. I hadn't realized this was still hanging as an "open" issue.

When DSM 7 is fully released and I can upgrade to it, I will re-open and re-address any outstanding DSM 7 issues if they exist after updating the script to support it.

v3 externalizes the settings to a config file, and in the meantime, I am working on making modifications to the self-updating process. I am anticipating significant changes for DSM7, and those will likely be released as v4.

@Nedlinin
Copy link
Author

Nedlinin commented May 7, 2021

DSM7 is still beta (seems like it may be for a long while yet). However, if your Synology is capable of running Virtual Machines you can run a virtual DSM (one comes free): https://www.wundertech.net/how-to-setup-a-synology-dsm-virtual-machine-vdsm/

This gives the opportunity to test against a non-production environment for any new scripting changes that would need to take place for DSM7.

@michealespinola
Copy link
Owner

I run a DS1019+. I think it supports VMs, although I've never looked into it before. I'll have to investigate and see if it will cause any disruption to my environment or if I can at least utilize it off-hours to test with.

Thanks for the info

@ChuckPa
Copy link

ChuckPa commented May 7, 2021

If I may comment?

Please be very careful with anything you do regarding Plex and DSM 7.

I had to perform a complete redesign & rewrite for DSM 7.

Synology has severely restricted applications. root access is no longer available to 3rd party apps.
If anything in Plex's data areas gets munged up, it will break and there will be no automated way to repair it.

All the new scripting runs as the user and not as root (it's that harshly restricted)

Hoping to get a new DSM beta soon so I may prepare for the RC.

@Nedlinin
Copy link
Author

Nedlinin commented May 7, 2021

@ChuckPa : To my knowledge, it is only packages that are restricted. A script can still be run as root through say SSH.


Synology strongly advises you not to run commands as the root user, who has
the highest privileges on the system. Doing so may cause major damages
to the system. Please note that if you choose to proceed, all consequences are
at your own risk.

nedlinin@nedlinin-nas:~$ sudo whoami
root

So you can still get root privileges for the script though I admit I'm not sure how doing something like a scheduled task works if it requires root in DSM7 (I think it still works but haven't confirmed).

Edit: I can confirm the root is still an option for the task scheduler.
Example

@michealespinola
Copy link
Owner

michealespinola commented May 7, 2021

If I may comment?

@ChuckPa: Please and thank you. Your insight is always very appreciated!

@ChuckPa
Copy link

ChuckPa commented May 8, 2021

Yes, user scripts can run as root. If Synology removes that capability, we'll all be in trouble.

I have some new packaging I'm working on now for the Syno.
Currently on my plate is backup and restore of the PMS install.
If lucky, I'll be able to incorporate import a generic ZIP with it. 🤞

I'll be opening a forum thread when ready.

(so you know what I'm up to)

@cmatte
Copy link

cmatte commented May 23, 2021

@michealespinola I have reviewed the script to be compatible with DSM 7 and created a pull request at #15 following the DSM 7 structure - feel free to review it, advise any improvements, test it, and merge it ;)
@Nedlinin if you are comfortable with testing an early version, feel free to do so.

I could not test the installation of a new version, however the remainder looks fine from my tests and I can't see synopkg install changes that shall affect that last part either.

@ChuckPa
Copy link

ChuckPa commented May 23, 2021

Advisory.

I am working with Synology on DSM 7 RC.

If any of you receive DSM 7.0-41876, do not install it. Plex will not install once this version is installed.
Something changed in synopkg since previous release because none of the older PMS version will install either.

I will update when I learn more.

EDIT:

I decided to do some digging into the synopkg issue. Seems to be a regression to me. Any thoughts?

bash-4.4# synopkg install PlexMediaServer-1.23.0.4482-62106842a-aarch64_DSM7.spk  | jq
{
  "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": "PlexMediaServer",
      "packageName": "Plex Media Server",
      "spk": "PlexMediaServer-1.23.0.4482-62106842a-aarch64_DSM7.spk",
      "stage": "install_failed",
      "success": false,
      "username": ""
    }
  ],
  "success": false
}
bash-4.4# 

@Nedlinin
Copy link
Author

@cmatte : Nice! I was able to run it but unfortunately I just installed the newest version manually yesterday so I also cannot test the actual update process. However, it does properly detect my log location, version in use, etc so I suspect it'll work great.

@Nedlinin
Copy link
Author

Nedlinin commented May 25, 2021

@cmatte : actually, installation did fail..

nedlinin@nedlinin-nas:~$ cat config.ini
# A NEW UPDATE MUST BE THIS MANY DAYS OLD
MinimumAge=0
# PREVIOUSLY DOWNLOADED PACKAGES DELETED IF OLDER THAN THIS MANY DAYS
OldUpdates=60
# NETWORK TIMEOUT IN SECONDS (900s = 15m)
NetTimeout=900
# SCRIPT WILL SELF-UPDATE IF SET TO 1
SelfUpdate=0
nedlinin@nedlinin-nas:~$ sudo ./syno.plexupdate.sh

SYNO.PLEX UPDATE SCRIPT v3.0.3

         Script: syno.plexupdate.sh v3.0.3
     Script Dir: /volume1/homes/nedlinin
    Running Ver: 3.0.3
     Online Ver: 3.0.2
       Released: 2021-03-31 03:55:38-05:00 (55+ days old)
                 * No new version found.

SynoType is Synology (DSM 7)
       Synology: DS918+ (x86_64), DSM 7.0-41222 Update 0
       Plex Dir: /volume1/@apphome/PlexMediaServer/Plex Media Server
     Plex Token: <redacted>
    Running Ver: 1.23.1.4528
     Online Ver: 1.23.1.4571 (Beta Channel)
       Released: 2021-05-24 16:55:40-05:00 (0+ days old)
                 * Newer version found!

    New Package: PlexMediaServer-1.23.1.4571-6119e8eed-x86_64_DSM7.spk
    Package Age: 0+ days old (0+ required for install)

INSTALLING NEW PACKAGE:
----------------------------------------
2021-05-25 07:23:33 URL:https://downloads.plex.tv/plex-media-server-new/1.23.1.4571-6119e8eed/synology-dsm7/PlexMediaServer-1.23.1.4571-6119e8eed-x86_64_DSM7.spk [108820480/108820480] -> "/volume1/homes/nedlinin/Archive/Packages/PlexMediaServer-1.23.1.4571-6119e8eed-x86_64_DSM7.spk" [1]
{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

{"error":{"code":0},"results":[{"action":"upgrade","beta":true,"betaIncoming":true,"error":{"code":0},"finished":true,"installReboot":false,"installing":true,"language":"enu","last_stage":"started","package":"PlexMediaServer","packageName":"Plex Media Server","pid":7563,"scripts":[{"code":0,"message":"","type":"stop"},{"code":0,"message":"","type":"preupgrade"},{"code":0,"message":"","type":"preuninst"},{"code":0,"message":"","type":"postuninst"},{"code":0,"message":"","type":"preinst"},{"code":0,"message":"<br><br><p style='color:blue'>Note: If Plex cannot access your media, verify user <strong>PlexMediaServer</strong> is granted permission in <strong>Control Panel</strong>.</p><br>\nSet access to your media share(s) by performing the following steps:<br><br>\n1. Open <strong>Control Panel</strong> and select <strong>Shared Folder</strong><br>\n2. Select the share which contains your media and click <strong>Edit</strong><br>\n3. Click the <strong>Permissions</strong> tab<br>\n4. Change the dropdown from <strong>Local Users</strong> to <strong>System internal user</strong><br>\n5. Check the <strong>Read/Write</strong> checkbox for the <strong>PlexMediaServer</strong> user<br>\n6. Click <strong>Save</strong> to confirm the new permissions<br>\n7. Repeat steps 2-6 for each share you want Plex Media Server to access<br>\n","type":"postinst"},{"code":0,"message":"","type":"postupgrade"},{"code":0,"message":"","type":"start"}],"spk":"/volume1/homes/nedlinin/Archive/Packages/PlexMediaServer-1.23.1.4571-6119e8eed-x86_64_DSM7.spk","stage":"installed_and_started","status":"running","success":true,"username":""}],"success":true}

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

    Update from: 1.23.1.4528
             to: 1.23.1.4571 failed!

nedlinin@nedlinin-nas:~$

Looks like the install succeeds but querying for the info after fails?

Edit: can confirm that I'm now running the newest version but the script believed the install to have failed.

@cmatte
Copy link

cmatte commented May 25, 2021

Thanks @Nedlinin perfect feedback for me to look into it, I will update the pull request with a possible fix in a few days.

@michealespinola
Copy link
Owner

@michealespinola I have reviewed the script to be compatible with DSM 7 and created a pull request at #15 following the DSM 7 structure - feel free to review it, advise any improvements, test it, and merge it ;)

This is awesome and greatly appreciated! I may not be able to review/merge it for a few days, but it's now on my shortlist of things to do this week.

@cmatte
Copy link

cmatte commented May 30, 2021

@michealespinola I've amended the pull to include the installation fix and bumped version to 3.0.4 in #15.

@Nedlinin
Copy link
Author

Nedlinin commented Jun 1, 2021

Looks like DSM 7.0-41882 (RC) just hit the update servers. I'll be installing it later and checking the script still functions.

@ChuckPa any update you're aware of versus the bugged version you had noted above?

@ChuckPa
Copy link

ChuckPa commented Jun 1, 2021

There is an enforcement change in the INFO file.

I've modified the INFO file and seem to be working with 41882.
I am forum-testing the change here:
https://forums.plex.tv/t/synology-dsm-7-build-41882-breaking-changes/719740/25

@cmatte
Copy link

cmatte commented Jun 5, 2021

Thanks @ChuckPa for the brilliant and timely work there!

DSM 7 RC installs will need a different package format and the official update server does not include that fix yet, so version 1.23.2.4656-85f0adf5b published today won't install until Chuck hand makes it,and possibly Plex might have to create two separate releases for pre-RC DSM 7 systems and for DSM 7 RC and above!

The current script version check mechanism has a bug for DSM 7 that wrongly advises for a successful installation while that is not the case, so I have updated pull #15 once again. Be warned that does not solve the RC incompatibility of the newer official package, while with it the script returns the correct information and shall be working fine once DSM 7 RC + compatible packages can be offered in the official channel again.

@trumpy81
Copy link

trumpy81 commented Aug 2, 2021

I have made a few corrections and changes to the script.

I still have not tested it with DSM 7, but I will just as soon as Chuck can get the new packaging in place.

I have attached the updated script here:
syno.plexupdate-3.0.2c.zip

@seanhamlin
Copy link

seanhamlin commented Aug 5, 2021

Note that DSM7 is no longer in beta. It is GA. https://www.synology.com/en-global/DSM70. I upgraded my DSM 918+ to it today.

Keen to see a DSM7 version of this script (this script is a lifesaver). It seems this disclaimer is no longer relevant 966c8ff

Also, instead of zip files attached to this issue, a pull request would be a nicer way to contribute (and others can see the changed proposed, and provide feedback). Edit, I see #15 already exists.

@JD2005L
Copy link

JD2005L commented Aug 5, 2021

I have made a few corrections and changes to the script.

I still have not tested it with DSM 7, but I will just as soon as Chuck can get the new packaging in place.

I have attached the updated script here:
syno.plexupdate-3.0.2c.zip

So I'm getting the following error when I run V3.0.2c: cat: '/AppData/Plex Media Server/Preferences.xml': No such file or directory As a result it's not detecting that my Plex is running the Beta update channel. Otherwise everything else works it would seem, but that's a pretty important function to me. Any advice on how to resolve?

Full script output:
SYNO.PLEX UPDATE SCRIPT v3.0.2c

     Script: syno.plexupdate.sh v3.0.2c
 Script Dir: /volume3/Admin/syno.plexupdate-master
Running Ver: 3.0.2c
 Online Ver: 3.0.2
   Released: 2021-03-31 02:55:38-06:00 (126+ days old)
             * No new version found.

cat: '/AppData/Plex Media Server/Preferences.xml': No such file or directory
cat: '/AppData/Plex Media Server/Preferences.xml': No such file or directory
Synology: DS1821+ (x86_64), DSM 7.0-41890 Update 0
Plex Dir: /AppData/Plex Media Server
Plex Token:
Running Ver: 1.24.0.4897
Online Ver: 1.23.6.4881 (Public Channel)
Released: 2021-07-28 16:10:14-06:00 (6+ days old)
* No new version found.

@Nedlinin
Copy link
Author

Nedlinin commented Aug 5, 2021

@JD2005L : Have you tried the version here: #15

@JD2005L
Copy link

JD2005L commented Aug 5, 2021

@Nedlinin Yes that's the version that I've been running that at least works, it will update Plex, but I get the following weird output, here's the last output from a Plex update a few days ago:

SYNO.PLEX UPDATE SCRIPT v3.0.6

     Script: syno.plexupdate.sh v3.0.6
 Script Dir: /volume3/Admin/syno.plexupdate-master
Running Ver: 3.0.6
 Online Ver: 3.0.2
   Released: 2021-03-31 02:55:38-06:00 (126+ days old)
             * No new version found.

   Synology: DS1821+ (x86_64), DSM 7.0-41890 Update 0
   Plex Dir: /volume3/@apphome/PlexMediaServer/Plex Media Server
 Plex Token: zmWDR3yJw9yxfyqVWJij
Running Ver: 1.23.6.4881
 Online Ver: 1.24.0.4897 (Beta Channel)
   Released: 2021-08-02 10:50:50-06:00 (1+ days old)
             * Newer version found!

New Package: PlexMediaServer-1.24.0.4897-411e7667f-x86_64_DSM7.spk
Package Age: 1+ days old (0+ required for install)

INSTALLING NEW PACKAGE:

2021-08-04 04:00:10 URL:https://downloads.plex.tv/plex-media-server-new/1.24.0.4897-411e7667f/synology-dsm7/PlexMediaServer-1.24.0.4897-411e7667f-x86_64_DSM7.spk [115220480/115220480] -> "/volume3/Admin/syno.plexupdate-master/Archive/Packages/PlexMediaServer-1.24.0.4897-411e7667f-x86_64_DSM7.spk" [1]
{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

{"error":{"code":0},"results":[{"action":"upgrade","beta":false,"betaIncoming":false,"error":{"code":0},"finished":true,"installReboot":false,"installing":true,"language":"enu","last_stage":"postupgrade","package":"PlexMediaServer","packageName":"Plex Media Server","pid":27587,"scripts":[{"code":0,"message":"","type":"preupgrade"},{"code":0,"message":"","type":"preuninst"},{"code":0,"message":"","type":"postuninst"},{"code":0,"message":"","type":"preinst"},{"code":0,"message":"

Note: If Plex cannot access your media, verify user PlexMediaServer is granted permission in Control Panel.


\nSet access to your media share(s) by performing the following steps:

\n1. Open Control Panel and select Shared Folder
\n2. Select the share which contains your media and click Edit
\n3. Click the Permissions tab
\n4. Change the dropdown from Local Users to System internal user
\n5. Check the Read/Write checkbox for the PlexMediaServer user
\n6. Click Save to confirm the new permissions
\n7. Repeat steps 2-6 for each share you want Plex Media Server to access
\n","type":"postinst"},{"code":0,"message":"","type":"postupgrade"}],"spk":"/volume3/Admin/syno.plexupdate-master/Archive/Packages/PlexMediaServer-1.24.0.4897-411e7667f-x86_64_DSM7.spk","stage":"installed_and_stopped","status":"stop","success":true,"username":""}],"success":true}

{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

Update from: 1.23.6.4881
         to: 1.24.0.4897 succeeded!

NEW FEATURES:

  • (API) Language and country names are now returned in the client's language (#12815)
  • (Localization) Improved language code support for audio and subtitle streams (#12909)
  • (Scanner) Support for TV season directory names that contain a season title after the number (#12834)

FIXED FEATURES:

  • (Analysis) Bitrate analysis was sometimes incorrect when file contained image attachments (#12882)
  • (Collections) Manually ordered collections would fail to play (#12879)
  • (Collections) Missing hubs when an item is part of a manually ordered collection (#12862
  • (Extras) An exception throw in refreshing extra lists could cause the server to exit (#12890)
  • (HTTP) HTTP/2 requests could fail when passed malformed headers (#12876)
  • (Library) Scanning photo libraries could result in Exception warning log spam on certain platforms (#12941)
  • (Music) Aural fixations were broken for TIDAL subscribers w/o a full Plex Pass (#12812)
  • (Music) If genre preference is "Plex Music" don't read genre from tags (#12812)
  • (Music) When manually analyzing albums, clear loudness analysis (#12808)
  • (Playback) Pre-rolls wouldn't play unless cinema trailers were enabled (#12819)
  • (Transcode) Transcoding to AC3 could result in a lower bitrate than this codec needs to produce decent quality. (#9814)

@Nedlinin
Copy link
Author

Nedlinin commented Aug 5, 2021

@JD2005L : That is actually not an error just the standard output of the script. Notice each step lists "code":0 - this is a success in software land.

The printing of the changelog is just there for ease of use (in case you email the output of the script to yourself for instance).

@JD2005L
Copy link

JD2005L commented Aug 5, 2021

Ok interesting, those large blocks of unformatted output just looked like the script was encountering issues to me, but if you say that's normal then sounds good. Thanks for your help.

@trumpy81
Copy link

trumpy81 commented Aug 8, 2021

@JD2005L My apologies. I should have mentioned that my script updates are intended for the Plex packaging 2.0 Forum Preview version of Plex.

https://forums.plex.tv/t/dsm-7-packaging-2-0-forum-preview/732838

This package should be released to the public in the next week or so, fingers crossed, but if you wish to try it beforehand you may do so. The package is provided in the link above.

Just remember, you will NOT be able to update Plex until the package changes have been pushed to production. Monitor the Plex forum for announcement of that.

The errors are caused by the relocation of the Plex data folder, from the hidden @apphome/PlexMediaServer to the admin user accessible /volume1/PlexMediaServer.

Moving forward, /volume1/PlexMediaServer will be the default location of the Plex data folder on all Synology NAS running DSM 7.x

@ChuckPa
Copy link

ChuckPa commented Aug 9, 2021

If I may augment Trumpy,

I can come and post here when it's safe to release this.

The reason you must wait is because Packaging 2.0 is not backward compatible with the existing production.

The existing production (1.0) packages do not know anything about this new structure nor does it make any sense to retrofit it at this late date.

@michealespinola
Copy link
Owner

I'm back from vacation and am catching up on these conversations today. My notification are back on.

@JD2005L
Copy link

JD2005L commented Aug 9, 2021

@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
Copy link

trumpy81 commented Aug 9, 2021

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
Copy link

smosse commented Aug 10, 2021

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
Copy link

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
Copy link

trumpy81 commented Aug 30, 2021

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
Copy link

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
Copy link

trumpy81 commented Sep 21, 2021

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
Copy link

aerasya commented Sep 30, 2021

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

@ngthwi
Copy link

ngthwi commented Oct 21, 2021

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
Copy link

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
Copy link

ngthwi commented Oct 22, 2021

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

@ngthwi
Copy link

ngthwi commented Oct 28, 2021

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_machine_map[$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
Copy link

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
Copy link

cmatte commented Dec 26, 2021

@ferboiar
Copy link

ferboiar commented Jan 7, 2022

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
Copy link

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

@ferboiar
Copy link

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

@braxtone braxtone mentioned this issue Mar 2, 2022
@michealespinola
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion DSM7 Synology DSM 7
Projects
None yet
Development

No branches or pull requests