webui: include tmdb link in search results (#13196)

This commit is contained in:
Diego Heras
2022-04-24 21:28:25 +02:00
committed by GitHub
parent 86530ba35f
commit f9aa3c4d7b
5 changed files with 21 additions and 8 deletions

View File

@@ -301,6 +301,10 @@ table td.fit{
background-color: #d0ab44; background-color: #d0ab44;
} }
.label-tmdb {
background-color: #86cca8;
}
.tooltip { .tooltip {
pointer-events: none; pointer-events: none;
} }

View File

@@ -970,6 +970,7 @@ function updateReleasesRow(row) {
var labels = $(row).find("span.release-labels"); var labels = $(row).find("span.release-labels");
var TitleLink = $(row).find("td.Title > a"); var TitleLink = $(row).find("td.Title > a");
var IMDBId = $(row).data("imdb"); var IMDBId = $(row).data("imdb");
var TMDBId = $(row).data("tmdb");
var Poster = $(row).data("poster"); var Poster = $(row).data("poster");
var Description = $(row).data("description"); var Description = $(row).data("description");
var DownloadVolumeFactor = parseFloat($(row).find("td.DownloadVolumeFactor").html()); var DownloadVolumeFactor = parseFloat($(row).find("td.DownloadVolumeFactor").html());
@@ -992,11 +993,15 @@ function updateReleasesRow(row) {
labels.empty(); labels.empty();
if (IMDBId) { if (IMDBId) {
var imdbLen = (IMDBId.toString().length > 7) ? 8 : 7; var imdbLen = (IMDBId.toString().length > 7) ? 8 : 7;
labels.append('\n<a href="https://www.imdb.com/title/tt' + ("00000000" + IMDBId).slice(-imdbLen) + '/" target="_blank" class="label label-imdb" alt="IMDB" title="IMDB">IMDB</a>'); labels.append('\n<a href="https://www.imdb.com/title/tt' + ("00000000" + IMDBId).slice(-imdbLen) + '/" target="_blank" class="label label-imdb" alt="IMDB" title="IMDB">IMDB</a>');
} }
if (TMDBId && TMDBId > 0) {
labels.append('\n<a href="https://www.themoviedb.org/movie/' + TMDBId + '" target="_blank" class="label label-tmdb" alt="TMDB" title="TMDB">TMDB</a>');
}
if (!isNaN(DownloadVolumeFactor)) { if (!isNaN(DownloadVolumeFactor)) {
if (DownloadVolumeFactor == 0) { if (DownloadVolumeFactor == 0) {
labels.append('\n<span class="label label-success">FREELEECH</span>'); labels.append('\n<span class="label label-success">FREELEECH</span>');

View File

@@ -284,6 +284,10 @@ table td.fit{
background-color: #d0ab44; background-color: #d0ab44;
} }
.label-tmdb {
background-color: #86cca8;
}
.tooltip { .tooltip {
pointer-events: none; pointer-events: none;
} }

View File

@@ -28,8 +28,8 @@
<link rel="stylesheet" type="text/css" href="../bootstrap/bootstrap.min.css?changed=2017083001"> <link rel="stylesheet" type="text/css" href="../bootstrap/bootstrap.min.css?changed=2017083001">
<link rel="stylesheet" type="text/css" href="../animate.css?changed=2017083001"> <link rel="stylesheet" type="text/css" href="../animate.css?changed=2017083001">
<link rel="stylesheet" type="text/css" href="../css/tagify.css?changed=11662"> <link rel="stylesheet" type="text/css" href="../css/tagify.css?changed=11662">
<link rel="stylesheet" type="text/css" href="../custom.css?changed=20220123" media="only screen and (min-device-width: 480px)"> <link rel="stylesheet" type="text/css" href="../custom.css?changed=202204222" media="only screen and (min-device-width: 480px)">
<link rel="stylesheet" type="text/css" href="../custom_mobile.css?changed=20220123" media="only screen and (max-device-width: 480px)"> <link rel="stylesheet" type="text/css" href="../custom_mobile.css?changed=202204222" media="only screen and (max-device-width: 480px)">
<link rel="stylesheet" type="text/css" href="../css/jquery.dataTables.min.css?changed=2017083001"> <link rel="stylesheet" type="text/css" href="../css/jquery.dataTables.min.css?changed=2017083001">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-multiselect.css?changed=2017083001" /> <link rel="stylesheet" type="text/css" href="../css/bootstrap-multiselect.css?changed=2017083001" />
<link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css?changed=2017083001"> <link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css?changed=2017083001">
@@ -454,7 +454,7 @@
</thead> </thead>
<tbody> <tbody>
{{#each releases}} {{#each releases}}
<tr class="jackett-releases-row" data-imdb="{{Imdb}}" data-poster="{{Poster}}" data-description="{{Description}}"> <tr class="jackett-releases-row" data-imdb="{{Imdb}}" data-tmdb="{{TMDb}}" data-poster="{{Poster}}" data-description="{{Description}}">
<td class="fit">{{PublishDate}}</td> <td class="fit">{{PublishDate}}</td>
<td class="fit">{{FirstSeen}}</td> <td class="fit">{{FirstSeen}}</td>
<td class="fit">{{jacketTimespan PublishDate}}</td> <td class="fit">{{jacketTimespan PublishDate}}</td>
@@ -582,7 +582,7 @@
</thead> </thead>
<tbody> <tbody>
{{#each Results}} {{#each Results}}
<tr class="jackett-search-results-row" data-imdb="{{Imdb}}" data-poster="{{Poster}}" data-description="{{Description}}"> <tr class="jackett-search-results-row" data-imdb="{{Imdb}}" data-tmdb="{{TMDb}}" data-poster="{{Poster}}" data-description="{{Description}}">
<td>{{PublishDate}}</td> <td>{{PublishDate}}</td>
<td>{{jacketTimespan PublishDate}}</td> <td>{{jacketTimespan PublishDate}}</td>
<td>{{Tracker}}</td> <td>{{Tracker}}</td>
@@ -750,6 +750,6 @@
</script> </script>
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script> <script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
<script type="text/javascript" src="../custom.js?changed=20220424"></script> <script type="text/javascript" src="../custom.js?changed=202204222"></script>
</body> </body>
</html> </html>

View File

@@ -16,7 +16,7 @@
<link href="../bootstrap/bootstrap.min.css" rel="stylesheet"> <link href="../bootstrap/bootstrap.min.css" rel="stylesheet">
<link href="../animate.css" rel="stylesheet"> <link href="../animate.css" rel="stylesheet">
<link href="../custom.css?changed=20220123" rel="stylesheet"> <link href="../custom.css?changed=202204222" rel="stylesheet">
<title>Jackett</title> <title>Jackett</title>
</head> </head>