Author Topic: Plex Media Server  (Read 227617 times)

Offline Dimtar

  • Full Member
  • ***
  • Posts: 195
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #15 on: August 28, 2011, 04:00:58 AM »
I am still reading up about the new plugin system, will this auto update?

Also thanks to everyone who has worked on this project both old and new.
DAMONSTER - UNRAID 6-BETA9 - XEON 1270 v3 - 16GB SAMSUNG ECC - SUPERMICRO X10SL7-F - ANTEC 1200 - 4 X NORCO SS-500 - HIGHPOINT 2720 - HIGHPOINT 640L -  CORSAIR RM750 - 50TB

Offline spidi

  • Sr. Member
  • ****
  • Posts: 338
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #16 on: August 28, 2011, 05:15:31 AM »
@Dimtar
at the moment you have always to download the newest *.plg (*.xml or what ever it will be later) file.

This plugin file (plex-0.9.3.5-noarch-0.2ds.plg) always installs Plex 0.9.3.5.
But if I was't stoned for my rudeness until then, I will release an new version after Plex did.
 

Offline Dimtar

  • Full Member
  • ***
  • Posts: 195
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #17 on: August 28, 2011, 05:19:37 AM »
Cheers mate.

Just have to replace the *.plg fule and reboot, that's OK as that is way easier then today's current methods.
DAMONSTER - UNRAID 6-BETA9 - XEON 1270 v3 - 16GB SAMSUNG ECC - SUPERMICRO X10SL7-F - ANTEC 1200 - 4 X NORCO SS-500 - HIGHPOINT 2720 - HIGHPOINT 640L -  CORSAIR RM750 - 50TB

Offline spidi

  • Sr. Member
  • ****
  • Posts: 338
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #18 on: August 28, 2011, 01:01:18 PM »
Cheers mate.

Just have to replace the *.plg fule and reboot, that's OK as that is way easier then today's current methods.

only if you ran the application in /usr/local (in RAM).
at the moment this plugin don't remove an existing folder/file.
If your install directory is on cache drive. I can't update.
Maybe I implement this in the next release.

Offline Benni-chan

  • Sr. Member
  • ****
  • Posts: 471
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #19 on: August 30, 2011, 06:54:20 AM »
so, maybe the locale settings aren't neccessary anymore when the pms is started via sudo

actually i have to correct myself.
without the export locale settings in the plex.sh file i get errors when scanning files with non ascii characters.

Code: [Select]
Aug 30, 2011 15:36:59 [0xb594e6d0] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
  File "/mnt/usenet/apps/PlexLibrary/Plex Media Server/Plug-ins/Scanners.bundle/Contents/Resources/Series/Plex Series Scanner.py", line 44, in Scan
    VideoFiles.Scan(path, files, mediaList, subdirs)
  File "/mnt/usenet/apps/PlexLibrary/Plex Media Server/Plug-ins/Scanners.bundle/Contents/Resources/Common/VideoFiles.py", line 141, in Scan
    Filter.Scan(path, files, mediaList, subdirs, video_exts)
  File "/mnt/usenet/apps/PlexLibrary/Plex Media Server/Plug-ins/Scanners.bundle/Contents/Resources/Common/Filter.py", line 24, in Scan
    if os.path.exists(filename) == False or os.path.getsize(filename) == 0:
  File "/usr/local/plex/Resources/Python/lib/python2.7/genericpath.py", line 18, in exists
    os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 110: ordinal not in range(128)

with the two export lines in the plex.sh file, every file is scanned fine.
i think, "sudo -u nobody locale" returns the locale settings of the user root and these settings are used when starting plex.sh
but when the plex media scanner is started as user nobody, the nobody locale settings are used. because of this the two export lines in the plex.sh file are necessary

Offline spidi

  • Sr. Member
  • ****
  • Posts: 338
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #20 on: August 30, 2011, 09:16:07 AM »
Ok, I will include it in the next version. In the meantime it should not be a
problem for you to edit the file yourself. ;-)

Offline spidi

  • Sr. Member
  • ****
  • Posts: 338
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #21 on: September 02, 2011, 02:38:30 PM »
new version added
- some improvements
- check if plex is running, if not it starts it again.

Offline Benni-chan

  • Sr. Member
  • ****
  • Posts: 471
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #22 on: September 02, 2011, 03:12:54 PM »
new version added
- some improvements
- check if plex is running, if not it starts it again.

you've got a little bug in your php file

Code: [Select]
<?=mk_option($plex_cfg['RUNAS'], "plex", "nobody");?>should be
Code: [Select]
<?=mk_option($plex_cfg['RUNAS'], "nobody", "nobody");?>
otherwise the plugin want's to start plex as user "plex" when user "nobody" is selected.


edit:
also i think it's better to use "rm -f" in the cleanup script at the top of your plugin
using the -f parameter, any error message will be dismissed and not shown.

