Skip to content

Instantly share code, notes, and snippets.

@stripedpurple
Last active December 27, 2016 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stripedpurple/d0d8b6fd9c9610a447f110b76b7261ae to your computer and use it in GitHub Desktop.
Save stripedpurple/d0d8b6fd9c9610a447f110b76b7261ae to your computer and use it in GitHub Desktop.
Small bit of JS for funimation
// ==UserScript==
// @name FUNI FFMPEG
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.funimation.com/shows/*/videos/official/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
playersData[0].playlist.forEach(function (item) {
if (item.hasOwnProperty('items')){
item.items.forEach(function (i) {
if (i.hasOwnProperty('videoType')){
alert("ffmpeg -i " + i.videoSet[0].sdUrl + i.videoSet[0].authToken + " -c copy " + i.artist.split(" ").join("_") + "_S0E_" + i.title.split(" ").join("_") + ".mkv");
alert("ffmpeg -i " + i.videoSet[0].hdUrl + i.videoSet[0].authToken + " -c copy " + i.artist.split(" ").join("_") + "_S0E_" + i.title.split(" ").join("_") + ".mkv");
alert("ffmpeg -i " + i.videoSet[0].hd1080Url + i.videoSet[0].authToken + " -c copy " + i.artist.split(" ").join("_") + "_S0E_" + i.title.split(" ").join("_") + ".mkv");
}
});
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment