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)) {