{"action":"created","issue":{"url":"https://api.github.com/repos/skwerlman/SPD/issues/2","repository_url":"https://api.github.com/repos/skwerlman/SPD","labels_url":"https://api.github.com/repos/skwerlman/SPD/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/skwerlman/SPD/issues/2/comments","events_url":"https://api.github.com/repos/skwerlman/SPD/issues/2/events","html_url":"https://github.com/skwerlman/SPD/issues/2","id":169670912,"number":2,"title":"Gfycat animated image quality prioritization","user":{"login":"Kuroonehalf","id":12227163,"avatar_url":"https://avatars.githubusercontent.com/u/12227163?v=3","gravatar_id":"","url":"https://api.github.com/users/Kuroonehalf","html_url":"https://github.com/Kuroonehalf","followers_url":"https://api.github.com/users/Kuroonehalf/followers","following_url":"https://api.github.com/users/Kuroonehalf/following{/other_user}","gists_url":"https://api.github.com/users/Kuroonehalf/gists{/gist_id}","starred_url":"https://api.github.com/users/Kuroonehalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kuroonehalf/subscriptions","organizations_url":"https://api.github.com/users/Kuroonehalf/orgs","repos_url":"https://api.github.com/users/Kuroonehalf/repos","events_url":"https://api.github.com/users/Kuroonehalf/events{/privacy}","received_events_url":"https://api.github.com/users/Kuroonehalf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/skwerlman/SPD/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/skwerlman/SPD/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-05T18:42:51Z","updated_at":"2016-08-13T04:23:01Z","closed_at":"2016-08-13T04:23:01Z","body":"Right now as far as I can tell SPD is always downloading gfycat webms as gifs*. This is a problem not only because it creates horribly compressed animated images, but the file size is waaaay bigger and takes really long to download. For reference, a regular 1.2MB webm was over 80MB as gif. 9 times out of 10 there's better quality versions of the animated image available, so gif should always be last resort.\r\n\r\nI concocted what I think is a method to always get the best animated image available from gfycat,  Essentially, we want to see if a version of the file exists in this order:\r\n- fat.gfycat.com/link.webm - Best quality webm available.\r\n- giant.gfycat.com/link.webm - The standard definition webm.\r\n- zippy.gfycat.com/link.webm - Lower quality webm. Still better than gif.\r\n- giant.gfycat.com/link.gif - If for some reason it doesn't have any of the above versions, it resorts to grabbing the gif.\r\n\r\nYou go through them in order and check the exit code of wget. If it's 1 then it failed to find that version of the webm, so it tries the next one in the quality chain. However, I was using the wget python package to do this instead of the wget executable, so I'm not sure if this exit code business works the same, but I figure it should be similar.\r\nIdeally you'd be able to check if the file exists without using wget, but I didn't find a command that did that. \r\n\r\n*As I mentioned at the start, webms are always being downloaded as gifs, even when the webm_as_gif flag is set to False. Could you please check if it's working correctly on your end?"},"comment":{"url":"https://api.github.com/repos/skwerlman/SPD/issues/comments/239601270","html_url":"https://github.com/skwerlman/SPD/issues/2#issuecomment-239601270","issue_url":"https://api.github.com/repos/skwerlman/SPD/issues/2","id":239601270,"user":{"login":"skwerlman","id":6954107,"avatar_url":"https://avatars.githubusercontent.com/u/6954107?v=3","gravatar_id":"","url":"https://api.github.com/users/skwerlman","html_url":"https://github.com/skwerlman","followers_url":"https://api.github.com/users/skwerlman/followers","following_url":"https://api.github.com/users/skwerlman/following{/other_user}","gists_url":"https://api.github.com/users/skwerlman/gists{/gist_id}","starred_url":"https://api.github.com/users/skwerlman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skwerlman/subscriptions","organizations_url":"https://api.github.com/users/skwerlman/orgs","repos_url":"https://api.github.com/users/skwerlman/repos","events_url":"https://api.github.com/users/skwerlman/events{/privacy}","received_events_url":"https://api.github.com/users/skwerlman/received_events","type":"User","site_admin":false},"created_at":"2016-08-13T04:23:01Z","updated_at":"2016-08-13T04:23:01Z","body":"looking at the multitude of problems in the current codebase, I'm going to rewrite the entire program, hence the wontfix + close"}}
{"actor":{"display_login":"skwerlman"}}