when first installing the plugin, none of these files exist, so the plugin installer will give some error messages...
« Last Edit: September 02, 2011, 03:16:17 PM by Benni-chan »

Offline spidi

  • Sr. Member
  • ****
  • Posts: 338
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #23 on: September 02, 2011, 03:42:16 PM »
thanks, its done.

I tried something with the user plex, and forgot to remove it.

Offline aiden

  • Hero Member
  • *****
  • Posts: 940
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #24 on: October 03, 2011, 09:21:17 PM »
I followed the directions in the first post, but I get "Plex has NOT started yes, Something is wrong!" when trying to enable it.  My settings are:

Install directory:    /usr/local/plex
Library directory:    /mnt/cache/.apps/plex
Temp directory:   /mnt/cache/.apps/plex/tmp
Run as user:   nobody

Ideas?
Vault (24TB): Intel Xeon E3-1270 | Supermicro X9SCM-F | 16GB Kingston KVR1333D3E9SK2 | (7) Hitachi 4TB Deskstar 5K4000 | Kingston DataTraveler Mini Slim 4GB
Grid (12TB): HP Proliant N40L Microserver | (5) Hitachi 3TB Deskstar 5K3000
X7SPA-HF: Discussion Thread | Fan Speed Script

Offline spidi

  • Sr. Member
  • ****
  • Posts: 338
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #25 on: October 03, 2011, 11:41:59 PM »
@aiden

is this "/mnt/cache/.apps/plex" an existing path? if yes are the rights set to "nobody"?

Online prostuff1

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6060
  • Greenleaf Technology
    • Greenleaf Technology
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #26 on: October 04, 2011, 05:32:56 AM »
@aiden

is this "/mnt/cache/.apps/plex" an existing path? if yes are the rights set to "nobody"?
Even if it does exist you should be chown'ing the directory for him via the plugin.

My SAB, Sickbeard, and Coucpotato unMenu packages do just that if the user is installing them under a 5.0 system.
Like us on Facebook | Follow me on Twitter
Looking for a prebuilt server? Greenleaf Technology
Building it yourself? Greenleaf Prototype Builds
Troubleshooting | Wiki

Offline aiden

  • Hero Member
  • *****
  • Posts: 940
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #27 on: October 04, 2011, 06:40:00 AM »
@aiden

is this "/mnt/cache/.apps/plex" an existing path? if yes are the rights set to "nobody"?
Even if it does exist you should be chown'ing the directory for him via the plugin.

My SAB, Sickbeard, and Coucpotato unMenu packages do just that if the user is installing them under a 5.0 system.

I didn't even think about folder permissions.  It just wasn't ever a problem in 4.7 so I don't have the habit of checking that yet.  I'm sure that's all it is.
Vault (24TB): Intel Xeon E3-1270 | Supermicro X9SCM-F | 16GB Kingston KVR1333D3E9SK2 | (7) Hitachi 4TB Deskstar 5K4000 | Kingston DataTraveler Mini Slim 4GB
Grid (12TB): HP Proliant N40L Microserver | (5) Hitachi 3TB Deskstar 5K3000
X7SPA-HF: Discussion Thread | Fan Speed Script

Offline aiden

  • Hero Member
  • *****
  • Posts: 940
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #28 on: October 04, 2011, 04:17:26 PM »
@aiden

is this "/mnt/cache/.apps/plex" an existing path? if yes are the rights set to "nobody"?

I tried "chown nobody /mnt/cache/.apps/plex" but still get the same error.  And yes, the path exists.  It would be great if there was some logging I could check to see what is going on.
« Last Edit: October 04, 2011, 04:21:47 PM by aiden »
Vault (24TB): Intel Xeon E3-1270 | Supermicro X9SCM-F | 16GB Kingston KVR1333D3E9SK2 | (7) Hitachi 4TB Deskstar 5K4000 | Kingston DataTraveler Mini Slim 4GB
Grid (12TB): HP Proliant N40L Microserver | (5) Hitachi 3TB Deskstar 5K3000
X7SPA-HF: Discussion Thread | Fan Speed Script

Online prostuff1

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6060
  • Greenleaf Technology
    • Greenleaf Technology
Re: Plex Media Server Plugin 0.2 for unRAID 5b11+
« Reply #29 on: October 04, 2011, 08:13:18 PM »
@aiden

is this "/mnt/cache/.apps/plex" an existing path? if yes are the rights set to "nobody"?

I tried "chown nobody /mnt/cache/.apps/plex" but still get the same error.  And yes, the path exists.  It would be great if there was some logging I could check to see what is going on.

try
Code: [Select]
chown nobody:users /mnt/cache/.apps/plex
Like us on Facebook | Follow me on Twitter
Looking for a prebuilt server? Greenleaf Technology
Building it yourself? Greenleaf Prototype Builds
Troubleshooting | Wiki