gui+core: imdbid can have 7 or 8 digits

This commit is contained in:
Garfield69
2021-10-21 17:33:21 +13:00
parent c378c2605c
commit 8af73f1bc4
3 changed files with 5 additions and 4 deletions

View File

@@ -971,7 +971,8 @@ function updateReleasesRow(row) {
labels.empty();
if (IMDBId) {
labels.append('\n<a href="https://www.imdb.com/title/tt' + ("0000000" + IMDBId).slice(-7) + '/" class="label label-imdb" alt="IMDB" title="IMDB">IMDB</a>');
var imdbLen = (IMDBId.length > 7) ? 8 : 7
labels.append('\n<a href="https://www.imdb.com/title/tt' + ("00000000" + IMDBId).slice(-imdbLen) + '/" class="label label-imdb" alt="IMDB" title="IMDB">IMDB</a>');
}
if (!isNaN(DownloadVolumeFactor)) {

View File

@@ -732,6 +732,6 @@
</script>
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
<script type="text/javascript" src="../custom.js?changed=20211022"></script>
<script type="text/javascript" src="../custom.js?changed=2021102201"></script>
</body>
</html>

View File

@@ -79,8 +79,8 @@ namespace Jackett.Common.Utils
var imdbid = GetImdbID(imdbstr);
if (imdbid == null)
return null;
return "tt" + ((int)imdbid).ToString("D7");
var imdbLen = ((int)imdbid > 9999999) ? "D8" : "D7";
return "tt" + ((int)imdbid).ToString(imdbLen);
}
}
}