mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
core: add duban to dashboard search results page
This commit is contained in:
@@ -309,6 +309,10 @@ table td.fit{
|
||||
background-color: #86cca8;
|
||||
}
|
||||
|
||||
.label-douban {
|
||||
background-color: #86cc10;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
@@ -973,6 +973,7 @@ function updateReleasesRow(row) {
|
||||
var IMDBId = $(row).data("imdb");
|
||||
var TMDBId = $(row).data("tmdb");
|
||||
var TVDBId = $(row).data("tvdb");
|
||||
var DoubanId = $(row).data("douban");
|
||||
var Poster = $(row).data("poster");
|
||||
var Description = $(row).data("description");
|
||||
var DownloadVolumeFactor = parseFloat($(row).find("td.DownloadVolumeFactor").html());
|
||||
@@ -1010,6 +1011,10 @@ function updateReleasesRow(row) {
|
||||
labels.append('\n<a href="https://thetvdb.com/?tab=series&id=' + TVDBId + '" target="_blank" class="label label-tvdb" alt="TVDB" title="TVDB">TVDB</a>');
|
||||
}
|
||||
|
||||
if (DoubanId && DoubanId > 0) {
|
||||
labels.append('\n<a href="https://movie.douban.com/subject/' + DoubanId + '" target="_blank" class="label label-douban" alt="Douban" title="Douban">Douban</a>');
|
||||
}
|
||||
|
||||
if (!isNaN(DownloadVolumeFactor)) {
|
||||
if (DownloadVolumeFactor == 0) {
|
||||
labels.append('\n<span class="label label-success">FREELEECH</span>');
|
||||
|
@@ -292,6 +292,10 @@ table td.fit{
|
||||
background-color: #86cca8;
|
||||
}
|
||||
|
||||
.label-douban {
|
||||
background-color: #86cc10;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
@@ -28,8 +28,8 @@
|
||||
<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="../css/tagify.css?changed=11662">
|
||||
<link rel="stylesheet" type="text/css" href="../custom.css?changed=202204251" media="only screen and (min-device-width: 480px)">
|
||||
<link rel="stylesheet" type="text/css" href="../custom_mobile.css?changed=202204251" media="only screen and (max-device-width: 480px)">
|
||||
<link rel="stylesheet" type="text/css" href="../custom.css?changed=20220512" media="only screen and (min-device-width: 480px)">
|
||||
<link rel="stylesheet" type="text/css" href="../custom_mobile.css?changed=20220512" 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/bootstrap-multiselect.css?changed=2017083001" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css?changed=2017083001">
|
||||
@@ -458,7 +458,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each releases}}
|
||||
<tr class="jackett-releases-row" data-imdb="{{Imdb}}" data-tmdb="{{TMDb}}" data-tvdb="{{TVDBId}}" data-poster="{{Poster}}" data-description="{{Description}}">
|
||||
<tr class="jackett-releases-row" data-imdb="{{Imdb}}" data-tmdb="{{TMDb}}" data-tvdb="{{TVDBId}}" data-douban="{{DoubanId}}" data-poster="{{Poster}}" data-description="{{Description}}">
|
||||
<td class="fit">{{PublishDate}}</td>
|
||||
<td class="fit">{{FirstSeen}}</td>
|
||||
<td class="fit">{{jacketTimespan PublishDate}}</td>
|
||||
@@ -586,7 +586,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each Results}}
|
||||
<tr class="jackett-search-results-row" data-imdb="{{Imdb}}" data-tmdb="{{TMDb}}" data-tvdb="{{TVDBId}}" data-poster="{{Poster}}" data-description="{{Description}}">
|
||||
<tr class="jackett-search-results-row" data-imdb="{{Imdb}}" data-tmdb="{{TMDb}}" data-tvdb="{{TVDBId}}" data-douban="{{DoubanId}}" data-poster="{{Poster}}" data-description="{{Description}}">
|
||||
<td>{{PublishDate}}</td>
|
||||
<td>{{jacketTimespan PublishDate}}</td>
|
||||
<td>{{Tracker}}</td>
|
||||
@@ -754,6 +754,6 @@
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
|
||||
<script type="text/javascript" src="../custom.js?changed=20220426"></script>
|
||||
<script type="text/javascript" src="../custom.js?changed=20220512"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
<link href="../bootstrap/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../animate.css" rel="stylesheet">
|
||||
<link href="../custom.css?changed=202204251" rel="stylesheet">
|
||||
<link href="../custom.css?changed=20220512" rel="stylesheet">
|
||||
|
||||
<title>Jackett</title>
|
||||
</head>
|
||||
|
@@ -38,7 +38,7 @@ namespace Jackett.Common.Indexers
|
||||
set => base.configData = value;
|
||||
}
|
||||
|
||||
protected readonly string[] OptionalFields = { "imdb", "imdbid", "rageid", "tmdbid", "tvdbid", "poster", "description" };
|
||||
protected readonly string[] OptionalFields = { "imdb", "imdbid", "rageid", "tmdbid", "tvdbid", "poster", "description", "doubanid" };
|
||||
|
||||
private static readonly string[] _SupportedLogicFunctions =
|
||||
{
|
||||
@@ -2030,6 +2030,13 @@ namespace Jackett.Common.Indexers
|
||||
release.TMDb = ParseUtil.CoerceLong(TmdbID);
|
||||
value = release.TMDb.ToString();
|
||||
break;
|
||||
case "doubanid":
|
||||
var DoubanIDRegEx = new Regex(@"(\d+)", RegexOptions.Compiled);
|
||||
var DoubanIDMatch = DoubanIDRegEx.Match(value);
|
||||
var DoubanID = DoubanIDMatch.Groups[1].Value;
|
||||
release.DoubanId = ParseUtil.CoerceLong(DoubanID);
|
||||
value = release.DoubanId.ToString();
|
||||
break;
|
||||
case "rageid":
|
||||
var RageIDRegEx = new Regex(@"(\d+)", RegexOptions.Compiled);
|
||||
var RageIDMatch = RageIDRegEx.Match(value);
|
||||
|
@@ -24,6 +24,7 @@ namespace Jackett.Common.Models
|
||||
public long? TVDBId { get; set; }
|
||||
public long? Imdb { get; set; }
|
||||
public long? TMDb { get; set; }
|
||||
public long? DoubanId { get; set; }
|
||||
public string Author { get; set; }
|
||||
public string BookTitle { get; set; }
|
||||
public long? Seeders { get; set; }
|
||||
@@ -61,6 +62,7 @@ namespace Jackett.Common.Models
|
||||
RageID = copyFrom.RageID;
|
||||
Imdb = copyFrom.Imdb;
|
||||
TMDb = copyFrom.TMDb;
|
||||
DoubanId = copyFrom.DoubanId;
|
||||
Author = copyFrom.Author;
|
||||
BookTitle = copyFrom.BookTitle;
|
||||
Seeders = copyFrom.Seeders;
|
||||
@@ -115,6 +117,6 @@ namespace Jackett.Common.Models
|
||||
public static long BytesFromKB(float kb) => (long)(kb * 1024f);
|
||||
|
||||
public override string ToString() =>
|
||||
$"[ReleaseInfo: Title={Title}, Guid={Guid}, Link={Link}, Details={Details}, PublishDate={PublishDate}, Category={Category}, Size={Size}, Files={Files}, Grabs={Grabs}, Description={Description}, RageID={RageID}, TVDBId={TVDBId}, Imdb={Imdb}, TMDb={TMDb}, Seeders={Seeders}, Peers={Peers}, Poster={Poster}, InfoHash={InfoHash}, MagnetUri={MagnetUri}, MinimumRatio={MinimumRatio}, MinimumSeedTime={MinimumSeedTime}, DownloadVolumeFactor={DownloadVolumeFactor}, UploadVolumeFactor={UploadVolumeFactor}, Gain={Gain}]";
|
||||
$"[ReleaseInfo: Title={Title}, Guid={Guid}, Link={Link}, Details={Details}, PublishDate={PublishDate}, Category={Category}, Size={Size}, Files={Files}, Grabs={Grabs}, Description={Description}, RageID={RageID}, TVDBId={TVDBId}, Imdb={Imdb}, TMDb={TMDb}, DoubanId={DoubanId}, Seeders={Seeders}, Peers={Peers}, Poster={Poster}, InfoHash={InfoHash}, MagnetUri={MagnetUri}, MinimumRatio={MinimumRatio}, MinimumSeedTime={MinimumSeedTime}, DownloadVolumeFactor={DownloadVolumeFactor}, UploadVolumeFactor={UploadVolumeFactor}, Gain={Gain}]";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user