pxgamer/plex-picker

A project to pick a film from your Plex library.

v1.2.2 2017-12-06 10:07 UTC

This package is auto-updated.

Last update: 2024-10-11 15:06:41 UTC


README

Latest Version on Packagist Software License Build Status Style CI Code Coverage Total Downloads

A project to pick a video from your Plex library.

Structure

src/
tests/
vendor/

Install

Via Composer

$ composer require pxgamer/plex-picker

Usage

use \pxgamer\PlexPicker\Picker;

// Create a new Picker class
$client = new Picker();

// Create the data object
$data = [
    'unwatched' => 1, // You can search by watched/unwatched videos
    'actor' => 1, // You can search by actor ID
    'duplicate' => 1, // You can check for duplicates
    'year' => 2017, // You can search by year
];

// In fact, you can use any of the filters.

// Initialise the base URL of your server
$client->_setBaseUrl('https://demo.plex.local:32400');

// Set your token (will soon have a login function to get a token)
$client->setToken('5KaVLQiL531414faD7PfZ3');

// Set the data (using an array)
$client->setData($data);

// Get the list of videos from the server
$client->_get();

// Select the video
$client->chooseVideo();

echo 'Chosen Film: '. $client->videoData['title'] . ' (' . $client->videoData['year'] . ')';

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email owzie123@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.