Add translation, update player buffer, update picture size, update home to show last added, update install script

pull/9/head
Chewbaka 4 years ago
parent c83d559540
commit 716ad1deca

@ -1,63 +1,64 @@
<?php
use Fuel\Core\Controller_Template;
use Fuel\Core\Response;
use Fuel\Core\Session;
use Fuel\Core\View;
class Controller_Admin extends Controller_Template
{
public $template = 'admin/body';
public function before()
{
parent::before();
$user = Session::get('user');
if(!$user)
Response::redirect('/login');
if(!$user->admin)
Response::redirect('/home');
Lang::load('menu');
Lang::load('action');
$this->template->user = Session::get('user');
$this->template->js_bottom = ['plex_alert.js'];
}
public function action_index()
{
$body = View::forge('admin/index');
$this->template->body = $body;
}
public function action_servers()
{
$this->template->js_bottom = ['plex_alert.js', 'server_refresh.js'];
$body = View::forge('admin/servers');
$servers = Model_Server::find_all();
$body->set('servers', $servers);
$this->template->body = $body;
}
public function action_users()
{
$this->template->js_bottom = ['plex_alert.js'];
$body = View::forge('admin/users');
$users = Model_User::find_all();
$body->set('users', $users);
$this->template->body = $body;
}
}
<?php
use Fuel\Core\Controller_Template;
use Fuel\Core\Lang;
use Fuel\Core\Response;
use Fuel\Core\Session;
use Fuel\Core\View;
class Controller_Admin extends Controller_Template
{
public $template = 'admin/body';
public function before()
{
parent::before();
$user = Session::get('user');
if(!$user)
Response::redirect('/login');
if(!$user->admin)
Response::redirect('/home');
Lang::load('menu');
Lang::load('action');
$this->template->user = Session::get('user');
$this->template->js_bottom = ['plex_alert.js'];
}
public function action_index()
{
$body = View::forge('admin/index');
$this->template->body = $body;
}
public function action_servers()
{
$this->template->js_bottom = ['plex_alert.js', 'server_refresh.js'];
$body = View::forge('admin/servers');
$servers = Model_Server::find_all();
$body->set('servers', $servers);
$this->template->body = $body;
}
public function action_users()
{
$this->template->js_bottom = ['plex_alert.js'];
$body = View::forge('admin/users');
$users = Model_User::find_all();
$body->set('users', $users);
$this->template->body = $body;
}
}

@ -1,5 +1,6 @@
<?php
use Fuel\Core\Debug;
use Fuel\Core\Response;
use Fuel\Core\FuelException;
@ -65,31 +66,35 @@ class Controller_Cover extends Controller_Home
public function get_season()
{
$season_id = Input::get('season_id');
try {
$season_id = Input::get('season_id');
if(!$season_id)
throw new FuelException();
if (!$season_id)
throw new FuelException();
$width = Input::get('width');
$height = Input::get('height');
$width = Input::get('width');
$height = Input::get('height');
$thumb = Input::get('thumb') ?: null;
$thumb = Input::get('thumb') ?: null;
$season = Model_Season::find_by_pk($season_id);
$season = Model_Season::find_by_pk($season_id);
if(!$season)
throw new FuelException();
if (!$season)
throw new FuelException();
if(!$thumb)
$images = $season->getCover($width, $height);
else
$images = $season->getThumb($width, $height);
if (!$thumb)
$images = $season->getCover($width, $height);
else
$images = $season->getThumb($width, $height);
$response = new Response();
$response->set_header('Content-Type', 'image/jpeg');
$response->set_header('Content-Length',strlen($images));
$response->body($images);
$response = new Response();
$response->set_header('Content-Type', 'image/jpeg');
$response->set_header('Content-Length', strlen($images));
$response->body($images);
return $response;
return $response;
} catch (Exception $e) {
Debug::dump($e);die();
}
}
}

