A következő címkéjű bejegyzések mutatása: smart-tv. Összes bejegyzés megjelenítése
A következő címkéjű bejegyzések mutatása: smart-tv. Összes bejegyzés megjelenítése

2015. október 1.

Plex Plugin Installer

So, since I found plex plugin manual installation painfully boring, I wrote a nautilus script to do the job for me.
Instead of copy-pasting, you can also download this script form github.

I wasted a couple hours finding out that  if I use "double quotes" instead of 'single quotes' when assigning the plugin folder path to the PLUGIN_FOLDER variable, then 1.) the path will break on spaces and won't work; 2.) if I surround the call with '"'-s (a double quote between two single quotes) or just another "-s the program will fail not finding the files/directories. This was the tricky part because if instead of running I echoed the lines, they looked perfectly okay, and if I copy-pasted them to the command line they would even run properly... only not within a script.

#!/bin/bash
# nautilus script
# install PLEX plugin on Ubuntu 12.04.

# run this script by right clicking on the directory you want to install
install_plugin () {
 # standard feature: install by copying folder
 # future enhancement: install from ZIP file

 PARAMETERS=( "$@" )               ## array containing all params passed to the script

 PLUGIN_FOLDER='/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/'

 # read folder paths into TO_BE_INSTALLED
 IFS=$'\n' read -d '' -r -a TO_BE_INSTALLED < <(printf '%s\n' $PARAMETERS); unset $IFS

 need_to_restart_server=false

 for package in "${TO_BE_INSTALLED[@]}"; do
  package_name="${package##*/}" # Strip longest match of substring (*/) from front of string

 # sanity check: is the path correct? it should be a directory and end with ".bundle".
  if  [[ -d "$package" ]]; then # if selected path IS a directory
   if [[ "${package_name##*.}" == "bundle" ]]; then
    installed_package=$PLUGIN_FOLDER$package_name
   # check if plugin already exists
    if [[ -d "$installed_package" ]]; then 
     # if yes, ask to delete it 
     echo -n "A package with the same name is already installed. Would you like to overwrite it? (yes/no): "; read overwrite 
     if [[ $overwrite == [Yy][Ee][Ss] || $overwrite == [Yy] ]]; then 
      sudo rm -R "$installed_package"
     else
      echo "You chose not to overwrite $package_name so it will not be processed."
      continue
     fi
    fi
   # install plugin
    #copy the downloaded plugin to the plex plug-in directory
    sudo cp -R "$package" "$PLUGIN_FOLDER"

    #change the permissions to be like the existing plug-ins 
    #(this is not needed in 14.04 anymore)
    sudo chmod ugoa+rx "$installed_package"

    #change the owner of the files to be like the existing plug-ins
    sudo chown -R plex:plex "$installed_package"

    need_to_restart_server=true

   else # if not "bundle"
    echo "Package name should end with '.bundle'. $package_name will not be processed."
    continue # process next package instead
   fi

  else # if not directory
   echo "Package should be a directory. $package_name will not be processed."
   continue # process next package instead
  fi

 done
# when finished with all packages, restart plex server.
if [[ $need_to_restart_server = true ]]; then 
 sudo service plexmediaserver stop
 sleep 5
 sudo service plexmediaserver start
 
 echo "Installation complete. Your new plug-in should show up now in PLEX."
fi
}

export -f install_plugin

gnome-terminal --execute bash -c 'install_plugin "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"; bash'

2015. január 3.

Plex Configuration for various reasons

Restart Plex Server:

~$ sudo service plexmediaserver stop
~$ sudo service plexmediaserver start

Install Plug-in manually:
Plug-in directory: /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/

To install a new plug-in:
the new plug-in's directory name should end with ".bundle" like the existing plug-in directories.
copy the downloaded plugin to the plex plug-in directory
~$ sudo cp -R /download_dir/new_plug-in_dir /plex_plugin_dir/
change the permissions to be like the existing plug-ins (this is not needed in 14.04 anymore)
~$ sudo chmod ugoa+rx /plex_plugin_dir/new_plug-in_dir
change the owner of the files to be like the existing plug-ins
~$ sudo chown -R plex:plex /plex_plugin_dir/new_plug-in_dir
restart plex server as written above.
the new plug-in should show up in plex.

Custom plug-in sources:


works fine for me.


To get AnimeToon working you need to update this file:
AnimeToon.bundle/Contents/Services/URL/AnimeToon/ServiceCode.pys

UPDATE: a fixed version of the plugin can be downloaded from here.

Add these lines to the end of the file:

###new stuff begins

elif each.find("videozoo") >= 0:
 page_data = HTML.ElementFromURL(each)
 string_data = HTML.StringFromElement(page_data)
 find_url = RE_PLAY44.search(string_data).group()
 url = String.Unquote(find_url, usePlus=False)
 Log(url)
 return [MediaObject(parts = [PartObject(key = url)])]

elif each.find("playbb") >= 0:
 page_data = HTML.ElementFromURL(each)
 string_data = HTML.StringFromElement(page_data)
 find_url = RE_PLAY44.search(string_data).group()
 url = String.Unquote(find_url, usePlus=False)
 Log(url)
 return [MediaObject(parts = [PartObject(key = url)])]

elif each.find("easyvideo") >= 0:
 page_data = HTML.ElementFromURL(each)
 string_data = HTML.StringFromElement(page_data)
 find_url = RE_VIDEO44.search(string_data).group()
 url = String.Unquote(find_url, usePlus=False)
 Log(url)
 return [MediaObject(parts = [PartObject(key = url)])]

elif each.find("playpanda") >= 0:
 page_data = HTML.ElementFromURL(each)
 string_data = HTML.StringFromElement(page_data)
 find_url = RE_PLAY44.search(string_data).group()
 url = String.Unquote(find_url, usePlus=False)
 Log(url)
 return [MediaObject(parts = [PartObject(key = url)])]

###new stuff over

2015. január 2.

Serviio Configuration for various reasons

Serviio promises features that require additional configuration and not work out of the box.

Online Resources
RSS feed reading requires the installation of serviio plugins, and that the feed be specifically readable for serviio.
Online streaming my desktop with VLC could work, but definitely not through wifi (it is too slow for that)

2014. december 23.

Experimenting with a Samsung UE32H6200 Smart LED TV

Useful links

Connecting to the TV
  • Using the HDMI port 
    • Connecting via HDMI Port (using the HDMI cable) 
    • Connecting with the HDMI (DVI) Port (using a DVI to HDMI cable)
  • Samsung Link (log in) connects content to the TV through cloud based software
  • Home Network (DLNA, UPnP) connects content to the TV through virtual network file server
  • Screen Mirroring for Samsung Mobile Devices
  • Wi-Fi Direct 
  • Samsung Smart View 2.0 for PC, for Samsung Mobile Devices, for iPhone to share the screen
DLNA connection from Ubuntu
Screen Casting with Wi-Fi Direct from Ubuntu
Read this summary first.
Read this how-to second.
Unfortunately HP Compaq TC4400 does not support Wi-Fi Direct.
I know this from the directions of the above how-to. I installed "iw" through synaptic and checked for "p2p" under "supported interface modes" in ~$ sudo iw list -- and there was none.