cowboy / synology-update-plex

Script to Auto Update Plex Media Server on Synology NAS
111 stars 21 forks source link

Task schedule report formatting #41

Closed steffen-klein closed 1 year ago

steffen-klein commented 2 years ago

Hey, I get the following message which seems to be not correctly formatted:

Task Scheduler has completed a scheduled task.

Task: synology-update-plex Start time: Thu, 16 Sep 2021 04:00:01 GMT Stop time: Thu, 16 Sep 2021 04:06:20 GMT Current status: 0 (Normal) Standard output/error: Checking for a Plex Media Server update...

[ Retrieving DSM version ] Found DSM version 7

[ Enabling Plex Pass releases ] Found Plex Token

[ Retrieving version data ] Available version: 1.24.3.5033-757abe6b4 Installed version: 1.24.2.5000-7000

New version available!

[ Finding release ] { "label": "Intel 64-bit", "build": "linux-x86_64", "distro": "synology-dsm7", "url": "https://downloads.plex.tv/plex-media-server-new/1.24.3.5033-757abe6b4/synology-dsm7/PlexMediaServer-1.24.3.5033-757abe6b4-x86_64_DSM7.spk", "checksum": "b6821b741d71c897aa328d89c6bb1759961ad7d9" }

[ Downloading release package ] 2021-09-16 04:05:59 URL:https://downloads.plex.tv/plex-media-server-new/1.24.3.5033-757abe6b4/synology-dsm7/PlexMediaServer-1.24.3.5033-757abe6b4-x86_64_DSM7.spk [115445760/115445760] -> "/tmp/plex.iH8cCM/PlexMediaServer-1.24.3.5033-757abe6b4-x86_64_DSM7.spk" [2]

[ Verifying checksum ] Checksum valid!

[ Installing package ] {"error":{"code":0},"results":[{"action":"upgrade","beta":false,"betaIncoming":false,"error":{"code":0},"finished":true,"installReboot":false,"installing":true,"language":"enu","last_stage":"started","package":"PlexMediaServer","packageName":"Plex Media Server","pid":18985,"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":"

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"},{"code":0,"message":"","type":"start"}],"spk":"/tmp/plex.iH8cCM/PlexMediaServer-1.24.3.5033-757abe6b4-x86_64_DSM7.spk","stage":"installed_and_started","status":"running","success":true,"username":""}],"success":true}

[ Restarting Plex Media Server ] {"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

[ Cleaning up ] Removing /tmp/plex.iH8cCM

Done!

oscaritoro commented 2 years ago

Looks weird because Plex got fancy in the messages they include within the returns but it's a successful update from what I can tell... the script just takes the exact returns provided and copies them into the output stream.

ngthwi commented 2 years ago

It's because of a debug line that should be removed at line 292:

echo "$release_json"

elisimpson commented 2 years ago

This is still an issue. Update happens but output is completely garbled. Did DSM7 change the synopkg command to output a large JSON string instead of just the success/fail message?

cowboy commented 1 year ago

Closed by #47

cowboy commented 1 year ago

This fix has been addressed in the latest release https://github.com/cowboy/synology-update-plex/releases