feat: add 4K and 2K quality tiers
This commit is contained in:
@@ -39,6 +39,27 @@ describe('parseProbeOutput', () => {
|
||||
expect(result.subtitleLangs).toEqual(['fr', 'en', 'es'])
|
||||
})
|
||||
|
||||
it('includes 4K and 2K when the source tops out at 4K', () => {
|
||||
const result = parseProbeOutput(json({
|
||||
formats: [
|
||||
{ height: 1080, vcodec: 'avc1' },
|
||||
{ height: 1440, vcodec: 'avc1' },
|
||||
{ height: 2160, vcodec: 'avc1' },
|
||||
],
|
||||
}))
|
||||
expect(result.availableQualities).toEqual(['best', '2160p', '1440p', '1080p', '720p', '480p', '360p'])
|
||||
})
|
||||
|
||||
it('includes 2K but excludes 4K when the source tops out below 4K', () => {
|
||||
const result = parseProbeOutput(json({
|
||||
formats: [
|
||||
{ height: 1080, vcodec: 'avc1' },
|
||||
{ height: 1440, vcodec: 'avc1' },
|
||||
],
|
||||
}))
|
||||
expect(result.availableQualities).toEqual(['best', '1440p', '1080p', '720p', '480p', '360p'])
|
||||
})
|
||||
|
||||
it('caps available qualities to the max height found', () => {
|
||||
const result = parseProbeOutput(json({
|
||||
formats: [
|
||||
|
||||
Reference in New Issue
Block a user