List movies, fixed overload browser

pull/12/head
root 2 years ago
parent 6f8e985c85
commit 930dc2c753

@ -5,9 +5,9 @@
"keywords": ["application", "website", "development", "framework", "PHP", "PHP7"],
"license": "MIT",
"require": {
"php": ">=8.0",
"php": ">=5.6.33",
"composer/installers": "~1.0",
"fuel/core": "dev-1.9/develop",
"fuel/core": "1.8.*",
"fuel/auth": "1.8.*",
"fuel/email": "1.8.*",
"fuel/oil": "1.8.*",
@ -19,7 +19,6 @@
"michelf/php-markdown": "1.7.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"fuel/docs": "1.8.*"
},
"suggest": {

99
composer.lock generated

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ae1a1228936fae1c63858febf5c92679",
"content-hash": "d33041976bdffced824d0b526f736989",
"packages": [
{
"name": "composer/installers",
"version": "v1.11.0",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
"reference": "ae03311f45dfe194412081526be2e003960df74b"
"reference": "d20a64ed3c94748397ff5973488761b22f6d3f19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/installers/zipball/ae03311f45dfe194412081526be2e003960df74b",
"reference": "ae03311f45dfe194412081526be2e003960df74b",
"url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19",
"reference": "d20a64ed3c94748397ff5973488761b22f6d3f19",
"shasum": ""
},
"require": {
@ -116,6 +116,7 @@
"modx",
"moodle",
"osclass",
"pantheon",
"phpbb",
"piwik",
"ppi",
@ -138,7 +139,7 @@
],
"support": {
"issues": "https://github.com/composer/installers/issues",
"source": "https://github.com/composer/installers/tree/v1.11.0"
"source": "https://github.com/composer/installers/tree/v1.12.0"
},
"funding": [
{
@ -154,7 +155,7 @@
"type": "tidelift"
}
],
"time": "2021-04-28T06:42:17+00:00"
"time": "2021-09-13T08:19:44+00:00"
},
{
"name": "fuel/auth",
@ -194,16 +195,16 @@
},
{
"name": "fuel/core",
"version": "dev-1.9/develop",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/fuel/core.git",
"reference": "a4838ce7c12fc47777fcab67b1519b2126558c69"
"reference": "050c3147b1d889223701b63e22f60e90bf46cc1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fuel/core/zipball/a4838ce7c12fc47777fcab67b1519b2126558c69",
"reference": "a4838ce7c12fc47777fcab67b1519b2126558c69",
"url": "https://api.github.com/repos/fuel/core/zipball/050c3147b1d889223701b63e22f60e90bf46cc1e",
"reference": "050c3147b1d889223701b63e22f60e90bf46cc1e",
"shasum": ""
},
"require": {
@ -213,7 +214,6 @@
"paragonie/sodium_compat": "^1.6",
"phpseclib/phpseclib": "^2.0.0"
},
"default-branch": true,
"type": "fuel-package",
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -229,9 +229,9 @@
"homepage": "https://github.com/fuel/core",
"support": {
"issues": "https://github.com/fuel/core/issues",
"source": "https://github.com/fuel/core/tree/1.9/develop"
"source": "https://github.com/fuel/core/tree/1.8.2"
},
"time": "2021-04-10T19:18:44+00:00"
"time": "2019-06-27T14:56:04+00:00"
},
{
"name": "fuel/email",
@ -488,16 +488,16 @@
},
{
"name": "monolog/monolog",
"version": "1.26.0",
"version": "1.27.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33"
"reference": "52ebd235c1f7e0d5e1b16464b695a28335f8e44a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
"reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/52ebd235c1f7e0d5e1b16464b695a28335f8e44a",
"reference": "52ebd235c1f7e0d5e1b16464b695a28335f8e44a",
"shasum": ""
},
"require": {
@ -558,7 +558,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/1.26.0"
"source": "https://github.com/Seldaek/monolog/tree/1.27.0"
},
"funding": [
{
@ -570,7 +570,7 @@
"type": "tidelift"
}
],
"time": "2020-12-14T12:56:38+00:00"
"time": "2022-03-13T20:29:46+00:00"
},
{
"name": "paragonie/random_compat",
@ -624,16 +624,16 @@
},
{
"name": "paragonie/sodium_compat",
"version": "v1.16.0",
"version": "v1.17.1",
"source": {
"type": "git",
"url": "https://github.com/paragonie/sodium_compat.git",
"reference": "928e0565c9fe4f60b8f09119656c1aa418fc84ab"
"reference": "ac994053faac18d386328c91c7900f930acadf1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/928e0565c9fe4f60b8f09119656c1aa418fc84ab",
"reference": "928e0565c9fe4f60b8f09119656c1aa418fc84ab",
"url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/ac994053faac18d386328c91c7900f930acadf1e",
"reference": "ac994053faac18d386328c91c7900f930acadf1e",
"shasum": ""
},
"require": {
@ -704,22 +704,22 @@
],
"support": {
"issues": "https://github.com/paragonie/sodium_compat/issues",
"source": "https://github.com/paragonie/sodium_compat/tree/v1.16.0"
"source": "https://github.com/paragonie/sodium_compat/tree/v1.17.1"
},
"time": "2021-05-14T03:03:19+00:00"
"time": "2022-03-23T19:32:04+00:00"
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.31",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4"
"reference": "a74aa9efbe61430fcb60157c8e025a48ec8ff604"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/233a920cb38636a43b18d428f9a8db1f0a1a08f4",
"reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/a74aa9efbe61430fcb60157c8e025a48ec8ff604",
"reference": "a74aa9efbe61430fcb60157c8e025a48ec8ff604",
"shasum": ""
},
"require": {
@ -727,25 +727,27 @@
},
"require-dev": {
"phing/phing": "~2.7",
"phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4",
"phpunit/phpunit": "~4.0",
"sami/sami": "~2.0",
"squizlabs/php_codesniffer": "~2.0"
},
"suggest": {
"ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.",
"pear-pear/PHP_Compat": "Install PHP_Compat to get phpseclib working on PHP < 5.0.0."
},
"type": "library",
"autoload": {
"files": [
"phpseclib/bootstrap.php"
],
"psr-4": {
"phpseclib\\": "phpseclib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"phpseclib/"
],
"license": [
"MIT"
],
@ -769,11 +771,6 @@
"name": "Hans-Jürgen Petrich",
"email": "petrich@tronic-media.com",
"role": "Developer"
},
{
"name": "Graham Campbell",
"email": "graham@alt-three.com",
"role": "Developer"
}
],
"description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
@ -799,23 +796,9 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/2.0.31"
"source": "https://github.com/phpseclib/phpseclib/tree/2.0"
},
"funding": [
{
"url": "https://github.com/terrafrost",
"type": "github"
},
{
"url": "https://www.patreon.com/phpseclib",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
"type": "tidelift"
}
],
"time": "2021-04-06T13:56:45+00:00"
"time": "2015-08-04T04:48:03+00:00"
},
{
"name": "psr/log",
@ -908,9 +891,7 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"fuel/core": 20
},
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {

@ -400,12 +400,16 @@
$('.Menu-select-subtitle').toggleClass('hidden');
});
/** HIDE WHEN CLICK OUTSIDE **/
$(document).on('mouseup', function() {
if($('.Menu-select-season').css('display') !== 'none')
$('.PageHeaderBreadcrumbButton-button-1uaPj.Season').click();
if($('.Menu-select-episode').css('display') !== 'none')
$('.PageHeaderBreadcrumbButton-button-1uaPj.Episode').click();
if($('.Menu-select-subtitle').css('display') !== 'none')
$('#id-248').click();
});
/** PLAY EPISODE **/
$(document).on('click', '#id-16, .MetadataPosterCardOverlay-playButton-1fjhk.PlayButton-playButton-3WX8X', function (event) {

@ -68,84 +68,84 @@
<div id="video_controls" class="AudioVideoPlayerView-container-kWiFs"></div>
</div>
<script type="text/javascript">
$(function() {
$('[data-toggle="tooltip"]').tooltip({ container: 'body', template: '<div class="tooltip Tooltip-tooltipPortal-1IUlb"><div class="tooltip-arrow"></div><div class="tooltip-inner Tooltip-tooltip-2AL-W"></div></div>'});
$(document).on('click', '#id-3026', function (event) {
event.stopPropagation();
$(this).find('.DisclosureArrow-disclosureArrow-1sBFv').toggleClass('DisclosureArrow-up-1U7WW DisclosureArrow-down-1U7WW');
$('.Menu-menuPortal-2JtDz').toggle();
});
$(document).on('click', 'body', function (event) {
event.stopPropagation();
if($('.Menu-menuPortal-2JtDz').css('display') !== 'none')
$('#id-3026').click();
});
$(document).on('focus focusout', '.QuickSearchInput-container-R2-wn', function (event) {
event.stopPropagation();
if(!$('.QuickSearchInput-container-R2-wn').hasClass('QuickSearchInput-focused-2kpW8'))
$('.QuickSearchInput-container-R2-wn').addClass('QuickSearchInput-focused-2kpW8');
else {
$('.QuickSearchInput-container-R2-wn').removeClass('QuickSearchInput-focused-2kpW8');
}
});
$('body').not('#search_result').on('click', function () {
if(!$('#search_result').hasClass('hidden')) {
$('#search_result').addClass('hidden');
$('input.QuickSearchInput-searchInput-2HU6-').val('');
$('._search').remove();
}
});
$(document).on('keyup', '.QuickSearchInput-searchInput-2HU6-', function (event) {
event.stopPropagation();
if($(this).val().length < 2)
return;
$(function() {
$('[data-toggle="tooltip"]').tooltip({ container: 'body', template: '<div class="tooltip Tooltip-tooltipPortal-1IUlb"><div class="tooltip-arrow"></div><div class="tooltip-inner Tooltip-tooltip-2AL-W"></div></div>'});
$(document).on('click', '#id-3026', function (event) {
event.stopPropagation();
$(this).find('.DisclosureArrow-disclosureArrow-1sBFv').toggleClass('DisclosureArrow-up-1U7WW DisclosureArrow-down-1U7WW');
$('.Menu-menuPortal-2JtDz').toggle();
});
$(document).on('click', 'body', function (event) {
event.stopPropagation();
if($('.Menu-menuPortal-2JtDz').css('display') !== 'none')
$('#id-3026').click();
});
$(document).on('focus focusout', '.QuickSearchInput-container-R2-wn', function (event) {
event.stopPropagation();
if(!$('.QuickSearchInput-container-R2-wn').hasClass('QuickSearchInput-focused-2kpW8'))
$('.QuickSearchInput-container-R2-wn').addClass('QuickSearchInput-focused-2kpW8');
else {
$('.QuickSearchInput-container-R2-wn').removeClass('QuickSearchInput-focused-2kpW8');
}
});
$('body').not('#search_result').on('click', function () {
if(!$('#search_result').hasClass('hidden')) {
$('#search_result').addClass('hidden');
$('input.QuickSearchInput-searchInput-2HU6-').val('');
$('._search').remove();
}
});
$(document).on('keyup', '.QuickSearchInput-searchInput-2HU6-', function (event) {
event.stopPropagation();
if($(this).val().length < 2)
return;
$.ajax({
url: '/rest/search/index',
method: 'GET',
data: {search: $(this).val()},
dataType: 'json'
}).done(function (data) {
$('._search').remove();
$.ajax({
url: '/rest/search/index',
method: 'GET',
data: {search: $(this).val()},
dataType: 'json'
}).done(function (data) {
$('._search').remove();
if(data.movies.length === 0 && data.episodes.length === 0)
return;
if(data.movies.length === 0 && data.episodes.length === 0)
return;
$('#search_result').removeClass('hidden');
$('#search_result').removeClass('hidden');
data.movies.forEach(function (movie, index) {
let template = $('#film_template').clone();
data.movies.forEach(function (movie, index) {
let template = $('#film_template').clone();
template.removeClass('hidden');
template.addClass('_search');
template.html(template.html().replace(/{\$TITLE\$}/g, movie.title));
template.html(template.html().replace(/{\$YEAR\$}/g, movie.year));
template.html(template.html().replace(/{\$MOVIEID\$}/g, movie.id));
template.removeClass('hidden');
template.addClass('_search');
template.html(template.html().replace(/{\$TITLE\$}/g, movie.title));
template.html(template.html().replace(/{\$YEAR\$}/g, movie.year));
template.html(template.html().replace(/{\$MOVIEID\$}/g, movie.id));
$('#film_template').after(template);
});
$('#film_template').after(template);
});
data.episodes.forEach(function (episode, index) {
let template = $('#episode_template').clone();
data.episodes.forEach(function (episode, index) {
let template = $('#episode_template').clone();
template.removeClass('hidden');
template.addClass('_search');
template.html(template.html().replace(/{\$TITLE\$}/g, episode.title));
template.html(template.html().replace(/{\$YEAR\$}/g, episode.year));
template.html(template.html().replace(/{\$MOVIEID\$}/g, episode.id));
template.removeClass('hidden');
template.addClass('_search');
template.html(template.html().replace(/{\$TITLE\$}/g, episode.title));
template.html(template.html().replace(/{\$YEAR\$}/g, episode.year));
template.html(template.html().replace(/{\$MOVIEID\$}/g, episode.id));
$('#episode_template').after(template);
});
}).fail(function (data) {
console.error(data.responseText);
show_alert('error', data.responseText);
$('#episode_template').after(template);
});
}).fail(function (data) {
console.error(data.responseText);
show_alert('error', data.responseText);
});
});
});
</script>
<?php
echo \Asset::js(['bootstrap.min.js']);
echo \Asset::js(isset($js_bottom) ? $js_bottom : null);
echo \Asset::js(['bootstrap.min.js']);
echo \Asset::js(isset($js_bottom) ? $js_bottom : null);
?>
<devBy class="hidden">Created By Chewbaka69 // https://github.com/Chewbaka69/PlexShare</devBy>
</body>

@ -4,8 +4,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<?php
echo \Asset::css(['normalize.css', 'plex.css', 'main.css']);
echo \Asset::js(['jquery.min.js']);
echo \Asset::css(['normalize.css', 'plex.css', 'main.css']);
echo \Asset::js(['jquery.min.js']);
?>
<link rel="shortcut icon"
href="//assets.plex.tv/deploys/desktop/env-eb2798cc3c7d9533df5b563963d5c394/3.34.1-b51c37a/favicon.ico">

@ -53,14 +53,14 @@
<?php foreach ($movies as $movie) : ?>
<div class=" virtualized-cell-3KPHx " data-qa-id="cellItem"
style="display: inline-block; margin-left: 25px; margin-top: 15px;">
<div class="MetadataPosterCard-cardContainer-2gRcQ"
data-qa-id="metadataPosterCard--/library/metadata/1">
<div class="MetadataPosterCard-cardContainer-2gRcQ">
<div class="MetadataPosterCard-card-3bztR " style="width: 126px; height: 189px;">
<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: 30px; line-height: 189px;"></i>
<div class="PosterCardImg-imageContainer-1Ar4M" data-movie-id="<?php echo $movie->id; ?>">
<div style="background-image: none; background-size: cover; background-position: center center; background-repeat: no-repeat; width: 100%; height: 100%; position: absolute; z-index: 2;"
class=""></div>
class="">
</div>
</div>
<div class=" MetadataPosterCardOverlay-overlay-1uMpL">
<div class="MetadataPosterCardOverlay-background-2EwyB"></div>
@ -78,12 +78,12 @@
<i class="plex-icon-play-560 PlayButton-playIcon-dt3sk"
aria-hidden="true"></i></div>
</button>
<button data-qa-id="metadataPosterMoreButton" id="id-28" tabindex="-1"
<button data-qa-id="metadataPosterMoreButton" tabindex="-1"
aria-label="Plus d'actions" aria-haspopup="true" role="button"
class="MetadataPosterCardOverlay-moreButton-3FK-K MetadataPosterCardOverlay-button-M43H- Link-link-2XYrU Link-default-32xSO"
type="button"><i class="plex-icon-more-560" aria-hidden="true"></i>
</button>
<button aria-label="Sélectionner 13 Hours" id="id-27" tabindex="-1" role="button"
<button tabindex="-1" role="button"
class="MetadataPosterCardOverlay-selectButton-3rwSV SelectButton-selectButton-3Kbjm MetadataPosterCardOverlay-button-M43H- Link-link-2XYrU Link-default-32xSO"
type="button">
<div class="MetadataPosterCardOverlay-selectCircle-3ql8S SelectButton-selectCircle-3tdvG"
@ -314,7 +314,7 @@
if($('.Menu-filter-movies').css('display') !== 'none')
$('#id-14').click();
});
/** LAUNCH PLAYER */
// LAUNCH PLAYER
$(document).on('click', '.MetadataPosterCardOverlay-playButton-1fjhk.PlayButton-playButton-3WX8X', function (event) {
event.stopPropagation();
var movie_id = $(this).data('id');
@ -329,32 +329,32 @@
console.error(data);
});
});
/** LOAD IMAGES **/
// LOAD IMAGES
$('.MetadataListPageContent-metadataListScroller-1uFgY.MetadataListPageContent-hasGutter-1EfyE.Scroller-scroller-d5-b-.Scroller-vertical-1bgGS').scroll(function() {
let number = 1;
$('.PosterCardImg-imageContainer-1Ar4M[data-movie-id]').each(function (index, element) {
$('.PosterCardImg-imageContainer-1Ar4M[data-movie-id]:not(.hasBackground)').each(function (index, element) {
let movie_id = $(element).data('movie-id');
let position = element.getBoundingClientRect();
let movie = document.querySelector('[data-movie-id="' + movie_id + '"] > div');
if( position.top > 0 && position.top <= (window.innerHeight || document.documentElement.clientHeight) && !movie.classList.contains('hasBackground') ) {
movie.classList.add('hasBackground');
/** IF USING CLOUDFLARE TOO MANY REQUEST **/
//if( position.top > 0 && position.top <= (window.innerHeight || document.documentElement.clientHeight) && !movie.classList.contains('hasBackground') ) {
this.classList.add('hasBackground');
// IF USING CLOUDFLARE TOO MANY REQUEST
setTimeout(function () {
$('[data-movie-id="' + movie_id + '"] > div')
.css('opacity', 0)
.css('background-image', 'url("/cover/movie?movie_id=' + movie_id + '&width=' + 175 + '&height=' + 263 + '")')
.animate({opacity: 1}, 500);
}, 50 +( 50 * number));
}, 100 +( 50 * number));
number++;
} else if( ( position.top < 0 || position.top > (window.innerHeight || document.documentElement.clientHeight) ) && movie.classList.contains('hasBackground') ) {
/*} else if( ( position.top < 0 || position.top > (window.innerHeight || document.documentElement.clientHeight) ) && movie.classList.contains('hasBackground') ) {
$('[data-movie-id="' + movie_id + '"] > div').css('background-image', '')
.removeClass('hasBackground')
.animate({opacity: 0}, 500);
}
}*/
});
});

@ -3896,10 +3896,12 @@ a:hover .DisclosureArrow-disclosureArrow-1sBFv, button:hover .DisclosureArrow-di
transform: rotateY(180deg)
}
/**
* OVERLOAD BROWSER
.MetadataPosterCard-cardContainer-2gRcQ {
-webkit-perspective: 500px;
perspective: 500px
}
}*/
.MetadataPosterCard-card-3bztR {
position: relative;

Loading…
Cancel
Save