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

Script should detect need to switch to DSM 7.2.2 release without version change #54

Open
HolisticDeveloper opened this issue Oct 31, 2024 · 10 comments
Assignees
Labels
discussion DSM722 DSM 7.2.2 enhancement New feature or request

Comments

@HolisticDeveloper
Copy link

This is a follow up to #50. I just updated my DS920+ to 7.2.2 tonight, and Package Center tells me that the already installed version of Plex is not compatible (as expected). Unfortunately, syno.plexupdate won't install the compatible version because the installed ("running") version for DSM7 matches the latest version for DSM722.

    Running Ver: 1.41.1.9057
     Online Ver: 1.41.1.9057 (Public Channel for synology-dsm72)

I assume that if Plex were to release a new version, that the script would download the right version.

It would be great if it could figure out that the version installed isn't compatible and reinstall the correct package even though the version matches.

@HolisticDeveloper
Copy link
Author

I should mention, I was able to manually install the update after downloading it directly from Plex, so I'm not blocked.

@michealespinola michealespinola self-assigned this Oct 31, 2024
@michealespinola michealespinola added enhancement New feature or request discussion DSM722 DSM 7.2.2 labels Oct 31, 2024
@michealespinola
Copy link
Owner

I will take another look into this just-in-case (maybe fresh-eyes will show something new), but I previously attempted to deal with this and found it to be unreasonably resolvable - because the version numbers were exactly the same, and the error condition was caused by internal restrictions to how updates are allowed within the release package itself. This versioning and restriction-ing mishap between Synology and Plex versioning created a very odd and unique situation.

At the time, I couldn't find a methodology or any data that I could use to confidently determine that the installed version was not compatible with the DSM. To compound the issue, because you cannot reasonably roll-back to an earlier version of DSM, it makes testing and experimenting pretty much impossible.

@michealespinola
Copy link
Owner

I've been looking through what kind of info I can glean from various apps and files regarding versioning info, and the only thing I can find is a 'distribution.txt' file located in the /Resources folder of the PMS application directory. I'm otherwise not familiar with it or its existence through previous versions of Plex.

Its contents on my system is "synology-dsm72". This correlates to the distribution ID naming convention that Plex uses in their website API. Even though its written as "synology-dsm72", this refers to DSM 7.2.2 and higher. DSM 7.0-7.2 is referred to as "synology-dsm7" within Plex's internal distribution ID convention.

I might be able to use this (or the lack of its presence) to compare with the current DSM version and force an upgrade to the the corresponding 7.2.2, but this would be difficult if not impossible for me to thoroughly test and may introduce bugs.

@ondrovic
Copy link

ondrovic commented Nov 3, 2024

@michealespinola I am currently on the DSM 7.2.2 and would be happy to test as I was unaware that plex would get broken with the update 😢 let me know if this would help

on looking at the logs it looks like it is detecting correctly


SYNO.PLEX UPDATE SCRIPT v4.6.9 for DSM 7

         Script: syno.plexupdate.sh
     Script Dir: /volume1/homes/ondrovic
    Running Ver: 4.6.9
     Online Ver: 4.6.9 (attempts left 58/60)
       Released: 2024-09-04 05:32:20-04:00 (60+ days old)
                 * No new version found.

       Synology: DS1821+ (x86_64), DSM 7.2.2-72806 Update 0
       Plex Dir: /volume1/PlexMediaServer/AppData/Plex Media Server
    Running Ver: 1.41.1.9057
     Online Ver: 1.41.1.9057 (Public Channel for synology-dsm72)
       Released: 2024-09-27 14:35:52-04:00 (36+ days old)
                 * No new version found.

image

Installed
image

Online
image

I am not sure if it is or isn't detecting the right version, or is this one of those I need to uninstall the current version then run the script so it downloads the correct package?

As per here

So I uninstalled and reinstalled used the directions at the link above and everything seems to be working 🤷

logs just for good measure
syno.plexupdate.sh.zip

@HolisticDeveloper
Copy link
Author

@michealespinola I realize this could be a tricky one to address. If nothing else, I figured the discussion here could be useful even if a solution can't be implemented easily.

I wonder how Package Center determines that the installed package is incompatible? Could the same technique be used in the script? For example, if DSM >= 7.2.2 + package is incompatible + package is latest version.

@michealespinola
Copy link
Owner

@ondrovic, PMS breaking because of being a version incompatible with DSM 7.2.2 should have been a specific window of opportunity. Your version info looks good, and if PMS isn't failing to start (because of the DSM preventing it), then you should be past the issue.

Thank you very much for the logs. All points of reference help!

@michealespinola
Copy link
Owner

michealespinola commented Nov 3, 2024

@HolisticDeveloper, I totally appreciate reopening the discussion and furthering any brainstorming about it, as I would love to implement as much future-proofing as possible. From my perspective; its been very frustrating as both a user that personally encountered this issue the hard way, as well as the script developer trying to programmatically deal with it.

I had hoped that the issue was behind all of us once Plex was able to get more ahead of this with newer Public channel releases since the start of this debacle, but apparently this versioning limbo is still having its effect as it just recently effected you.

I haven't yet found an utility/app to allow me to programmatically check that versioning info in the package center.

@ondrovic
Copy link

ondrovic commented Nov 4, 2024

@ondrovic, PMS breaking because of being a version incompatible with DSM 7.2.2 should have been a specific window of opportunity. Your version info looks good, and if PMS isn't failing to start (because of the DSM preventing it), then you should be past the issue.

Thank you very much for the logs. All points of reference help!

Indeed my issue was directly related to an existing version and the fact that the update changes the directory structure hence the incompatibility, but you are correct at this point I am indeed past the issue and up and running again. Cheers

@michealespinola
Copy link
Owner

I've confirmed with Plex support staff my suspicion of the 'distribution.txt' file contents (re: this comment), and it appears suitable to use as a way to check if the currently installed Plex distribution type matches the currently installed DSM version.

If my thought process is sound, then I should be able to integrate this into the upgrade logic to force an upgrade to the correct version when otherwise limbo'd by this issue.

@ondrovic
Copy link

I've confirmed with Plex support staff my suspicion of the 'distribution.txt' file contents (re: this comment), and it appears suitable to use as a way to check if the currently installed Plex distribution type matches the currently installed DSM version.

If my thought process is sound, then I should be able to integrate this into the upgrade logic to force an upgrade to the correct version when otherwise limbo'd by this issue.

I trust your judgement, I think the worst thing that could happen would be the user having to manually install the latest version if something goes wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion DSM722 DSM 7.2.2 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants