Coder Social home page Coder Social logo

plexconnect's Introduction

PlexConnect

or: "Plex @ aTV - think different..."

This is a collection of files developed for the little project described in this Plex Forum thread.

For more information, like detailed Installation Guides, FAQs and similar, visit the Wiki.

How does it work?

The basic idea is, to...

  • re-use an already available app (like YouTube, Vimeo, ... in this case: Apple Trailers)
  • re-route the request to your local Plex Media Server
  • re-work the reply to fit into AppleTV's XML communication scheme
  • let iOS do the rest

Requirements

  • Python 2.6.x with minor issues: ElementTree doesn't support tag indices.
  • Python 2.7.x recommended.

Installation

# Installation
git clone https://github.com/sjlouw/PlexConnect.git
# Updating
cd PlexConnect
git pull
  • create HTTPS/SSL certificate
  • install certificate to assets/certificate/
  • install certificate on aTV

See the Wiki - Install Guide for additional documentation.

Usage

# Run with root privileges
sudo ./PlexConnect.py

Depending on your OS, you might only need PlexConnect.py. Or python PlexConnect.py or ...

  • set your AppleTV's DNS address to the computer running PlexConnect
  • run the Trailer App

See the Wiki - Advanced Settings for more details on configuration and advanced settings.

Installing the custom Plex icon from assets/icons/*.png :

  • First, if you use an Ethernet connection with your AppleTV, disconnect it from the other end (not your ATV end).
  • Next, connect the Ethernet cable to somewhere to go nowhere (e.g. a laptop or desktop that is powered on but won't allow the AppleTV to connect to the internet!). If you use a wireless connection you should also do this, or you can disconnect your router from the outside world (unplug your DSL cable or equivalent) but keep it powered on so it hands out IP addresses!
  • Next, reset your AppleTV to factory settings (Settings > General > Reset > Reset All Settings).
  • When your AppleTV has finished, follow through the setup, pressing MENU when you reach the wireless setup screen so you don't connect to the web. Afterwards you should only see the Computers and Settings options, since it hasn't connected to the web and doesn't have any additional options.
  • Now go to Settings > General > Network and set your DNS settings as per the PlexConnect installation guide. Once that's done reconnect your router / ethernet lead and let your AppleTV loose on the web! It should connect to Plex as well as modifying the Trailers icon to a Plex icon!

More detailed Information about the files

  • PlexConnect.py - Main script file, invoking the DNSServer and WebServer into seperate processes.
  • PlexAPI.py - Collection of Plex Media Server/MyPlex "connector functions": Auto discovery of running PMSs: Good Day Mate! // XML interface to local PMSs // MyPlex integration
  • DNSServer.py - This is a small DNS server (hence the name) that is now called whenever aTV needs to resolve an internet address. To hijack the trailer App, we will intercept and re-route all queries to trailers.apple.com. Every other query will be forwarded to the next, your original DNS.
  • WebServer.py - This script provides the directory content of "assets" to aTV. Additionally it will forward aTV's directory requests to PMS and provide a aTV compatible XML back. Every media (video, thumbnails...) is URL-wise connected to PMS, so aTV directly accesses the Plex database.
  • XMLConverter.py - This script contains the XML adaption from Plex Media Server's response to valid aTV XML files.
  • Settings.py - Basic settings collection. Creates Settings.cfg at first run - which may be modified externally.
  • ATVSettings.py - Handles the aTV settings like ViewModes or Transcoder options. Stores aTV settings in ATVSettings.cfg.
  • Localize.py - Holds a couple of utility functions for text translation purposes. Uses dictionaries from assets/locales/.
  • Subtitle.py - Subtitle parser functions for PlexConnect's own renderer, converts subs to JSON for easy transfer to aTV.
  • PILBackgrounds.py - Modify and cache fanart images for use by aTV.

plexconnect's People

Contributors

sjlouw avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.