mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
display multiple hdr profiles
This commit is contained in:
@@ -82,9 +82,9 @@ const QualityFilter = {
|
||||
{
|
||||
key: '4k',
|
||||
label: '4k',
|
||||
items: ['4k', '4k HDR'],
|
||||
items: ['4k'],
|
||||
test(quality) {
|
||||
return this.items.includes(quality);
|
||||
return quality && this.items.includes(quality.split(' ')[0]);
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -115,9 +115,9 @@ const QualityFilter = {
|
||||
key: 'other',
|
||||
label: 'Other (DVDRip/HDRip/BDRip...)',
|
||||
// could be ['DVDRip', 'HDRip', 'BDRip', 'BRRip', 'BluRay', 'WEB-DL', 'WEBRip', 'HDTV', 'DivX', 'XviD']
|
||||
items: ['4k', '4k HDR', '1080p', '720p', '480p', 'SCR', 'CAM', 'TeleSync', 'TeleCine'],
|
||||
items: ['4k', '1080p', '720p', '480p', 'SCR', 'CAM', 'TeleSync', 'TeleCine'],
|
||||
test(quality) {
|
||||
return quality && !this.items.includes(quality);
|
||||
return quality && !this.items.includes(quality.split(' ')[0]);
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ function toStreamInfo(record) {
|
||||
|| Math.abs(record.size / record.torrent.size - 1) < SIZE_DELTA
|
||||
|| record.title.includes(record.torrent.title);
|
||||
const quality = getQuality(record, torrentInfo, fileInfo);
|
||||
const hdrQuality = fileInfo.hdr || torrentInfo.hdr
|
||||
const hdrProfiles = torrentInfo.hdr || fileInfo.hdr || []
|
||||
const title = joinDetailParts(
|
||||
[
|
||||
joinDetailParts([record.torrent.title.replace(/[, ]+/g, ' ')]),
|
||||
@@ -38,7 +38,7 @@ function toStreamInfo(record) {
|
||||
const name = joinDetailParts(
|
||||
[
|
||||
joinDetailParts([ADDON_NAME]),
|
||||
joinDetailParts([quality, hdrQuality])
|
||||
joinDetailParts([quality, joinDetailParts(hdrProfiles, '', ' | ')])
|
||||
],
|
||||
'',
|
||||
'\n'
|
||||
@@ -139,14 +139,15 @@ function getSources(trackersInput, infoHash) {
|
||||
function getBingeGroupParts(record, sameInfo, quality, torrentInfo, fileInfo) {
|
||||
if (record.torrent.type === Type.MOVIE) {
|
||||
const source = torrentInfo.source || fileInfo.source
|
||||
return [
|
||||
quality,
|
||||
source !== quality ? source : undefined,
|
||||
torrentInfo.codec || fileInfo.codec,
|
||||
torrentInfo.bitDepth || fileInfo.bitDepth
|
||||
];
|
||||
return [quality]
|
||||
.concat(source !== quality ? source : [])
|
||||
.concat(torrentInfo.codec || fileInfo.codec)
|
||||
.concat(torrentInfo.bitDepth || fileInfo.bitDepth)
|
||||
.concat(torrentInfo.hdr || fileInfo.hdr);
|
||||
} else if (sameInfo) {
|
||||
return [quality, fileInfo.group];
|
||||
return [quality]
|
||||
.concat(fileInfo.hdr)
|
||||
.concat(fileInfo.group);
|
||||
}
|
||||
return [record.infoHash];
|
||||
}
|
||||
|
||||
12
addon/package-lock.json
generated
12
addon/package-lock.json
generated
@@ -20,7 +20,7 @@
|
||||
"magnet-uri": "^6.2.0",
|
||||
"named-queue": "^2.2.1",
|
||||
"offcloud-api": "^1.0.0",
|
||||
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#a4ff83dd97ce4e74c38e6aa9cadf99d79f58f879",
|
||||
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#25a7b1d1f036524d5fd29be944f740f2be6955ee",
|
||||
"pg": "^8.7.3",
|
||||
"pg-hstore": "^2.3.4",
|
||||
"premiumize-api": "^1.0.3",
|
||||
@@ -1434,8 +1434,8 @@
|
||||
},
|
||||
"node_modules/parse-torrent-title": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "git+ssh://git@github.com/TheBeastLT/parse-torrent-title.git#a4ff83dd97ce4e74c38e6aa9cadf99d79f58f879",
|
||||
"integrity": "sha512-gXhQBVX8qnrObvtUpID557Qc/11+rP/zmItsLRAeX+0Js1eAqTVkW9pei0TZOUALNmC+ks8VSR2n0fpDYOw1xA==",
|
||||
"resolved": "git+ssh://git@github.com/TheBeastLT/parse-torrent-title.git#25a7b1d1f036524d5fd29be944f740f2be6955ee",
|
||||
"integrity": "sha512-51kabWkYLxEcVwuY0LYVbsr8b/IfvJY/9sX7jRDt9JVTD8MoIr2JTCu19OL4Ce7RBtjP0wBC0BASzOeqL3V7rg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"moment": "^2.24.0"
|
||||
@@ -3507,9 +3507,9 @@
|
||||
"integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ=="
|
||||
},
|
||||
"parse-torrent-title": {
|
||||
"version": "git+ssh://git@github.com/TheBeastLT/parse-torrent-title.git#a4ff83dd97ce4e74c38e6aa9cadf99d79f58f879",
|
||||
"integrity": "sha512-gXhQBVX8qnrObvtUpID557Qc/11+rP/zmItsLRAeX+0Js1eAqTVkW9pei0TZOUALNmC+ks8VSR2n0fpDYOw1xA==",
|
||||
"from": "parse-torrent-title@git://github.com/TheBeastLT/parse-torrent-title.git#a4ff83dd97ce4e74c38e6aa9cadf99d79f58f879",
|
||||
"version": "git+ssh://git@github.com/TheBeastLT/parse-torrent-title.git#25a7b1d1f036524d5fd29be944f740f2be6955ee",
|
||||
"integrity": "sha512-51kabWkYLxEcVwuY0LYVbsr8b/IfvJY/9sX7jRDt9JVTD8MoIr2JTCu19OL4Ce7RBtjP0wBC0BASzOeqL3V7rg==",
|
||||
"from": "parse-torrent-title@git://github.com/TheBeastLT/parse-torrent-title.git#25a7b1d1f036524d5fd29be944f740f2be6955ee",
|
||||
"requires": {
|
||||
"moment": "^2.24.0"
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"magnet-uri": "^6.2.0",
|
||||
"named-queue": "^2.2.1",
|
||||
"offcloud-api": "^1.0.0",
|
||||
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#a4ff83dd97ce4e74c38e6aa9cadf99d79f58f879",
|
||||
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#25a7b1d1f036524d5fd29be944f740f2be6955ee",
|
||||
"pg": "^8.7.3",
|
||||
"pg-hstore": "^2.3.4",
|
||||
"premiumize-api": "^1.0.3",
|
||||
|
||||
Reference in New Issue
Block a user