mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-23 19:26:26 +01:00
added a tiny testing script for file name presets
This commit is contained in:
parent
0520a85572
commit
1d3eb2fdae
2 changed files with 72 additions and 1 deletions
|
@ -12,7 +12,8 @@
|
|||
"start": "node src/cobalt",
|
||||
"setup": "node src/modules/setup",
|
||||
"test": "node src/test/test",
|
||||
"build": "node src/modules/buildStatic"
|
||||
"build": "node src/modules/buildStatic",
|
||||
"testFilenames": "node src/test/testFilenamePresets"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
70
src/test/testFilenamePresets.js
Normal file
70
src/test/testFilenamePresets.js
Normal file
|
@ -0,0 +1,70 @@
|
|||
import createFilename from "../modules/processing/createFilename.js";
|
||||
|
||||
let tests = [
|
||||
{
|
||||
f: {
|
||||
service: 'youtube',
|
||||
id: 'MMK3L4W70g4',
|
||||
title: "Loossemble (루셈블) - 'Sensitive' MV",
|
||||
author: 'Loossemble',
|
||||
youtubeDubName: false,
|
||||
qualityLabel: '2160p',
|
||||
resolution: '3840x2160',
|
||||
extension: 'webm',
|
||||
youtubeFormat: 'vp9'
|
||||
},
|
||||
isAudioOnly: false,
|
||||
isAudioMuted: false
|
||||
},
|
||||
{
|
||||
f: {
|
||||
service: 'youtube',
|
||||
id: 'MMK3L4W70g4',
|
||||
title: "Loossemble (루셈블) - 'Sensitive' MV",
|
||||
author: 'Loossemble',
|
||||
youtubeDubName: false,
|
||||
qualityLabel: '2160p',
|
||||
resolution: '3840x2160',
|
||||
extension: 'webm',
|
||||
youtubeFormat: 'vp9'
|
||||
},
|
||||
isAudioOnly: true,
|
||||
isAudioMuted: false
|
||||
},
|
||||
{
|
||||
f: {
|
||||
service: 'youtube',
|
||||
id: 'MMK3L4W70g4',
|
||||
title: "Loossemble (루셈블) - 'Sensitive' MV",
|
||||
author: 'Loossemble',
|
||||
youtubeDubName: false,
|
||||
qualityLabel: '2160p',
|
||||
resolution: '3840x2160',
|
||||
extension: 'webm',
|
||||
youtubeFormat: 'vp9'
|
||||
},
|
||||
isAudioOnly: false,
|
||||
isAudioMuted: true
|
||||
},
|
||||
{
|
||||
f: {
|
||||
service: 'vimeo',
|
||||
id: 'MMK3L4W70g4',
|
||||
title: "Loossemble (루셈블) - 'Sensitive' MV",
|
||||
author: 'Loossemble',
|
||||
qualityLabel: '2160p',
|
||||
resolution: '3840x2160',
|
||||
extension: 'mp4'
|
||||
},
|
||||
isAudioOnly: false,
|
||||
isAudioMuted: true
|
||||
}
|
||||
]
|
||||
|
||||
for (let i = 0; i < tests.length; i++) {
|
||||
console.log(`---${i}---`)
|
||||
console.log(createFilename(tests[i].f, "classic", tests[i].isAudioOnly, tests[i].isAudioMuted))
|
||||
console.log(createFilename(tests[i].f, "basic", tests[i].isAudioOnly, tests[i].isAudioMuted))
|
||||
console.log(createFilename(tests[i].f, "pretty", tests[i].isAudioOnly, tests[i].isAudioMuted))
|
||||
console.log(createFilename(tests[i].f, "nerdy", tests[i].isAudioOnly, tests[i].isAudioMuted))
|
||||
}
|
Loading…
Reference in a new issue