Syts v0.2.0 Syts View Source
This is the Syts module.
It provides functions for sending a YouTube search query (via youtube-dl), offering a selection of results to the user, and then playing a selected result in MPV.
Link to this section Summary
Functions
Perform system sanity checks
Offer a list of playable options to the user, by title
Plays the given video in MPV
Run the entire search - select - play operation
Run a YouTube search on a query string
Link to this section Functions
Perform system sanity checks.
In particular, raise a RuntimeError
if Syts’s external dependencies are not
installed.
Returns :ok
.
Offer a list of playable options to the user, by title.
This function lists the results of a query and accepts a number from the user indicating which video in the list to return.
Returns a map of the selected video’s information.
Plays the given video in MPV.
This function accepts a map describing a YouTube video, and plays that video in MPV.
Returns :ok
.
Run a YouTube search on a query string.
This function uses youtube-dl
internally.
Returns a list of JSON-decoded maps.