Introduction - Atelier-Shiori/detectstream Wiki

What is detectstream

Detectstream is a Cocoa Framework for macOS that takes all the URLs and titles from open windows and tabs and detect Anime being stream on legal streaming sites and spit out the series title and episode. It works like this:

Detectstream also have support for Manga from legal sites, but support is currently limited. You can determine if the detected item is an anime or manga through it's type field.

Note: For Netflix, it will use scraping with regular expressions to first get the episode ID (unique identifier that denotes an episode with the meta data) or in the URL. Then it will scrape for the JSON data encoded in Base64, decode it and then use that data to get the correct episode number. Season is determined by the enumeration integer.

Here are the example of the outputs from the currently working program with the browser watching an episode of Kill la Kill Episode 1 in Safari:

{"result":[{"browser":"Safari","title":"Kill la Kill","season":1,"site":"netflix","episode":1, "type":"anime}]}

For Manga, it will look like this: {"result":[{"browser":"Safari","title":"Tales of Wedding Rings","chapter":34,"site":"crunchyroll","type":"manga"}]}

This will be the output when there is no match:


What Sites do you Support?

detectstream currently supports these sites:


Safari, Webkit, Chrome, Roccat Browser and Omniweb: Crunchyroll, AnimeNewsNetwork, AnimeLab, Viz Neon Valley, Viewster, Wakanim, Funimation, Netflix, Hidive, VRV, and Media Server (locally and on the web).

Chrome and Safari only (requires Javascript Execution): Viewster, Amazon Prime Video (For Safari, you need to have "Enable Javascript from Apple Events" enabled in the Developer Menu)


Safari, Webkit, Chrome, Roccat Browser and Omniweb: Crunchyroll

Note that detectstream is only meant for legal streaming sites, but custom rule support will come in the future.

Is my browser supported?

As long it has Applescript capabilities and you can see the information for the tab and window or execute javascript, then yes.

Fluid (Site specific browser) will not be supported since I couldn't get scripting bridge working and that it generates a new bundle identifier when you create a new site specific browser. iCab is also not supported since the Applescript support it comes with does not provide easy access to title and URL. Firefox and Opera does not have Applescript support at all.

What streaming sites I can't support?

Can this be ported to Snow Leopard?

Yes, but you would need to use a different regular expressions class since NSRegularExpressions only exist in Lion or later.

May I use the regular expressions from this program?

Yes, the program is licensed under the MIT License.

Why Amazon Prime Video/Viewster Detection not working in Safari?

Since macOS Sierra, execution of JavaScript through AppleScript have been disabled by default. The option "Allow JavaScript from Apple Events" can be enabled in the Develop menu.