Hello I finally found the mode, but on v3, at home it is not in the sql table once uploaded, thank you for helping me to make it work correctly.
SQL:
SQL UPDATE 12-05-20121 BY MicroMonkey
In the cache folder you will create a folder with the torrent name and you will create in the torrent folder two other folder with the name of the movie and series
Example of the path: /cache/torrent/film
Example of the path: /cache/torrent/serie
Do the same in the uploads / images folder :
Example of the path: upload/images/tmdb/film
Example of the path: upload/images/tmdb/serie
Add the folder named tmdb to the root of the site.
Add at the end of backend/functions.php this line:
In torrents-upload.php search:
and add :
search:
And add:
Example:
Search ;
Add after :
In torrents-edit.php look for :
Add before :
Search :
Add before :
In torrents-detail.php look for:
Add :
Search :L
Add after :
Line:
You must add the number in the case and not all the url link from TMDB.com

Example : 399566
For Url: https://www.themoviedb.org/movie/399566-godzilla-vs-kong
You must register on TMDB to get your key api
Your api key to add the tmdb / configuration / all.php and default.phpfile
~ Make sure to set all cache folders 777 .
Download the tmdb file here
Update by SLy 12-05-2021
- modules/traitement_film.
- modules/traitement_serie.php
SQL:
CREATE TABLE `filmothequemdb` (
`id` int(10) UNSIGNED NOT NULL,
`id_tmdb` int(10) NOT NULL,
`titre` varchar(255) CHARACTER SET utf8 NOT NULL,
`duree` varchar(100) CHARACTER SET utf8 NOT NULL,
`producteur` varchar(255) CHARACTER SET utf8 NOT NULL,
`genre` varchar(255) CHARACTER SET utf8 NOT NULL,
`resume` text CHARACTER SET utf8 NOT NULL,
`acteur` text CHARACTER SET utf8 NOT NULL,
`ba` varchar(100) CHARACTER SET utf8 NOT NULL,
`date` varchar(15) CHARACTER SET utf8 NOT NULL,
`image` varchar(50) CHARACTER SET utf8 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE `seriethequemdb` (
`id` int(10) UNSIGNED NOT NULL,
`id_tmdb` int(10) NOT NULL,
`titre` varchar(255) CHARACTER SET utf8 NOT NULL,
`image` varchar(50) CHARACTER SET utf8 NOT NULL,
`saison` int(10) NOT NULL,
`episodes` int(10) NOT NULL,
`statut` varchar(100) CHARACTER SET utf8 NOT NULL,
`date` varchar(15) CHARACTER SET utf8 NOT NULL,
`createur` varchar(255) CHARACTER SET utf8 NOT NULL,
`genre` varchar(255) CHARACTER SET utf8 NOT NULL,
`resume` text CHARACTER SET utf8 NOT NULL,
`acteur` text CHARACTER SET utf32 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
ALTER TABLE torrents ADD `tmdb` varchar(125) CHARACTER SET utf8 NOT NULL;
SQL UPDATE 12-05-20121 BY MicroMonkey
In the cache folder you will create a folder with the torrent name and you will create in the torrent folder two other folder with the name of the movie and series
Example of the path: /cache/torrent/film
Example of the path: /cache/torrent/serie
Do the same in the uploads / images folder :
Example of the path: upload/images/tmdb/film
Example of the path: upload/images/tmdb/serie
Add the folder named tmdb to the root of the site.
Add at the end of backend/functions.php this line:
// TMDB
function duree_sec($time) {
$tabTemps = array("jours" => 86400,"h." => 3600,"min." => 60);
$result = "";
foreach($tabTemps as $uniteTemps => $nombreSecondesDansUnite)
{
$$uniteTemps = floor($time/$nombreSecondesDansUnite);
$time = $time%$nombreSecondesDansUnite;
if($$uniteTemps > 0 || !empty($result))
$result .= $$uniteTemps." $uniteTemps ";
}
return $result;
}
// Fonction qui calcule les Heures Minutes d'une duree en sec'
function duree($time){
$tabTemps = array("jours" => 86400,"h." => 60,"min." => 1);
$result = "";
foreach($tabTemps as $uniteTemps => $nombreSecondesDansUnite){
$$uniteTemps = floor($time/$nombreSecondesDansUnite);
$time = $time%$nombreSecondesDansUnite;
if($$uniteTemps > 0 || !empty($result))
$result .= $$uniteTemps." $uniteTemps ";
}
return $result;
}
// End TMDBIn torrents-upload.php search:
,last_actionand add :
,tmdbsearch:
, '".get_date_time()."And add:
', ".sqlesc($tmdb)."Example:
$ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, tube, freeleech, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, uplreq, last_action, tmdb) VALUES (".sqlesc($fname).", '".$CURUSER['id']."', ".sqlesc($name).", ".sqlesc(str_replace("http:", "https:", $descr)).", '".$inames[0]."', '".$inames[1]."', '".$catid."', '".$tube."', '".$freeleech."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."','$anon', '$uplreq', '".get_date_time()."', ".sqlesc($tmdb).")");
Search ;
print ("<tr><td class='table_col1' align='right'>" . T_("TORRENT_NAME") . ": </td><td class='table_col2' align='left'><input type='text' name='name' size='60' value='" . $_POST['name'] . "' /><br/>".T_("THIS_WILL_BE_TAKEN_TORRENT")." \n</td></tr>");Add after :
// TMDB
print ("<tr><td class='table_col1' align='right' width='180'><b>".T_("TMDB_URL").": </b></td><td class='table_col2' ><input type='text' 'name='tmdb' size='60' value='".htmlspecialchars($row['tmdb'])."' /> <a href='https://www.themoviedb.org/' target='_blank'><img border='0' src='images/Torrents/tmdb.png' width='82' height='33' title='Dirigez-vous sur TMDb' style='vertical-align: middle;'></a><br /><i>".T_("FORMAT").": </i> <span style='color:IndianRed; font-size: 15px;'><b>Seulement ajouter le nombre a la fin de url, exemple: 60735 </b></span><br/></td></tr>"); In torrents-edit.php look for :
//update images
$img1action = $_POST['img1action'];
if ($img1action == "update")
$updateset[] = "image1 = " .sqlesc(uploadimage(0, $row["image1"], $id));
if ($img1action == "delete") {
if ($row[image1]) {
$del = unlink($site_config["torrent_dir"]."/images/$row[image1]");
$updateset[] = "image1 = ''";
}
}Add before :
//TMDB
if ( $_POST['tmdb'] != $row['tmdb']){
$updateset[] = "tmdb = " . sqlesc($_POST["tmdb"]);
$TTCache->Delete("tmdb/$id"); // A verifier le fonction
} Search :
echo "<tr><td class='table_col1' align='right'><b>".T_("LANG").": </b></td><td class='table_col2'>".$langdropdown."</td></tr>";Add before :
print ("<tr><td class='table_col1' align='right' width='180'><b>".T_("TMDB_URL").": </b></td><td class='table_col2' ><input type='text' 'name='tmdb' size='60' value='".htmlspecialchars($row['tmdb'])."' /> <a href='https://www.themoviedb.org/' target='_blank'><img border='0' src='images/Torrents/tmdb.png' width='82' height='33' title='Dirigez-vous sur TMDb' style='vertical-align: middle;'></a><br /><i>".T_("FORMAT").": </i> <span style='color:#FF0000; font-size: 15px;'><b>Seulement ajouter le nombre a la fin de url, exemple: 60735 </b></span><br/></td></tr>");In torrents-detail.php look for:
torrents.freeleech,Add :
torrents.tmdb,Search :L
echo "</div></td></tr></table></center><br /><br />";
//end download boxAdd after :
echo "<fieldset class='download'>";
echo "<table cellpadding='3' border='0' width='100%'>";
//print("<tr><td align='left'><b>".T_("NAME").":</b></td><td>" . $shortname . "</td></tr>\n"); Fonction deplacer dans l include et modifié
//---------------------------------------------------------------TMDB -------------------------------------------------------
if(!empty($row["tmdb"]) && $row["cat_parent"] == 'Movies' ){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("filmothequemdb"," WHERE id_tmdb = ".$id_tmdb."");
if($total >0)
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/traitement_film.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/creation_film.php");
die();
}
}
//inclusion de la partie tmdb série si actif dans le config que l'url de tmdb est enregistree et que la catégorie est série
//attention de specifier le bon nom de la categorie série de votre base de donnée par defaut Séries
/*
elseif(!empty($row["allocine"]) or !empty($row["imdb"]) or !empty($row["tmdb"]) && $row["cat_parent"] == 'Serie TV' ){
*/
elseif(!empty($row["tmdb"]) && $row["cat_parent"] == 'TV' ){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("seriethequemdb"," WHERE id_tmdb = ".$id_tmdb."");
if($total > 0)
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/traitement_serie.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/creation_serie.php");
die();
}
}
//else // si pas de lien TMDB
/////END description
//print ("<tr><td align='center' colspan='2'><b><br /><font size='5'><font color='#95BFC9'> Présentation Manuelle </font></font></b><br /><center> ".format_comment($row["descr"])." </center></td></tr>");
echo "</tr></table></fieldset><br /></div>";
//---------------------------------------------------------------End TMDB -------------------------------------------------------
// Original(Take note that you must change the name of your category according to your category number you have defined on your site.Line:
if(!empty($row["tmdb"]) && $row["cat_parent"] == 'Movies' ){You must add the number in the case and not all the url link from TMDB.com

Example : 399566
For Url: https://www.themoviedb.org/movie/399566-godzilla-vs-kong
You must register on TMDB to get your key api
Your api key to add the tmdb / configuration / all.php and default.phpfile
~ Make sure to set all cache folders 777 .
Download the tmdb file here
Update by SLy 12-05-2021
- modules/traitement_film.
- modules/traitement_serie.php
Last edited by spiritblue on 2021-05-14 08:17:02