@ -1,6 +1,7 @@
<?php
use Fuel\Core\Controller_Template;
use Fuel\Core\Debug;
use Fuel\Core\Lang;
use Fuel\Core\Response;
use Fuel\Core\Session;
@ -17,7 +18,7 @@ class Controller_Home extends Controller_Template
$user = Session::get('user');
$sessionServer = Session::get('server');
if(is_null($user))
if(null === $user)
Response::redirect('/login');
$server = $sessionServer ? Model_Server::find_by_pk($sessionServer->id) : (Model_Server::find_one_by('user_id', $user->id) ?: Model_Server::find_by([
@ -58,10 +59,10 @@ class Controller_Home extends Controller_Template
$server_id = $this->param('server_id');
if($server_id !== NULL) {
if ($server_id !== NULL) {
$server = Model_Server::find_by_pk($server_id);
if($server)
if ($server)
$this->template->MenuServer = $server;
}
@ -70,9 +71,9 @@ class Controller_Home extends Controller_Template
$this->template->MenuLibraries = $this->template->MenuServer->getLibraries();
$episodes = Model_Movie::getThirtyLastedTvShows($this->template->MenuServer);
$episodes = $this->template->MenuServer->getThirtyLastedTvShows();
$movies = Model_Movie::getThirtyLastedMovies($this->template->MenuServer);
$movies = $this->template->MenuServer->getThirtyLastedMovies($this->template->MenuServer);
$body->set('episodes', $episodes);
$body->set('movies', $movies);

@ -1,7 +1,9 @@
<?php
use Fuel\Core\Controller;
use Fuel\Core\Response;
use Fuel\Core\Session;
class Controller_Index extends Controller
{
public function before()

@ -306,11 +306,11 @@ class Controller_Rest_Install extends Controller_Rest
'user_watching',
array(
'id' => array('constraint' => 36, 'type' => 'varchar'),
'file_id' => array('constraint' => 11, 'type' => 'int'),
'user_id' => array('constraint' => 36, 'type' => 'varchar'),
'user_id' => array('constraint' => 11, 'type' => 'int'),
'movie_id' => array('constraint' => 36, 'type' => 'varchar'),
'watching_time' => array('constraint' => 11, 'type' => 'int'),
'ended' => array('constraint' => 1, 'type' => 'int', 'default' => 0),
'disable' => array('constraint' => 1, 'type' => 'int', 'default' => 0)
'ended_time' => array('constraint' => 11, 'type' => 'int', 'default' => 0),
'isFinish' => array('constraint' => 1, 'type' => 'int', 'default' => 0)
),
array('id'), false, 'InnoDB', 'utf8_unicode_ci'
);
@ -318,7 +318,7 @@ class Controller_Rest_Install extends Controller_Rest
$logs .= 'Creation table user settings'."\r\n";
/**
* CREATE TABLE USER'S WATCHING
* CREATE TABLE USER'S SETTINGS
*/
DBUtil::create_table(
'user_settings',
@ -439,6 +439,26 @@ class Controller_Rest_Install extends Controller_Rest
'on_update' => 'NO ACTION',
'on_delete' => 'NO ACTION',
));
DBUtil::add_foreign_key('user_watching', array(
'constraint' => 'constraintMovieWatching',
'key' => 'movie_id',
'reference' => array(
'table' => 'movie',
'column' => 'id',
),
'on_update' => 'NO ACTION',
'on_delete' => 'NO ACTION',
));
DBUtil::add_foreign_key('user_setting', array(
'constraint' => 'constraintUserSetting',
'key' => 'user_id',
'reference' => array(
'table' => 'user',
'column' => 'id',
),
'on_update' => 'NO ACTION',
'on_delete' => 'NO ACTION',
));
DBUtil::add_foreign_key('library', array(
'constraint' => 'constraintServerLibrary',
'key' => 'server_id',
@ -485,7 +505,7 @@ class Controller_Rest_Install extends Controller_Rest
$logs .= 'All Tables and Foreign Key successfully!'."\r\n";
return $this->response(array('error' => false, 'message' => $logs));
return $this->response(['error' => false, 'message' => $logs]);
} catch (FuelException $e) {
try {
DBUtil::drop_table('user_watching');

@ -11,8 +11,8 @@ class Controller_Rest_Library extends Controller_Rest
try {
$library_id = Input::post('library_id');
$right_name = Input::post('right_name');
$checked = Input::post('checked');
$parameter = Input::post('parameter');
$checked = Input::post('checked');
$parameter = Input::post('parameter');
if ($library_id === null || $right_name === null || $checked === null)
throw new FuelException('Missing parameters');

@ -1,6 +1,8 @@
<?php
use Fuel\Core\Controller_Rest;
use Fuel\Core\Input;
use Fuel\Core\Session;
use Fuel\Core\View;
use Fuel\Core\FuelException;

@ -0,0 +1,37 @@
<?php
use Fuel\Core\Controller_Rest;
use Fuel\Core\Input;
use Fuel\Core\Session;
use Fuel\Core\View;
use Fuel\Core\FuelException;
class Controller_Rest_Player extends Controller_Rest
{
public function put_movie()
{
try {
$movie_id = Input::put('movie_id');
$watching_time = Input::put('watching_time');
$ended_time = Input::put('ended_time');
$user = Session::get('user');
if (!$movie_id)
throw new FuelException('No movie id');
$movie = Model_Movie::find_by_pk($movie_id);
if (!$movie)
throw new FuelException('No movie found');
$user_watching = Model_User_Watching::find_one_by([
['movie_id', '=', $movie_id],
['movie_id', '=', $user->id]
]) ?: new Model_User_Watching();
return $this->response(['error' => false, 'message' => 'OK!'], 200);
} catch (Exception $exception) {
return $this->response($exception->getMessage(), 500);
}
}
}

@ -19,11 +19,11 @@ class Controller_Rest_Settings extends Controller_Rest
public function post_server()
{
try {
$server_id = Input::post('server_id');
$url = Input::post('url');
$port = Input::post('port');
$token = Input::post('token');
$https = Input::post('https') === 'true' ? true : false;
$server_id = Input::post('server_id');
$url = Input::post('url');
$port = Input::post('port');
$token = Input::post('token');
$https = Input::post('https') === 'true' ? true : false;
//@TODO CHECK AND REMOVE HTTP AND HTTPS

@ -65,12 +65,12 @@ class Controller_Settings extends Controller_Template
$default_settings = Config::load('user_settings');
$settings = Model_Settings::find_one_by('user_id', Session::get('user')->id);
$settings = Model_Setting::find_one_by('user_id', Session::get('user')->id);
$is_submit = Input::post('submit');
if(isset($is_submit)) {
$settings = !empty($settings) ? $settings : new Model_Settings();
$settings = !empty($settings) ? $settings : new Model_Setting();
$settings->set([
'user_id' => $this->_user->id,
'language' => Input::post('language'),

@ -1,5 +1,6 @@
<?php
use Fuel\Core\Lang;
use Fuel\Core\Session;
use Fuel\Core\View;
@ -22,6 +23,8 @@ class Controller_Settings_Libraries extends Controller_Settings
{
$this->template->js_bottom = ['plex_alert.js'];
Lang::load('permissions');
$body = View::forge('settings/libraries/permissions');
$library_id = $this->param('library_id');

@ -1,14 +1,11 @@
<?php
use Fuel\Core\Config;
use Fuel\Core\DB;
use Fuel\Core\Format;
use Fuel\Core\Request;
use Fuel\Core\Cache;
use Fuel\Core\CacheNotFoundException;
use Fuel\Core\Database_Query_Builder_Select;
use Fuel\Core\FuelException;
use Fuel\Core\RequestStatusException;
class Model_Movie extends Model_Overwrite
{
@ -467,55 +464,6 @@ class Model_Movie extends Model_Overwrite
return $movies_id_array;
}
public static function getThirtyLastedTvShows($server)
{
return self::find(function ($query) use ($server) {
/** @var Database_Query_Builder_Select $query */
return $query
->select('movie.*', DB::expr('COUNT(' . DB::table_prefix('movie') . '.type) AS count'))
->join('season', 'LEFT')
->on('movie.season_id', '=', 'season.id')
->join('tvshow', 'LEFT')
->on('season.tv_show_id', '=', 'tvshow.id')
->join('library', 'LEFT')
->on('tvshow.library_id', '=', 'library.id')
->join('server', 'LEFT')
->on('library.server_id', '=', 'server.id')
->where('server.id', $server->id)
->and_where('server.online', 1)
->and_where('server.disable', 0)
->and_where('library.disable', 0)
->and_where('tvshow.disable', 0)
->and_where('season.disable', 0)
->and_where('movie.disable', 0)
->and_where('movie.type', 'episode')
->order_by('movie.addedAt', 'DESC')
->order_by(DB::expr('MAX(' . DB::table_prefix('movie') .'.addedAt)'), 'DESC ')//'movie.addedAt', 'DESC')
->group_by('movie.season_id')
->limit(30)
;
});
}
public static function getThirtyLastedMovies($server)
{
return self::find(function ($query) use ($server) {
/** @var Database_Query_Builder_Select $query */
return $query
->select('movie.*')
->join('library', 'LEFT')
->on('movie.library_id', '=', 'library.id')
->join('server', 'LEFT')
->on('library.server_id', '=', 'server.id')
->where('server.id', $server->id)
->and_where('movie.disable', 0)
->and_where('movie.type', 'movie')
->order_by('movie.addedAt', 'DESC')
->limit(30)
;
});
}
public static function getList()
{
return self::find(function ($query) {

@ -1,8 +1,11 @@
<?php
use Fuel\Core\Database_Query_Builder_Select;
use Fuel\Core\DB;
use Fuel\Core\Debug;
use Fuel\Core\Request;
use Fuel\Core\Format;
use Fuel\Core\Response;
class Model_Server extends Model_Overwrite
{
@ -115,4 +118,119 @@ class Model_Server extends Model_Overwrite
return $libraries;
}
public function getThirtyLastedTvShows()
{
try {
$curl = Request::forge(($this->https === '1' ? 'https' : 'http').'://' . $this->url . ($this->port ? ':' . $this->port : '') . '/hubs/home/recentlyAdded?type=2&X-Plex-Token=' . $this->token, 'curl');
if($this->https) {
$curl->set_options([
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false
]);
}
$curl->set_header('Accept', 'application/json');
$curl->execute();
$body = json_decode($curl->response()->body);
$datas = $body->MediaContainer->Metadata;
$datas = array_slice($datas, 0,50);
$tvshows = [];
foreach ($datas as $tvshow) {
if($tvshow->type === 'season') {
$tvshows[] = Model_Season::find_one_by('plex_key', $tvshow->ratingKey) ?: new Model_Season();
} else if($tvshow->type === 'episode') {
$tvshows[] = Model_Movie::find_one_by('plex_key', $tvshow->key) ?: new Model_Movie();
}
}
return $tvshows;
}catch (Exception $exception){
Debug::dump($exception);
}
//return self::find(function ($query) use ($server) {
/** @var Database_Query_Builder_Select $query */
/*return $query
->select('movie.*', DB::expr('COUNT(' . DB::table_prefix('movie') . '.type) AS count'))
->join('season', 'LEFT')
->on('movie.season_id', '=', 'season.id')
->join('tvshow', 'LEFT')
->on('season.tv_show_id', '=', 'tvshow.id')
->join('library', 'LEFT')
->on('tvshow.library_id', '=', 'library.id')
->join('server', 'LEFT')
->on('library.server_id', '=', 'server.id')
->where('server.id', $server->id)
->and_where('server.online', 1)
->and_where('server.disable', 0)
->and_where('library.disable', 0)
->and_where('tvshow.disable', 0)
->and_where('season.disable', 0)
->and_where('movie.disable', 0)
->and_where('movie.type', 'episode')
->order_by('movie.addedAt', 'DESC')
->order_by(DB::expr('MAX(' . DB::table_prefix('movie') .'.addedAt)'), 'DESC ')//'movie.addedAt', 'DESC')
->group_by('movie.season_id')
->limit(30)
;
});*/
}
public function getThirtyLastedMovies()
{
try {
$curl = Request::forge(($this->https === '1' ? 'https' : 'http').'://' . $this->url . ($this->port ? ':' . $this->port : '') . '/hubs/home/recentlyAdded?type=1&X-Plex-Token=' . $this->token, 'curl');
if($this->https) {
$curl->set_options([
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false
]);
}
$curl->set_header('Accept', 'application/json');
$curl->execute();
$body = json_decode($curl->response()->body);
$datas = $body->MediaContainer->Metadata;
$datas = array_slice($datas, 0,50);
$movies = [];
foreach ($datas as $movie) {
$movies[] = Model_Movie::find_one_by('plex_key', $movie->key) ?: new Model_Movie();
}
return $movies;
}catch (Exception $exception){
Debug::dump($exception);
}
//return Model_Movie::find(function ($query) use ($server) {
/** @var Database_Query_Builder_Select $query */
/*return $query
->select('movie.*')
->join('library', 'LEFT')
->on('movie.library_id', '=', 'library.id')
->join('server', 'LEFT')
->on('library.server_id', '=', 'server.id')
->where('server.id', $server->id)
->and_where('movie.disable', 0)
->and_where('movie.type', 'movie')
->order_by('movie.addedAt', 'DESC')
->limit(30)
;
});*/
}
}

@ -0,0 +1,19 @@
<?php
class Model_Setting extends Model_Overwrite
{
protected static $_table_name = 'user_setting';
protected static $_primary_key = 'id';
protected static $_rules = array(
'user_id' => 'required',
);
protected static $_properties = array(
'id',
'user_id',
'language',
'trailer_type',
'trailer',
'subtitle',
'maxdownloadspeed',
);
}

@ -0,0 +1,18 @@
<?php
class Model_User_Watching extends Model_Overwrite
{
protected static $_table_name = 'user_watching';
protected static $_primary_key = 'id';
protected static $_properties = array(
'id',
'user_id',
'movie_id',
'watching_time',
'ended_time',
'isFinish'
);
}

@ -1,7 +1,7 @@
<?php
return array(
'_root_' => 'index', // The default route
'_404_' => 'welcome/404', // The main 404 route
'_404_' => 'error/404', // The main 404 route
'home(/:server_id)?'=> 'home/index',
'movie/list' => 'movie/list',

@ -0,0 +1,14 @@
<?php return [
'RIGHT_WATCH' => 'Allow Watch',
'RIGHT_WATCH_DESCRIPTION' => 'Allow use to watch movie/tv show.',
'RIGHT_MAX_WATCH' => 'Max Play in 24H',
'RIGHT_MAX_WATCH_DESCRIPTION' => 'Maximum number to play movie/tv show in 24H.',
'RIGHT_MAX_QUALITY' => 'Stream Quality',
'RIGHT_MAX_QUALITY_DESCRIPTION' => 'The maximum quality to play a move/tv show.',
'RIGHT_MAX_CONCURRENT_STREAM' => 'Concurrent stream ',
'RIGHT_MAX_CONCURRENT_STREAM_DESCRIPTION' => 'Number of concurrent stream allowed.',
'RIGHT_DOWNLOAD' => 'Allow Download',
'RIGHT_DOWNLOAD_DESCRIPTION' => 'Give the permission at user to download movie/tv show.',
'RIGHT_MAX_DOWNLOAD' => 'Max Download',
'RIGHT_MAX_DOWNLOAD_DESCRIPTION' => 'The maximum number of download allow to a use in 24H.',
];

@ -49,23 +49,26 @@
<div class="MetadataPosterCardFace-face--dz_D MetadataPosterCardFace-poster-L2P6r MetadataPosterCardFace-faceFront-1bxHG ">
<i class="plex-icon-shows-560 MetadataPosterCardIcon-placeholderIcon-2P76z" aria-hidden="true" style="font-size: 32px; line-height: 191px;"></i>
<div class="PosterCardImg-imageContainer-1Ar4M"
data-movie-id="<?php echo $episode->id; ?>">
data-<?php echo ($episode instanceof Model_Movie) ? 'movie' : 'season'; ?>-id="<?php echo $episode->id; ?>">
<div style="background-image: url(); background-size: cover; background-position: center center; background-repeat: no-repeat; width: 100%; height: 100%; position: absolute; z-index: 2;"
class=""></div>
</div>
<div class=" MetadataPosterCardOverlay-overlay-1uMpL ">
<div class="MetadataPosterCardOverlay-background-2EwyB"></div>
<div class="MetadataPosterCardOverlay-unwatchedTagContainer-1lcEn">
<div class="MetadataPosterCardOverlay-unwatchedBadge-Qn1fv MetadataPosterCardOverlay-badge-1FU-p"><?php echo $episode->count > 1 ? $episode->count : ''; ?></div>
<?php if ($episode instanceof Model_Season) : ?>
<div class="MetadataPosterCardOverlay-unwatchedBadge-Qn1fv MetadataPosterCardOverlay-badge-1FU-p"><?php echo $episode->leafCount; ?>
</div>
<?php endif; ?>
</div>
<?php if ($episode->count > 1) : ?>
<a href="/season/<?php echo $episode->getSeason()->id; ?>"
<?php if ($episode instanceof Model_Season) : ?>
<a href="/season/<?php echo $episode->id; ?>"
<?php else: ?>
<a href="/episode/<?php echo $episode->id; ?>"
<?php endif; ?>
<a href="/episode/<?php echo $episode->id; ?>"
<?php endif; ?>
role="link"
class="MetadataPosterCardOverlay-link-1Swhl Link-link-2XYrU Link-default-32xSO">
<button data-id="<?php echo $episode->count <= 1 ? $episode->id : ''; ?>"
<button data-id="<?php echo ($episode instanceof Model_Movie) ? $episode->id : ''; ?>"
tabindex="-1"
role="button"
class="MetadataPosterCardOverlay-playButton-1fjhk PlayButton-playButton-3WX8X MetadataPosterCardOverlay-button-M43H- Link-link-2XYrU Link-default-32xSO"
@ -86,7 +89,7 @@
class=" MetadataPosterTitle-title-3tU5F Link-link-2XYrU Link-default-32xSO">
<?php echo $episode->getTvShow()->title; ?>
</a>
<?php if (1 == $episode->count) : ?>
<?php if ($episode instanceof Model_Movie) : ?>
<a title="<?php echo $episode->title; ?>"
href="/episode/<?php echo $episode->id; ?>"
role="link"
@ -95,14 +98,14 @@
</a>
<?php endif; ?>
<span class=" MetadataPosterTitle-title-3tU5F MetadataPosterTitle-isSecondary-2VUxY ">
<a title="<?php echo $episode->getSeason()->title; ?>"
href="/season/<?php echo $episode->getSeason()->id; ?>"
<a title="<?php echo ($episode instanceof Model_Movie) ? $episode->getSeason()->title : $episode->title; ?>"
href="/season/<?php echo ($episode instanceof Model_Movie) ? $episode->getSeason()->id : $episode->id; ?>"
role="link"
class=" Link-link-2XYrU Link-default-32xSO">
<?php echo 1 == $episode->count ? 'S' : __('season'); ?>
<?php echo $episode->getSeason()->number; ?>
<?php echo ($episode instanceof Model_Movie) ? 'S' : __('season'); ?>
<?php echo ($episode instanceof Model_Movie) ? $episode->getSeason()->number : $episode->number; ?>
</a>
<?php if (1 == $episode->count) : ?>
<?php if ($episode instanceof Model_Movie) : ?>
<span class="DashSeparator-separator-2a3yn">·</span>
<a title="<?php echo $episode->title; ?>"
href="/episode/<?php echo $episode->id; ?>"
@ -235,9 +238,12 @@
});
});
/** LOADING PICTURE **/
$('.PosterCardImg-imageContainer-1Ar4M[data-movie-id]').each(function (index, element) {
var movie_id = $(element).data('movie-id');
$('[data-movie-id="' + movie_id + '"] > div').css('background-image', 'url("/cover/movie?movie_id=' + movie_id + '&width=' + 158 + '&height=' + 233 + '")');
$('.PosterCardImg-imageContainer-1Ar4M[data-movie-id], .PosterCardImg-imageContainer-1Ar4M[data-season-id]').each(function (index, element) {
let movie_id = $(element).data('movie-id');
movie_id ? $('[data-movie-id="' + movie_id + '"] > div').css('background-image', 'url("/cover/movie?movie_id=' + movie_id + '&width=' + 175 + '&height=' + 263 + '")') : null;
let season_id = $(element).data('season-id');
season_id ? $('[data-season-id="' + season_id + '"] > div').css('background-image', 'url("/cover/season?season_id='+ season_id +'&width='+ 175 +'&height='+ 263 +'")') : null;
});
/** SCROLL LIST TV SHOWS AND MOVIES **/
$('.HubCell-hubActions-28w1- button').on('click', function () {

@ -5,7 +5,7 @@
<div data-reactroot="" class="FullPage-container-3qanw">
<div>
<div>
<div style="background-image: url('//assets.plex.tv/deploys/desktop/env-eb2798cc3c7d9533df5b563963d5c394/3.34.1-b51c37a/common/img/backgrounds/preset-light.770a0981b66e038d3ffffbcc4f5a26a4.png'); background-size: cover; background-position: center center; background-repeat: no-repeat; width: 100%; height: 100%; position: absolute; z-index: 2;"
<div style="background-image: url('https://plex.hack-free.org/web/common/img/backgrounds/preset-light2.ead08af5122abea1ab8f7d601fd93d6a.png'); background-size: cover; background-position: center center; background-repeat: no-repeat; width: 100%; height: 100%; position: absolute; z-index: 2;"
class=""></div>
</div>
<div style="position: absolute; width: 100%; height: 100%; background: rgba(0, 0, 0, 0) url('//assets.plex.tv/deploys/desktop/env-eb2798cc3c7d9533df5b563963d5c394/3.34.1-b51c37a/common/img/backgrounds/noise.8b05ce45d0df59343e206bc9ae78d85d.png') repeat scroll 0% 0%; z-index: 2;"></div>

@ -265,7 +265,7 @@
setTimeout(function () {
$('[data-movie-id="' + movie_id + '"] > div')
.css('opacity', 0)
.css('background-image', 'url("/cover/movie?movie_id=' + movie_id + '&width=' + 160 + '&height=' + 236 + '")')
.css('background-image', 'url("/cover/movie?movie_id=' + movie_id + '&width=' + 175 + '&height=' + 263 + '")')
.animate({opacity: 1}, 500);
}, 50 +( 50 * number));
number++;
@ -288,7 +288,7 @@
setTimeout(function () {
$('[data-tvshow-id="' + tvshow_id + '"] > div')
.css('opacity', 0)
.css('background-image', 'url("/cover/tvshow?tvshow_id=' + tvshow_id + '&width=' + 160 + '&height=' + 236 + '")')
.css('background-image', 'url("/cover/tvshow?tvshow_id=' + tvshow_id + '&width=' + 175 + '&height=' + 263 + '")')
.animate({opacity: 1}, 500);
}, 50 +( 50 * number));
number++;

@ -346,7 +346,7 @@
setTimeout(function () {
$('[data-movie-id="' + movie_id + '"] > div')
.css('opacity', 0)
.css('background-image', 'url("/cover/movie?movie_id=' + movie_id + '&width=' + 160 + '&height=' + 236 + '")')
.css('background-image', 'url("/cover/movie?movie_id=' + movie_id + '&width=' + 175 + '&height=' + 263 + '")')
.animate({opacity: 1}, 500);
}, 50 +( 50 * number));
number++;

@ -5,14 +5,14 @@
<div class="SettingsFormSection-sectionWrapper-1-gPg" style="background-color: rgba(0,0,0,0.15); margin-bottom: 15px; border-bottom: 1px solid rgb(97,97,97)">
<div class="SettingsFormSection-section-1zYMP">
<div class="FormGroup-group-15o1H">
<?php echo $permission->name; ?>
<?php echo __($permission->name); ?>
<div style="float: right;">
<label class="switch">
<input type="checkbox" data-name="<?php echo $permission->name; ?>" <?php echo isset($library_permissions[$permission->id]) && $library_permissions[$permission->id]->disable === '0' ? 'checked' : ''; ?> />
<span class="slider round"></span>
</label>
</div>
<p class="FormHelp-help-2-ppP">Description of the right, will come here!</p>
<p class="FormHelp-help-2-ppP"><?php echo __($permission->name . '_DESCRIPTION'); ?></p>
<?php if((int)$permission->parameters === 1) : ?>
<p><input class="form-control" style="max-width: 400px;" type="text" data-permission-name="<?php echo $permission->name; ?>" value="<?php echo isset($library_permissions[$permission->id]) ? $library_permissions[$permission->id]->value : ''; ?>" /></p>
<?php endif; ?>

@ -55,7 +55,11 @@ function launchPlayer(view) {
playback: {
preload: 'metadata',
controls: false,
recycleVideo: Clappr.Browser.isMobile
recycleVideo: Clappr.Browser.isMobile,
hlsjsConfig: {
maxBufferLength : 2000,
maxMaxBufferLength : 2000
}
},
events: {
onReady: function () {
@ -90,6 +94,10 @@ function launchPlayer(view) {
}
});
player.on(Clappr.Events.PLAYBACK_ERROR, function(error) {
console.log(error);
});
player.on(Clappr.Events.PLAYER_PLAY, function(){player.core.mediaControl.disable()});
/** EVENT PLAYER WHEN LOADED GET TOTATL TIME **/

Loading…
Cancel
Save