This commit is contained in:
lukas 2020-06-08 19:54:20 +02:00
parent 3402c7fa3b
commit 46be02f912
3 changed files with 5 additions and 14 deletions

View File

@ -36,6 +36,10 @@ foreach ($arr as $elem) {
$pic = file_get_contents($tmdb->picturebase . $dta->poster_path); $pic = file_get_contents($tmdb->picturebase . $dta->poster_path);
$poster = shell_exec("ffmpeg -hide_banner -loglevel panic -ss 00:04:00 -i \"../videos/prn/$elem\" -vframes 1 -q:v 2 -f singlejpeg pipe:1 2>/dev/null"); $poster = shell_exec("ffmpeg -hide_banner -loglevel panic -ss 00:04:00 -i \"../videos/prn/$elem\" -vframes 1 -q:v 2 -f singlejpeg pipe:1 2>/dev/null");
if($pic == null){
// todo error handling for errored tmdb query
}
$genres = $dta->genre_ids; $genres = $dta->genre_ids;
} else { } else {
echo "nothing found with TMDB!\n"; echo "nothing found with TMDB!\n";

View File

@ -69,7 +69,7 @@ if (isset($_POST['action'])) {
$arr["movie_id"] = $row["movie_id"]; $arr["movie_id"] = $row["movie_id"];
$arr["movie_name"] = $row["movie_name"]; $arr["movie_name"] = $row["movie_name"];
$arr["movie_url"] = $row["movie_url"]; $arr["movie_url"] = str_replace("?","%3F",$row["movie_url"]);
$arr["likes"] = $row["likes"]; $arr["likes"] = $row["likes"];
$arr["quality"] = $row["quality"]; $arr["quality"] = $row["quality"];
$arr["length"] = $row["length"]; $arr["length"] = $row["length"];

View File

@ -9,19 +9,6 @@ class NewTagPopup extends React.Component {
this.props = props; this.props = props;
} }
componentDidMount() {
const updateRequest = new FormData();
updateRequest.append('action', 'getAllTags');
fetch('/api/videoload.php', {method: 'POST', body: updateRequest})
.then((response) => response.json())
.then((result) => {
this.setState({
items: result
});
});
}
render() { render() {
return ( return (
<> <>