mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-18 06:09:58 +00:00
16f74094b9
- added metadata for rutube and vimeo. - added a picker for preferred filename pattern. - fixed content disposition header. - mute and audio dub tags don't appear together in a file name anymore. - youtube: dub file name tag doesn't appear anymore if audio track is default.
13 lines
462 B
JavaScript
13 lines
462 B
JavaScript
export default async function(obj) {
|
|
let post = await fetch(`https://archive.vine.co/posts/${obj.id}.json`).then((r) => { return r.json() }).catch(() => { return false });
|
|
if (!post) return { error: 'ErrorEmptyDownload' };
|
|
|
|
if (post.videoUrl) return {
|
|
urls: post.videoUrl.replace("http://", "https://"),
|
|
filename: `vine_${obj.id}.mp4`,
|
|
audioFilename: `vine_${obj.id}_audio`
|
|
}
|
|
|
|
return { error: 'ErrorEmptyDownload' }
|
|
}
|