Plex Media Server shorcut

Plex package allows users to manage and playback their media collections to local or remote desktop/mobile running Plex media client through Synology DiskStation
Forum rules
Please note the Disclaimer before modifying your Synology Product.

Plex Media Server shorcut

Postby Vulcan » Sun Apr 22, 2012 2:51 am

Hello,

I installed the new Plex Media Server 3rd party application on my DS712+ but was having a problem with the shortcut not working. When I clicked it, it just went back to the main DiskStation 4.0 home page. After some searching I found the fix.

The Plex Media Server shortcut points to: https://My Diskstation IP Address:5001/webman/3rdparty/plex/plex.cgi
(I use https for my connections, your shorcut might point to http)

Actual file path: /usr/syno/synoman/webman/3rdparty/plex/plex.cgi

I found that the second line of my plex.cgi file was different than the one show here:
http://forums2.plexapp.com/index.php/user/47932-joad/page__tab__posts

Mine:
#!/bin/sh
if [ 'ifconfig |grep -q bond0' ]

Linked version:
#!/bin/sh
if ifconfig |grep -q bond0

Once I edited the file in vi, removing the brackets and the quotes, the shortcut started working.
It should be noted that I am using the 2 network connections on the DS712+ as an aggregated link or "Bond", so this bit of code may not appear in the plex.cgi of users with only 1 network connection.

Hope this helps in case anyone else is having the same issue.

P.S. If any guru's out there can clarify what brackets and quotes are used for in cgi scripts (for commenting out code maybe?), I would appreciate it.
Vulcan
I'm New!
I'm New!
 
Posts: 3
Joined: Thu Apr 12, 2012 7:34 pm

Re: Plex Media Server shorcut

Postby zainag » Sun Dec 16, 2012 8:31 am

Thanks for your help - I had no idea why it changed but your fix worked!
zainag
I'm New!
I'm New!
 
Posts: 8
Joined: Sat Sep 11, 2010 7:50 pm

Re: Plex Media Server shorcut

Postby zforum69 » Thu Jan 17, 2013 8:19 am

Vulcan wrote:Hope this helps in case anyone else is having the same issue.


Thanks for that, I had the same issue using a bonded connection on a DSM 412+.

It seems the bug was reported on 3 January 2013 https://plexapp.lighthouseapp.com/proje ... dia-server but has not yet been allocated. I even downloaded the latest package straight from Plex which was version 0.9.7.11.386, while the latest one from the Package Center was version 0.9.7.9.375, and it still had the bug.

The file in: /usr/syno/synoman/webman/3rdparty/plex only exists when Plex is running. The file is actually located in: /var/packages/Plex Media Server/target/dsm_config/plex so you need to edit the one in there if Plex is not running.

One other thing, I am no fan of vi, so I normally edit a file using an editor in Windows and then copy it back. THIS DOES NOT WORK. If you do that it it is like the file does not even exist and you get a Sorry, the page you are looking for is not found. message. You HAVE to use vi, luckily the edits are not too hard.

Note as per the bug report you only need to remove the square brackets and can leave the single quotes behind.

Z
zforum69
Trainee
Trainee
 
Posts: 16
Joined: Tue Dec 25, 2012 3:22 am

Re: Plex Media Server shorcut

Postby zforum69 » Mon Jan 21, 2013 2:32 am

Vulcan wrote:P.S. If any guru's out there can clarify what brackets and quotes are used for in cgi scripts (for commenting out code maybe?), I would appreciate it.


I'm no guru but I think I've worked out what it all means and why there is a problem.

Basically the Synology uses the ash shell in busybox. ash does not use square brackets so it will cause an unexpected operator error, forcing it down the else path. If you have a bonded interface it will not work as the is for unbonded interfaces, while for unbonded interfaces it will work despite the bug because the else command happens to be the correct command.

With regard to the back quote "`", that is for command substitution, so whatever is enclosed in the back quotes to executed first before the other commands. In this case there is no point in having it as there is only one command. This is why the command will execute in exactly the same way whether or not it is enclosed in back quotes.

Z
zforum69
Trainee
Trainee
 
Posts: 16
Joined: Tue Dec 25, 2012 3:22 am

Re: Plex Media Server shorcut

Postby Bitstorm » Tue Apr 16, 2013 3:26 am

Just found this thread, had the same problem with my DS412+/DSM 4.2/Plex 0.9.7.9.375

Your fix worked and saved me headaches. Thanks alot!
Bitstorm
I'm New!
I'm New!
 
Posts: 3
Joined: Tue May 03, 2011 12:15 am


Return to Plex

Who is online

Users browsing this forum: No registered users and 0 guests