-
Notifications
You must be signed in to change notification settings - Fork 24
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
Comments
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 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 : 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
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)
My output there:
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. |
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! |
@michealespinola : Is the new script (v3) supposed to be supporting DSM7 already? Or is there no longer an intent to support it? |
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. |
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. |
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 |
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. 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. |
@ChuckPa : To my knowledge, it is only packages that are restricted. A script can still be run as root through say SSH.
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. |
@ChuckPa: Please and thank you. Your insight is always very appreciated! |
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. I'll be opening a forum thread when ready. (so you know what I'm up to) |
@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 ;) 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. |
Advisory. I am working with Synology on DSM 7 RC. If any of you receive 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?
|
@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. |
@cmatte : actually, installation did fail..
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. |
Thanks @Nedlinin perfect feedback for me to look into it, I will update the pull request with a possible fix in a few days. |
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. |
@michealespinola I've amended the pull to include the installation fix and bumped version to 3.0.4 in #15. |
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? |
There is an enforcement change in the INFO file. I've modified the INFO file and seem to be working with 41882. |
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, 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. |
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: |
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. |
So I'm getting the following error when I run V3.0.2c: Full script output:
cat: '/AppData/Plex Media Server/Preferences.xml': No such file or directory |
@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
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] {"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}
NEW FEATURES:
FIXED FEATURES:
|
@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). |
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. |
@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 |
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. |
I'm back from vacation and am catching up on these conversations today. My notification are back on. |
@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. |
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. |
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 ? |
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. |
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: |
Thanks @trumpy81 ,
Thanks |
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. |
A big thanks to you @trumpy81. |
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).
|
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 |
DS215j, DS216j, DS216play and DS218j all require the Neon package 😉 |
Here's a fix to the ARMv7/x86 (32 bits) arch issue: The following is to place right after this line ArchFamily=$(uname -m) (in #SCRAPE SYNOLOGY CPU ARCHITECTURE FAMILY)
(the mapping arch/model comes from cowboy/synology-update-plex) |
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:
You will also need to Edit the script and search for this line (line 46):
If you need the armv7neon package set Neon=1 The default is Neon=1. Note: The DS214Play & DS415Play will NOT be supported. |
|
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!! |
@ferboiar Yeah, I'd sponsor a working fork. |
The code has been updated to support DSM 7. After an unfortunate hiatus, I'm able to resume direct support of the script. |
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:
I suspect this is due to the Plex share no longer being used.
The text was updated successfully, but these errors were encountered: