Go back left arrow
This commit is contained in:
parent
87a331265c
commit
da7fd24e1d
231
index.php
231
index.php
@ -1,116 +1,115 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include "php/function.php";
|
include "php/function.php";
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set('display_errors', TRUE);
|
ini_set('display_errors', TRUE);
|
||||||
ini_set('display_startup_errors', TRUE);
|
ini_set('display_startup_errors', TRUE);
|
||||||
|
|
||||||
if (isset($_GET['saga'])) {
|
if (isset($_GET['saga'])) {
|
||||||
$sagaID = $_GET['saga'];
|
$sagaID = $_GET['saga'];
|
||||||
|
|
||||||
$result = movie_list($sagaID);
|
$result = movie_list($sagaID);
|
||||||
|
|
||||||
$movies_list = json_encode($result);
|
$movies_list = json_encode($result);
|
||||||
|
|
||||||
$saga_name = saga_name($sagaID);
|
$saga_name = saga_name($sagaID);
|
||||||
|
|
||||||
}
|
}
|
||||||
elseif (isset($_GET['movie'])) {
|
elseif (isset($_GET['movie'])) {
|
||||||
$id = $_GET['movie'];
|
$id = $_GET['movie'];
|
||||||
|
|
||||||
$result = movie_detail($id);
|
$result = movie_detail($id);
|
||||||
|
|
||||||
$result['release_date'] = ucwords(strftime("%d %B %Y", strtotime($result['release_date'])));
|
$result['release_date'] = ucwords(strftime("%d %B %Y", strtotime($result['release_date'])));
|
||||||
|
|
||||||
$movie_detail = json_encode($result);
|
$movie_detail = json_encode($result);
|
||||||
|
|
||||||
$file = $result['file_path'];
|
$file = $result['file_path'];
|
||||||
|
|
||||||
//$file = '/var/www/html/video/test5.mkv';
|
//$file = '/var/www/html/video/test5.mkv';
|
||||||
|
|
||||||
if (is_file($file)) {
|
if (is_file($file)) {
|
||||||
|
|
||||||
$info = MediaInfo($file);
|
$info = MediaInfo($file);
|
||||||
|
|
||||||
$file_info = json_encode($info);
|
$file_info = json_encode($info);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$saga_list = json_encode(saga_list());
|
$saga_list = json_encode(saga_list());
|
||||||
|
|
||||||
$movies_full_list = json_encode(movies_full_list());
|
$movies_full_list = json_encode(movies_full_list());
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Netflix 2.0</title>
|
<title>Netflix 2.0</title>
|
||||||
<link href="style/style.css" rel="stylesheet">
|
<link href="style/style.css" rel="stylesheet">
|
||||||
<link href="/fontawesome/css/all.css" rel="stylesheet" />
|
<link href="/fontawesome/css/all.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<a href=".">Films</a>
|
<i class="fa fa-arrow-left fa-2x" aria-hidden="true" title="Vue en liste" onclick="goBack()"></i>
|
||||||
<a href="#anime">Animés</a>
|
<a href=".">Films</a>
|
||||||
<input id="search" type="text" name="search" placeholder="Recherche">
|
<a href="#anime">Animés</a>
|
||||||
<i class="fa fa-list fa-2x" aria-hidden="true" title="Vue en liste"></i>
|
<input id="search" type="text" name="search" placeholder="Recherche">
|
||||||
<i class="fa fa-th fa-2x" aria-hidden="true" title="Vue en miniature"></i>
|
<i class="fa fa-list fa-2x" aria-hidden="true" title="Vue en liste"></i>
|
||||||
</div>
|
<i class="fa fa-th fa-2x" aria-hidden="true" title="Vue en miniature"></i>
|
||||||
|
</div>
|
||||||
<h2 class="main">Netflix 2.0</h2>
|
|
||||||
|
<h2 class="main">Netflix 2.0</h2>
|
||||||
<div id="sagas" class="main" ></div>
|
|
||||||
<div id="movies" class="main" ></div>
|
<div id="sagas" class="main" ></div>
|
||||||
<div id="research" class="main" ></div>
|
<div id="movies" class="main" ></div>
|
||||||
|
<div id="research" class="main" ></div>
|
||||||
<?php
|
|
||||||
if (isset($movie_detail)):
|
<?php
|
||||||
?>
|
if (isset($movie_detail)):
|
||||||
<section id="movieContent" class="main">
|
?>
|
||||||
<h2 id="movieTitle" style="margin: 0;"></h2>
|
<section id="movieContent" class="main">
|
||||||
<div id="heure" style="margin: 0 10px; padding: 0;"></div>
|
<h2 id="movieTitle" style="margin: 0;"></h2>
|
||||||
<h3 id="showDetail" class="toggle"><i class="fa fa-chevron-down" aria-hidden="true"></i> Afficher détail</h3>
|
<div id="heure" style="margin: 0 10px; padding: 0;"></div>
|
||||||
<div id="movieDetails">
|
<h3 id="showDetail" class="toggle"><i class="fa fa-chevron-down" aria-hidden="true"></i> Afficher détail</h3>
|
||||||
<div id="cover" >
|
<div id="movieDetails">
|
||||||
<img width="300" src="">
|
<div id="cover" >
|
||||||
</div>
|
<img width="300" src="">
|
||||||
<div id="spec">
|
</div>
|
||||||
<p></p>
|
<div id="spec">
|
||||||
</div>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div id="selection">
|
</div>
|
||||||
<div id="AV"></div>
|
<div id="selection">
|
||||||
<div id="subtitle_list"></div>
|
<div id="AV"></div>
|
||||||
</div>
|
<div id="subtitle_list"></div>
|
||||||
<div class="hidden" id="video">
|
</div>
|
||||||
<!--<video width="600" controls>
|
<div class="hidden" id="video">
|
||||||
<source src="" type="video/mp4">
|
<!--<video width="600" controls>
|
||||||
</video>-->
|
<source src="" type="video/mp4">
|
||||||
</div>
|
</video>-->
|
||||||
</section>
|
</div>
|
||||||
<?php
|
</section>
|
||||||
endif;
|
<?php
|
||||||
?>
|
endif;
|
||||||
<br>
|
?>
|
||||||
<button id="back" onclick="goBack()">Go Back</button>
|
|
||||||
|
<script>
|
||||||
<script>
|
|
||||||
|
<?php
|
||||||
<?php
|
echo "var saga_list = " . $saga_list. ";\n";
|
||||||
echo "var saga_list = " . $saga_list. ";\n";
|
echo "var movies_full_list = " . $movies_full_list. ";\n";
|
||||||
echo "var movies_full_list = " . $movies_full_list. ";\n";
|
if (isset($movies_list)) echo "var movies_list = " . $movies_list. ";\nvar saga_name = '" . addslashes($saga_name). "';";
|
||||||
if (isset($movies_list)) echo "var movies_list = " . $movies_list. ";\nvar saga_name = '" . addslashes($saga_name). "';";
|
if (isset($file_info)) echo "var file_info = " . $file_info. ';';
|
||||||
if (isset($file_info)) echo "var file_info = " . $file_info. ';';
|
if (isset($movie_detail)) echo "var movie_detail = " . $movie_detail. ';';
|
||||||
if (isset($movie_detail)) echo "var movie_detail = " . $movie_detail. ';';
|
?>
|
||||||
?>
|
|
||||||
|
</script>
|
||||||
</script>
|
<script src="js/jquery-3.4.1.js"></script>
|
||||||
<script src="js/jquery-3.4.1.js"></script>
|
<script src="js/function.js"></script>
|
||||||
<script src="js/function.js"></script>
|
<script src="js/script.js"></script>
|
||||||
<script src="js/script.js"></script>
|
</body>
|
||||||
</body>
|
</html>
|
||||||
</html>
|
|
||||||
|
568
js/function.js
568
js/function.js
@ -1,284 +1,284 @@
|
|||||||
|
|
||||||
var duree_movie;
|
var duree_movie;
|
||||||
|
|
||||||
|
|
||||||
function ShowSagas(data) {
|
function ShowSagas(data) {
|
||||||
var nosaga = $('<a />', {
|
var nosaga = $('<a />', {
|
||||||
id: 0,
|
id: 0,
|
||||||
class: 'saga button box nosaga',
|
class: 'saga button box nosaga',
|
||||||
href: '.?saga=0',
|
href: '.?saga=0',
|
||||||
});
|
});
|
||||||
nosaga.append('No Saga');
|
nosaga.append('No Saga');
|
||||||
nosaga.appendTo('#sagas');
|
nosaga.appendTo('#sagas');
|
||||||
$.each(data, function(key, value) {
|
$.each(data, function(key, value) {
|
||||||
var saga = $('<a />', {
|
var saga = $('<a />', {
|
||||||
id: value['id'],
|
id: value['id'],
|
||||||
class: 'saga button box container',
|
class: 'saga button box container',
|
||||||
href: '.?saga='+value['id'],
|
href: '.?saga='+value['id'],
|
||||||
});
|
});
|
||||||
//saga.append('<br>' + value['name']);
|
//saga.append('<br>' + value['name']);
|
||||||
saga.appendTo('#sagas');
|
saga.appendTo('#sagas');
|
||||||
|
|
||||||
var text = $('<div />', {
|
var text = $('<div />', {
|
||||||
html: value['name'],
|
html: value['name'],
|
||||||
class: 'centered title',
|
class: 'centered title',
|
||||||
});
|
});
|
||||||
text.prependTo(saga);
|
text.prependTo(saga);
|
||||||
|
|
||||||
var image = $('<img />', {
|
var image = $('<img />', {
|
||||||
src: value['poster_path'],
|
src: value['poster_path'],
|
||||||
class: 'thumbnail',
|
class: 'thumbnail',
|
||||||
});
|
});
|
||||||
image.prependTo(saga);
|
image.prependTo(saga);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function ShowMovies(data) {
|
function ShowMovies(data) {
|
||||||
$('#movies').append('<h3 style="margin: 10px 10px; padding: 0;">' + saga_name + '</h3>');
|
$('#movies').append('<h3 style="margin: 10px 10px; padding: 0;">' + saga_name + '</h3>');
|
||||||
$.each(data, function(key, value) {
|
$.each(data, function(key, value) {
|
||||||
var movie = $('<a />', {
|
var movie = $('<a />', {
|
||||||
id: value['id'],
|
id: value['id'],
|
||||||
class: 'movie button box container',
|
class: 'movie button box container',
|
||||||
href: '.?movie='+value['id'],
|
href: '.?movie='+value['id'],
|
||||||
});
|
});
|
||||||
//movie.append('<br>' + value['title']);
|
//movie.append('<br>' + value['title']);
|
||||||
movie.appendTo('#movies');
|
movie.appendTo('#movies');
|
||||||
|
|
||||||
var title = $('<div />', {
|
var title = $('<div />', {
|
||||||
html: value['title'],
|
html: value['title'],
|
||||||
class: 'centered title',
|
class: 'centered title',
|
||||||
});
|
});
|
||||||
title.appendTo(movie);
|
title.appendTo(movie);
|
||||||
|
|
||||||
var original_title = $('<div />', {
|
var original_title = $('<div />', {
|
||||||
html: value['original_title'],
|
html: value['original_title'],
|
||||||
class: 'original_title',
|
class: 'original_title',
|
||||||
});
|
});
|
||||||
original_title.appendTo(movie);
|
original_title.appendTo(movie);
|
||||||
original_title.hide();
|
original_title.hide();
|
||||||
|
|
||||||
var image = $('<img />', {
|
var image = $('<img />', {
|
||||||
src: value['poster_path'],
|
src: value['poster_path'],
|
||||||
class: 'thumbnail',
|
class: 'thumbnail',
|
||||||
});
|
});
|
||||||
image.prependTo(movie);
|
image.prependTo(movie);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function MovieDetails(data) {
|
function MovieDetails(data) {
|
||||||
|
|
||||||
$('#movieTitle').html(data.title);
|
$('#movieTitle').html(data.title);
|
||||||
|
|
||||||
var description = $('#movieDetails #spec p');
|
var description = $('#movieDetails #spec p');
|
||||||
description.empty();
|
description.empty();
|
||||||
description.append('<span id="release_date">Date de sortie : ' + data.release_date + '<br></span>');
|
description.append('<span id="release_date">Date de sortie : ' + data.release_date + '<br></span>');
|
||||||
description.append('<span id="viewOverview" class="toggle"><i class="fa fa-chevron-right" aria-hidden="true"></i> Résumé</span><br><span class="overview" style="display: none">' + data.overview + '<br></span>');
|
description.append('<span id="viewOverview" class="toggle"><i class="fa fa-chevron-right" aria-hidden="true"></i> Résumé</span><br><span class="overview" style="display: none">' + data.overview + '<br></span>');
|
||||||
description.append('<span id="original_language">Langue original : ' + data.original_language + '<br></span>');
|
description.append('<span id="original_language">Langue original : ' + data.original_language + '<br></span>');
|
||||||
description.append('<span id="original_title">Titre original : ' + data.original_title + '<br></span>');
|
description.append('<span id="original_title">Titre original : ' + data.original_title + '<br></span>');
|
||||||
description.append('<span id="file_name">Nom du fichier : ' + data.file_name + '<br></span>');
|
description.append('<span id="file_name">Nom du fichier : ' + data.file_name + '<br></span>');
|
||||||
description.append('<span id="tmdbMovie">More details here : <a target="_blank" href="https://www.themoviedb.org/movie/' + data.id + '?language=fr-FR">TMDB</a><br></span>');
|
description.append('<span id="tmdbMovie">More details here : <a target="_blank" href="https://www.themoviedb.org/movie/' + data.id + '?language=fr-FR">TMDB</a><br></span>');
|
||||||
if (data.sagaID != 0)
|
if (data.sagaID != 0)
|
||||||
description.append('<span id="tmdbSaga">Saga details : <a target="_blank" href="https://www.themoviedb.org/collection/' + data.sagaID + '?language=fr-FR">TMDB</a><br></span>');
|
description.append('<span id="tmdbSaga">Saga details : <a target="_blank" href="https://www.themoviedb.org/collection/' + data.sagaID + '?language=fr-FR">TMDB</a><br></span>');
|
||||||
description.append('<span id="dl">Download : <a target="_blank" href="php/download.php?file=' + data.id + '">File</a>\
|
description.append('<span id="dl">Download : <a target="_blank" href="php/download.php?file=' + data.id + '">File</a>\
|
||||||
<i class="fas fa-clipboard-list" aria-hidden="true" title="Copy to clipboard"></i></span><br>');
|
<i class="fas fa-clipboard-list" aria-hidden="true" title="Copy to clipboard"></i></span><br>');
|
||||||
|
|
||||||
$('#cover img').attr('src', data.poster_path);
|
$('#cover img').attr('src', data.poster_path);
|
||||||
|
|
||||||
$('#viewOverview').click(function() {
|
$('#viewOverview').click(function() {
|
||||||
$('.overview').slideToggle(200);
|
$('.overview').slideToggle(200);
|
||||||
$(this).find(".fa").toggleClass('active');
|
$(this).find(".fa").toggleClass('active');
|
||||||
});
|
});
|
||||||
$('#showDetail').click(function() {
|
$('#showDetail').click(function() {
|
||||||
$('#movieDetails').slideToggle(200);
|
$('#movieDetails').slideToggle(200);
|
||||||
$(this).find(".fa").toggleClass('active');
|
$(this).find(".fa").toggleClass('active');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function ShowSearch(sc_saga, sc_movie) {
|
function ShowSearch(sc_saga, sc_movie) {
|
||||||
$('#sagas').hide();
|
$('#sagas').hide();
|
||||||
$('#movies').hide();
|
$('#movies').hide();
|
||||||
$('#movieContent').hide();
|
$('#movieContent').hide();
|
||||||
$('#research').empty();
|
$('#research').empty();
|
||||||
$.each(sc_saga, function(key, value) {
|
$.each(sc_saga, function(key, value) {
|
||||||
var saga = $('<a />', {
|
var saga = $('<a />', {
|
||||||
id: value['id'],
|
id: value['id'],
|
||||||
class: 'saga line',
|
class: 'saga line',
|
||||||
href: '.?saga='+value['id'],
|
href: '.?saga='+value['id'],
|
||||||
});
|
});
|
||||||
|
|
||||||
saga.appendTo('#research');
|
saga.appendTo('#research');
|
||||||
|
|
||||||
var title = $('<div />', {
|
var title = $('<div />', {
|
||||||
html: value['name'],
|
html: value['name'],
|
||||||
class: 'title',
|
class: 'title',
|
||||||
});
|
});
|
||||||
title.appendTo(saga);
|
title.appendTo(saga);
|
||||||
|
|
||||||
var image = $('<img />', {
|
var image = $('<img />', {
|
||||||
src: value['poster_path'],
|
src: value['poster_path'],
|
||||||
class: 'thumbnail',
|
class: 'thumbnail',
|
||||||
});
|
});
|
||||||
image.prependTo(saga);
|
image.prependTo(saga);
|
||||||
});
|
});
|
||||||
$.each(sc_movie, function(key, value) {
|
$.each(sc_movie, function(key, value) {
|
||||||
var movie = $('<a />', {
|
var movie = $('<a />', {
|
||||||
id: value['id'],
|
id: value['id'],
|
||||||
class: 'movie line',
|
class: 'movie line',
|
||||||
href: '.?movie='+value['id'],
|
href: '.?movie='+value['id'],
|
||||||
});
|
});
|
||||||
|
|
||||||
movie.appendTo('#research');
|
movie.appendTo('#research');
|
||||||
|
|
||||||
var title = $('<div />', {
|
var title = $('<div />', {
|
||||||
html: value['title'],
|
html: value['title'],
|
||||||
class: 'title',
|
class: 'title',
|
||||||
});
|
});
|
||||||
title.appendTo(movie);
|
title.appendTo(movie);
|
||||||
|
|
||||||
var original_title = $('<div />', {
|
var original_title = $('<div />', {
|
||||||
html: value['original_title'],
|
html: value['original_title'],
|
||||||
class: 'original_title',
|
class: 'original_title',
|
||||||
});
|
});
|
||||||
original_title.appendTo(movie);
|
original_title.appendTo(movie);
|
||||||
|
|
||||||
var image = $('<img />', {
|
var image = $('<img />', {
|
||||||
src: value['poster_path'],
|
src: value['poster_path'],
|
||||||
class: 'thumbnail',
|
class: 'thumbnail',
|
||||||
});
|
});
|
||||||
image.prependTo(movie);
|
image.prependTo(movie);
|
||||||
});
|
});
|
||||||
//$('#research').html(data.toString());
|
//$('#research').html(data.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
function FileInfo(data) {
|
function FileInfo(data) {
|
||||||
|
|
||||||
duree_movie = parseInt(data.format.duration)*1000;
|
duree_movie = parseInt(data.format.duration)*1000;
|
||||||
|
|
||||||
$('#movieDetails #spec p > span#release_date').after('<span id="duration">Durée : ' + data.format.duration.toHHMMSS() + '</span><br>');
|
$('#movieDetails #spec p > span#release_date').after('<span id="duration">Durée : ' + data.format.duration.toHHMMSS() + '</span><br>');
|
||||||
|
|
||||||
$('#movieDetails #spec p > span#original_title').after('<span id="title">Titre du media : ' + data.format.title + '</span><br>');
|
$('#movieDetails #spec p > span#original_title').after('<span id="title">Titre du media : ' + data.format.title + '</span><br>');
|
||||||
|
|
||||||
var selection = $('#selection');
|
var selection = $('#selection');
|
||||||
var AV = $('#AV');
|
var AV = $('#AV');
|
||||||
var subtitle_list = $('#subtitle_list');
|
var subtitle_list = $('#subtitle_list');
|
||||||
|
|
||||||
AV.append('Choose Video(s) :<br>');
|
AV.append('Choose Video(s) :<br>');
|
||||||
$.each(data.video, function(key, video) {
|
$.each(data.video, function(key, video) {
|
||||||
|
|
||||||
var title, language, label;
|
var title, language, label;
|
||||||
if('title' in video)
|
if('title' in video)
|
||||||
title = video.title;
|
title = video.title;
|
||||||
else
|
else
|
||||||
title = 'No title';
|
title = 'No title';
|
||||||
if('language' in video)
|
if('language' in video)
|
||||||
language = video.language;
|
language = video.language;
|
||||||
else
|
else
|
||||||
language = 'und';
|
language = 'und';
|
||||||
label = title + ' [' + language + '] ' + video.codec_name + ' ' + video.display_aspect_ratio + ' ' + video.width + 'x' + video.height;
|
label = title + ' [' + language + '] ' + video.codec_name + ' ' + video.display_aspect_ratio + ' ' + video.width + 'x' + video.height;
|
||||||
|
|
||||||
if(video.forced == 1)
|
if(video.forced == 1)
|
||||||
label = label + ' [forced]';
|
label = label + ' [forced]';
|
||||||
if(video.default == 1)
|
if(video.default == 1)
|
||||||
label = label + ' [def]';
|
label = label + ' [def]';
|
||||||
|
|
||||||
AV.append('<input id="' + key + '" type="checkbox"><label for="' + key + '">' + label + '</label><br>');
|
AV.append('<input id="' + key + '" type="checkbox"><label for="' + key + '">' + label + '</label><br>');
|
||||||
});
|
});
|
||||||
|
|
||||||
AV.append('<br>Choose Audio(s) :<br>');
|
AV.append('<br>Choose Audio(s) :<br>');
|
||||||
$.each(data.audio, function(key, audio) {
|
$.each(data.audio, function(key, audio) {
|
||||||
|
|
||||||
var title, language, label;
|
var title, language, label;
|
||||||
if('title' in audio)
|
if('title' in audio)
|
||||||
title = audio.title;
|
title = audio.title;
|
||||||
else
|
else
|
||||||
title = 'No title';
|
title = 'No title';
|
||||||
if('language' in audio)
|
if('language' in audio)
|
||||||
language = audio.language;
|
language = audio.language;
|
||||||
else
|
else
|
||||||
language = 'und';
|
language = 'und';
|
||||||
|
|
||||||
label = title + ' [' + language + '] ' + audio.codec_name + ' ' + audio.channel_layout;
|
label = title + ' [' + language + '] ' + audio.codec_name + ' ' + audio.channel_layout;
|
||||||
if(audio.forced == 1)
|
if(audio.forced == 1)
|
||||||
label = label + ' [forced]';
|
label = label + ' [forced]';
|
||||||
if(audio.default == 1)
|
if(audio.default == 1)
|
||||||
label = label + ' [def]';
|
label = label + ' [def]';
|
||||||
|
|
||||||
AV.append('<input id="' + key + '" type="checkbox"><label for="' + key + '">' + label + '</label><br>');
|
AV.append('<input id="' + key + '" type="checkbox"><label for="' + key + '">' + label + '</label><br>');
|
||||||
});
|
});
|
||||||
|
|
||||||
AV.append('<br><input id="convert" type="submit" name="convert">');
|
AV.append('<br><input id="convert" type="submit" name="convert">');
|
||||||
|
|
||||||
if (data.hasOwnProperty("subtitle")) {
|
if (data.hasOwnProperty("subtitle")) {
|
||||||
subtitle_list.append('Liste Subtitle :<br>');
|
subtitle_list.append('Liste Subtitle :<br>');
|
||||||
$.each(data.subtitle, function(key, subtitle) {
|
$.each(data.subtitle, function(key, subtitle) {
|
||||||
|
|
||||||
var title, language, label;
|
var title, language, label;
|
||||||
if('title' in subtitle)
|
if('title' in subtitle)
|
||||||
title = subtitle.title;
|
title = subtitle.title;
|
||||||
else
|
else
|
||||||
title = 'No title';
|
title = 'No title';
|
||||||
if('language' in subtitle)
|
if('language' in subtitle)
|
||||||
language = subtitle.language;
|
language = subtitle.language;
|
||||||
else
|
else
|
||||||
language = 'und';
|
language = 'und';
|
||||||
|
|
||||||
label = title + ' [' + language + '] ' + subtitle.codec_name;
|
label = title + ' [' + language + '] ' + subtitle.codec_name;
|
||||||
if(subtitle.forced == 1)
|
if(subtitle.forced == 1)
|
||||||
label = label + ' [forced]';
|
label = label + ' [forced]';
|
||||||
if(subtitle.default == 1)
|
if(subtitle.default == 1)
|
||||||
label = label + ' [def]';
|
label = label + ' [def]';
|
||||||
|
|
||||||
|
|
||||||
subtitle_list.append(label + '<br>');
|
subtitle_list.append(label + '<br>');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function Horloge() {
|
function Horloge() {
|
||||||
var laDate = new Date();
|
var laDate = new Date();
|
||||||
|
|
||||||
if (typeof duree_movie !== 'undefined') {
|
if (typeof duree_movie !== 'undefined') {
|
||||||
var seg = laDate.getTime();
|
var seg = laDate.getTime();
|
||||||
var heure_fin = seg + duree_movie;
|
var heure_fin = seg + duree_movie;
|
||||||
heure_fin = new Date(heure_fin);
|
heure_fin = new Date(heure_fin);
|
||||||
heure_fin = heure_fin.getHours() + ":" + ("0" + heure_fin.getMinutes()).slice(-2);
|
heure_fin = heure_fin.getHours() + ":" + ("0" + heure_fin.getMinutes()).slice(-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//var h = laDate.getHours() + ":" + ("0" + laDate.getMinutes()).slice(-2) + ":" + ("0" + laDate.getSeconds()).slice(-2);
|
//var h = laDate.getHours() + ":" + ("0" + laDate.getMinutes()).slice(-2) + ":" + ("0" + laDate.getSeconds()).slice(-2);
|
||||||
var h = laDate.getHours() + ":" + ("0" + laDate.getMinutes()).slice(-2);
|
var h = laDate.getHours() + ":" + ("0" + laDate.getMinutes()).slice(-2);
|
||||||
var temps = 'Heure : ' + h + ' Heure de Fin : ' + heure_fin;
|
var temps = 'Heure : ' + h + ' Heure de Fin : ' + heure_fin;
|
||||||
$('#heure').text(temps);
|
$('#heure').text(temps);
|
||||||
};
|
};
|
||||||
|
|
||||||
function goBack() {
|
function goBack() {
|
||||||
if (document.referrer.split('/')[2] == location.host)
|
if (document.referrer.split('/')[2] == location.host)
|
||||||
window.history.back();
|
window.history.back();
|
||||||
};
|
};
|
||||||
|
|
||||||
String.prototype.toHHMMSS = function () {
|
String.prototype.toHHMMSS = function () {
|
||||||
var sec_num = parseInt(this, 10); // don't forget the second param
|
var sec_num = parseInt(this, 10); // don't forget the second param
|
||||||
var hours = Math.floor(sec_num / 3600);
|
var hours = Math.floor(sec_num / 3600);
|
||||||
var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
|
var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
|
||||||
var seconds = sec_num - (hours * 3600) - (minutes * 60);
|
var seconds = sec_num - (hours * 3600) - (minutes * 60);
|
||||||
var total = '';
|
var total = '';
|
||||||
|
|
||||||
if (hours > 0) {
|
if (hours > 0) {
|
||||||
total = hours + " Heure"
|
total = hours + " Heure"
|
||||||
if (hours > 1)
|
if (hours > 1)
|
||||||
total = total + 's'
|
total = total + 's'
|
||||||
}
|
}
|
||||||
if (minutes > 0) {
|
if (minutes > 0) {
|
||||||
total = total + ' ' + minutes + " Minute"
|
total = total + ' ' + minutes + " Minute"
|
||||||
if (minutes > 1)
|
if (minutes > 1)
|
||||||
total = total + 's'
|
total = total + 's'
|
||||||
}
|
}
|
||||||
if (seconds > 0) {
|
if (seconds > 0) {
|
||||||
total = total + ' ' + seconds + " Seconde"
|
total = total + ' ' + seconds + " Seconde"
|
||||||
if (seconds > 1)
|
if (seconds > 1)
|
||||||
total = total + 's'
|
total = total + 's'
|
||||||
}
|
}
|
||||||
|
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
190
js/script.js
190
js/script.js
@ -1,95 +1,95 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
if (typeof movies_list !== 'undefined') {
|
if (typeof movies_list !== 'undefined') {
|
||||||
ShowMovies(movies_list);
|
ShowMovies(movies_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (typeof movie_detail !== 'undefined') {
|
else if (typeof movie_detail !== 'undefined') {
|
||||||
MovieDetails(movie_detail);
|
MovieDetails(movie_detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (typeof saga_list !== 'undefined') {
|
else if (typeof saga_list !== 'undefined') {
|
||||||
$('#back').hide();
|
$('#back').hide();
|
||||||
ShowSagas(saga_list);
|
ShowSagas(saga_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof file_info !== 'undefined') {
|
if (typeof file_info !== 'undefined') {
|
||||||
FileInfo(file_info);
|
FileInfo(file_info);
|
||||||
Horloge();
|
Horloge();
|
||||||
setInterval(Horloge, 1000);
|
setInterval(Horloge, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.referrer.split('/')[2] !== location.host)
|
if (document.referrer.split('/')[2] !== location.host)
|
||||||
$('#back').hide();
|
$('#back').hide();
|
||||||
|
|
||||||
$("#search").on('keyup', function (e) {
|
$("#search").on('keyup', function (e) {
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
|
|
||||||
var sc_saga = [];
|
var sc_saga = [];
|
||||||
var sc_movie = [];
|
var sc_movie = [];
|
||||||
var search = $("#search").val();
|
var search = $("#search").val();
|
||||||
console.log(search);
|
console.log(search);
|
||||||
$.each(saga_list, function(index, value) {
|
$.each(saga_list, function(index, value) {
|
||||||
if (value.name.toLowerCase().includes(search.toLowerCase())) {
|
if (value.name.toLowerCase().includes(search.toLowerCase())) {
|
||||||
if(! sc_saga.includes(value)){ sc_saga.push(value);}
|
if(! sc_saga.includes(value)){ sc_saga.push(value);}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$.each(movies_full_list, function(index, value) {
|
$.each(movies_full_list, function(index, value) {
|
||||||
if (value.title.toLowerCase().includes(search.toLowerCase())) {
|
if (value.title.toLowerCase().includes(search.toLowerCase())) {
|
||||||
if(! sc_movie.includes(value)){ sc_movie.push(value);}
|
if(! sc_movie.includes(value)){ sc_movie.push(value);}
|
||||||
}
|
}
|
||||||
if (value.original_title.toLowerCase().includes(search.toLowerCase())) {
|
if (value.original_title.toLowerCase().includes(search.toLowerCase())) {
|
||||||
if(! sc_movie.includes(value)){ sc_movie.push(value);}
|
if(! sc_movie.includes(value)){ sc_movie.push(value);}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ShowSearch(sc_saga, sc_movie);
|
ShowSearch(sc_saga, sc_movie);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.fa-list').click(function() {
|
$('.fa-list').click(function() {
|
||||||
var lien = $('.saga, .movie');
|
var lien = $('.saga, .movie');
|
||||||
var title = $('.saga > .title, .movie > .title');
|
var title = $('.saga > .title, .movie > .title');
|
||||||
var original_title = $('.movie > .original_title');
|
var original_title = $('.movie > .original_title');
|
||||||
lien.removeClass('box container');
|
lien.removeClass('box container');
|
||||||
lien.addClass('line');
|
lien.addClass('line');
|
||||||
title.removeClass('centered');
|
title.removeClass('centered');
|
||||||
original_title.show();
|
original_title.show();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.fa-th').click(function() {
|
$('.fa-th').click(function() {
|
||||||
var lien = $('.saga, .movie');
|
var lien = $('.saga, .movie');
|
||||||
var title = $('.saga > .title, .movie > .title');
|
var title = $('.saga > .title, .movie > .title');
|
||||||
var original_title = $('.movie > .original_title');
|
var original_title = $('.movie > .original_title');
|
||||||
lien.removeClass('line');
|
lien.removeClass('line');
|
||||||
lien.addClass('box container');
|
lien.addClass('box container');
|
||||||
title.addClass('centered');
|
title.addClass('centered');
|
||||||
original_title.hide();
|
original_title.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.fa-clipboard-list').click(function() {
|
$('.fa-clipboard-list').click(function() {
|
||||||
//var copyText = $('#dl > a').attr('href');
|
//var copyText = $('#dl > a').attr('href');
|
||||||
var copyText = $(this).prev().attr('href');
|
var copyText = $(this).prev().attr('href');
|
||||||
|
|
||||||
var temp = $("<input>");
|
var temp = $("<input>");
|
||||||
$("body").append(temp);
|
$("body").append(temp);
|
||||||
temp.val(location.origin + location.pathname + copyText).select();
|
temp.val(location.origin + location.pathname + copyText).select();
|
||||||
//temp.setSelectionRange(0, 99999);
|
//temp.setSelectionRange(0, 99999);
|
||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
temp.remove();
|
temp.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#convert').click(function() {
|
$('#convert').click(function() {
|
||||||
var stream = [];
|
var stream = [];
|
||||||
$('#AV > input[type=checkbox]').each(function() {
|
$('#AV > input[type=checkbox]').each(function() {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var state = $(this).prop('checked');
|
var state = $(this).prop('checked');
|
||||||
if (state)
|
if (state)
|
||||||
stream.push(id);
|
stream.push(id);
|
||||||
});
|
});
|
||||||
if (stream.length > 0)
|
if (stream.length > 0)
|
||||||
alert(stream);
|
alert(stream);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
426
style/style.css
426
style/style.css
@ -1,211 +1,215 @@
|
|||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.centered {
|
.centered {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 20px;
|
bottom: 20px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.container:hover > .centered {
|
.container:hover > .centered {
|
||||||
display: block;
|
display: block;
|
||||||
background-color:rgba(37, 34, 34, 0.6);
|
background-color:rgba(37, 34, 34, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nosaga.button {
|
.nosaga.button {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#movieDetails {
|
#movieDetails {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
#cover {
|
#cover {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
//background-color: green;
|
//background-color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
#spec {
|
#spec {
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
//background-color: red;
|
//background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
#selection {
|
#selection {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
#AV {
|
#AV {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
//background-color: green;
|
//background-color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
#subtitle_list {
|
#subtitle_list {
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
//background-color: red;
|
//background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.button {
|
a.button {
|
||||||
background-color: #222426;
|
background-color: #222426;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
//border: 2px solid;
|
//border: 2px solid;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
color: #10a2ff;
|
color: #10a2ff;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 16px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;
|
box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 16px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.button:hover {
|
a.button:hover {
|
||||||
box-shadow: 0 0 6px rgb(35 173 255);
|
box-shadow: 0 0 6px rgb(35 173 255);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.button.box {
|
a.button.box {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 1em 1.5em;
|
padding: 1em 1.5em;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 229px;
|
height: 229px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.button.line {
|
a.button.line {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.line > .title {
|
a.line > .title {
|
||||||
margin-left: 200px;
|
margin-left: 200px;
|
||||||
width: 600px;
|
width: 600px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.line > .original_title {
|
a.line > .original_title {
|
||||||
margin-left: 100px;
|
margin-left: 100px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.line > img {
|
a.line > img {
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle {
|
.toggle {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border-bottom: 2px solid;
|
border-bottom: 2px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa {
|
.fa {
|
||||||
transition: transform .2s;
|
transition: transform .2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa-chevron-right.active {
|
.fa-chevron-right.active {
|
||||||
transform: rotateZ(90deg);
|
transform: rotateZ(90deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa-chevron-down.active {
|
.fa-chevron-down.active {
|
||||||
transform: rotateZ(-90deg);
|
transform: rotateZ(-90deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa-clipboard-list {
|
.fa-clipboard-list {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overview {
|
.overview {
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked + label {
|
input:checked + label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="checkbox"] {
|
input[type="checkbox"] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -9999px;
|
left: -9999px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label:hover, input:focus + label {
|
label:hover, input:focus + label {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
box-shadow: 0 0 20px rgba(0, 0, 0, .6);
|
box-shadow: 0 0 20px rgba(0, 0, 0, .6);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: #181A1B;
|
background-color: #181A1B;
|
||||||
filter: brightness(1);
|
filter: brightness(1);
|
||||||
filter: contrast(1);
|
filter: contrast(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #262A2B;
|
background-color: #262A2B;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
padding: 5px 60px;
|
padding: 5px 60px 5px 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar > * {
|
.navbar > .fa-arrow-left {
|
||||||
font-size: 17px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar > a,
|
.navbar > * {
|
||||||
.navbar > i {
|
font-size: 17px;
|
||||||
margin: 0 6px;
|
}
|
||||||
padding: 8px 8px;
|
|
||||||
text-decoration: none;
|
.navbar > a,
|
||||||
color: #f2f2f2;
|
.navbar > i {
|
||||||
cursor: pointer;
|
margin: 0 6px;
|
||||||
}
|
padding: 8px 8px;
|
||||||
|
text-decoration: none;
|
||||||
.navbar > input[type=text] {
|
color: #f2f2f2;
|
||||||
margin-left: auto;
|
cursor: pointer;
|
||||||
margin-right: 20px;
|
}
|
||||||
}
|
|
||||||
|
.navbar > input[type=text] {
|
||||||
.navbar > a:hover,
|
margin-left: auto;
|
||||||
.navbar > i:hover {
|
margin-right: 20px;
|
||||||
background: #ddd;
|
}
|
||||||
color: black;
|
|
||||||
}
|
.navbar > a:hover,
|
||||||
|
.navbar > i:hover {
|
||||||
.main {
|
background: #ddd;
|
||||||
padding: 0;
|
color: black;
|
||||||
margin: 16px;
|
}
|
||||||
color: #E8E6E3;
|
|
||||||
}
|
.main {
|
||||||
|
padding: 0;
|
||||||
|
margin: 16px;
|
||||||
|
color: #E8E6E3;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user