Difference between revisions of "Restricted plugins"

From WikiDLXTV
Jump to: navigation, search
(Initial page created)
(No difference)

Revision as of 07:51, 15 December 2010

Description

The restricted plugins are a set of UMSP plugins that are considered unsuitable for everyone (because of their adult content) and are not available as part of the regular plugin pack. You can follow these instructions to enable these plugins for your WDTV.

Currently, the restricted plugins offer access to these sites:

  • Tube8
  • Pornhub

Dependencies

  • UMSP media server must be on
config_tool -c UMSP='ON'
  • Apache must be on
config_tool -c APACHE='ON'

Configuration

The configuration steps consist of downloading the restricted plugins and enabling them in the UMSP media server.

  • Using a text editor (or file transfer tool/webend) create /conf/update-umsp-restricted.sh with this content:
#!/bin/sh
logger -t $0 'Obtaining restricted svn UMSP plugins...'
eval `grep SVNLOGIN= /conf/config`
if [ $SVNLOGIN != "" ]; then
  USER=`echo $SVNLOGIN | cut -d: -f1`
  PASS=`echo $SVNLOGIN | cut -d: -f2`
else
  USER="guest"
  PASS="guest"
fi
online.delayer 30
logger -t $0 "exporting all restricted umsp plugins from svn"
svn export --trust-server-cert --non-interactive --no-auth-cache --force --username $USER --password $PASS https://svn.wdlxtv.com/svn/UMSP/restricted-plugins/ /tmp/umsp-plugins
  • Make the file executable
# chmod a+x /conf/update-umsp-restricted.sh
  • Make the script execute when the system boots (call it in /conf/S99user-script). Edit /conf/S99user-script (or create and make executable) and add these lines:
#!/bin/sh
#enable restricted plugins
/bin/sh /conf/update-umsp-restricted.sh
  • You should now run the script and see if it works. Output should be similar to this:
# /bin/sh /conf/update-umsp-restricted.sh 
sh: : unknown operand
A    /tmp/umsp-plugins
A    /tmp/umsp-plugins/pornhub.php
A    /tmp/umsp-plugins/tube8.php
Exported revision 71.
  • You need to add the plugins to your UMSP configuration by editing (or creating if it doesn't exist) /conf/umsp.php and adding these lines:
<?php
global $myMediaItems;

//Pornhub
$myMediaItems[] = array(   
  'id'         => 'umsp://plugins/pornhub',   #Attribute of item
  'parentID'      => '0',                     #Attribute of item
  'restricted'   => '1',                     #Attribute of item
  'dc:creator'   => 'myCreator',
  'dc:title'      => 'Pornhub',
  'dc:date'      => '2009-12-30',
  'upnp:author'   => 'myAuthor',
  'upnp:artist'   => 'myArtist',
  'upnp:album'   => 'myAlbum',
  'upnp:genre'   => 'myGenre',
  'upnp:length'   => '2:10:20',
  'desc'         => 'myDesc',
  'upnp:class'   => 'object.container',
  'upnp:album_art'=> 'http://phimviet247.com/getvideo/images/pornhub_logo_h50.png',
  'duration'      => 'myDur3',            #Attribute of res
  'size'         => 'mySize3',            #Attribute of res in bytes
  'bitrate'      => 'myBitr',            #Attribute of res
  'protocolInfo'   => '*:*:*:*',      #Attribute of res
  'resolution'   => 'myReso',            #Attribute of res
  'colorDepth'   => 'myColor',            #Attribute of res
);
                                                           
//Tube8
$myMediaItems[] = array(   
  'id'         => 'umsp://plugins/tube8',   #Attribute of item
  'parentID'      => '0',                     #Attribute of item
  'restricted'   => '1',                     #Attribute of item
  'dc:creator'   => 'myCreator',
  'dc:title'      => 'Tube8',
  'dc:date'      => '2009-12-30',
  'upnp:author'   => 'myAuthor',
  'upnp:artist'   => 'myArtist',
  'upnp:album'   => 'myAlbum',
  'upnp:genre'   => 'myGenre',
  'upnp:length'   => '2:10:20',
  'desc'         => 'myDesc',
  'upnp:class'   => 'object.container',
  'upnp:album_art'=> 'http://fsb.zedge.net/content/5/2/8/2/1-3446061-5282-t.jpg',
  'duration'      => 'myDur3',            #Attribute of res
  'size'         => 'mySize3',            #Attribute of res in bytes
  'bitrate'      => 'myBitr',            #Attribute of res
  'protocolInfo'   => '*:*:*:*',      #Attribute of res
  'resolution'   => 'myReso',            #Attribute of res
  'colorDepth'   => 'myColor',            #Attribute of res
);
                                                           
?>
  • After saving /conf/umsp.php you should see the new entries when navigating in Videos -> Media Servers -> UMSP

Troubleshooting

  • If you are not getting the correct output after running /conf/update-umsp-restricted.sh make sure the script is correct and the lines don't overflow. Also, check for extra spaces at the end of rows and missing spaces before/after [] (bash is strict regarding whitespace close to square brackets)
  • If you can download the plugins, but they don't show up in UMSP, make sure you have correctly edited /conf/umsp.php. You can check for syntax errors with
# php5-cgi -l /conf/umsp.php
No syntax errors detected in /conf/umsp.php

Developer/Changelog

The plugins were developed by rezmus.