Added -size-restricted URL pattern for gfycat. Fixed missing getUser argument.

This commit is contained in:
ThePendulum 2018-05-28 22:25:58 +02:00
parent b27eb1df03
commit 89542bd064
2 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,10 @@ const hosts = [{
method: 'vidbleAlbum', method: 'vidbleAlbum',
label: 'vidble', label: 'vidble',
pattern: new urlPattern('http(s)\\://(www.)vidble.com/album/:id') pattern: new urlPattern('http(s)\\://(www.)vidble.com/album/:id')
}, {
method: 'gfycat',
label: 'gfycat',
pattern: new urlPattern('http(s)\\://(:server.)gfycat.com/:id(-size_restricted.gif)')
}, { }, {
method: 'gfycat', method: 'gfycat',
label: 'gfycat', label: 'gfycat',

View File

@ -39,7 +39,7 @@ const getPostsWrap = (reddit, args) => {
return {...accUserPosts, '[deleted]': {name: '[deleted]', deleted: true, posts: [post]}}; return {...accUserPosts, '[deleted]': {name: '[deleted]', deleted: true, posts: [post]}};
} }
const user = await getUser(post.author.name); const user = await getUser(post.author.name, reddit);
return {...accUserPosts, [post.author.name]: {...user, posts: [post]}} return {...accUserPosts, [post.author.name]: {...user, posts: [post]}}
}), userPosts); }), userPosts);