The youtube Reference Manual

This is the youtube Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 07:23:07 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 youtube

Play youtube urls with or without video using mpv

Author

Mihai Olteanu <>

License

GPLv3

Version

0.1

Dependencies
  • alexandria (system).
  • bordeaux-threads (system).
  • yason (system).
  • cl-ppcre (system).
Source

youtube.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 youtube/youtube.asd

Source

youtube.asd.

Parent Component

youtube (system).

ASDF Systems

youtube.


3.1.2 youtube/package.lisp

Source

youtube.asd.

Parent Component

youtube (system).

Packages

youtube.


3.1.3 youtube/youtube.lisp

Dependency

package.lisp (file).

Source

youtube.asd.

Parent Component

youtube (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 youtube

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: duration ()

Current playing song duration, in MM:SS format, as string.

Package

youtube.

Source

youtube.lisp.

Function: percent-pos ()

Current playing song position, in percent.

Package

youtube.

Source

youtube.lisp.

Function: play (url-or-song &key video pos)

Play the youtube url through mpv. If video is T, open the video with mpv player, if not, run mpv in the background. If position is specified, in seconds, start playback from there.

Package

youtube.

Source

youtube.lisp.

Function: play/pause ()

Toggle playing status

Package

youtube.

Source

youtube.lisp.

Function: quit ()

Stop the playback.

Package

youtube.

Source

youtube.lisp.

Function: replay ()

Rewind the song at the beginning, effectively replaying it.

Package

youtube.

Source

youtube.lisp.

Function: seek (seconds)

Forward or backward play by seconds, if the seconds is negative.

Package

youtube.

Source

youtube.lisp.

Function: switch-to-browser (&key from-beginning)

Pause the player and open the youtube page of the current playing song in the user default browser. If from-beginning is T, start playing from the beginning, otherwise continue from where the player was.

Package

youtube.

Source

youtube.lisp.

Function: time-pos ()

Current playing song position, in seconds, as string.

Package

youtube.

Source

youtube.lisp.

Function: turn-video-on ()

Quit mpv and restart it in video mode, locally (i.e. not in the browser)

Package

youtube.

Source

youtube.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *playing-url*
Package

youtube.

Source

youtube.lisp.

Special Variable: *socket*
Package

youtube.

Source

youtube.lisp.


5.2.2 Ordinary functions

Function: clear-playing-url ()
Package

youtube.

Source

youtube.lisp.

Function: get-property (property)
Package

youtube.

Source

youtube.lisp.

Function: pause ()

Pause the player

Package

youtube.

Source

youtube.lisp.

Function: paused-p ()

Check if mpv is paused.

Package

youtube.

Source

youtube.lisp.

Function: playing-url ()
Package

youtube.

Source

youtube.lisp.

Function: running-p ()

Check if mpv player has been started, regardles if it’s paused or actually playing.

Package

youtube.

Source

youtube.lisp.

Function: send-command (&rest args)
Package

youtube.

Source

youtube.lisp.

Function: set-playing-url (url)
Package

youtube.

Source

youtube.lisp.

Function: set-property (property value)
Package

youtube.

Source

youtube.lisp.

Function: url-from-string (str)

Use youtube-dl to search for a youtube url based on the input string. The –get-url option returns a nasty url. –get-thumbnail returns a url that contains the url id we’re interested it.

Package

youtube.

Source

youtube.lisp.

Function: youtube-url-p (url-or-song)

Decide if the string is a youtube url and return it back if it is.

Package

youtube.

Source

youtube.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   C   D   F   G   P   Q   R   S   T   U   Y  
Index Entry  Section

C
clear-playing-url: Private ordinary functions

D
duration: Public ordinary functions

F
Function, clear-playing-url: Private ordinary functions
Function, duration: Public ordinary functions
Function, get-property: Private ordinary functions
Function, pause: Private ordinary functions
Function, paused-p: Private ordinary functions
Function, percent-pos: Public ordinary functions
Function, play: Public ordinary functions
Function, play/pause: Public ordinary functions
Function, playing-url: Private ordinary functions
Function, quit: Public ordinary functions
Function, replay: Public ordinary functions
Function, running-p: Private ordinary functions
Function, seek: Public ordinary functions
Function, send-command: Private ordinary functions
Function, set-playing-url: Private ordinary functions
Function, set-property: Private ordinary functions
Function, switch-to-browser: Public ordinary functions
Function, time-pos: Public ordinary functions
Function, turn-video-on: Public ordinary functions
Function, url-from-string: Private ordinary functions
Function, youtube-url-p: Private ordinary functions

G
get-property: Private ordinary functions

P
pause: Private ordinary functions
paused-p: Private ordinary functions
percent-pos: Public ordinary functions
play: Public ordinary functions
play/pause: Public ordinary functions
playing-url: Private ordinary functions

Q
quit: Public ordinary functions

R
replay: Public ordinary functions
running-p: Private ordinary functions

S
seek: Public ordinary functions
send-command: Private ordinary functions
set-playing-url: Private ordinary functions
set-property: Private ordinary functions
switch-to-browser: Public ordinary functions

T
time-pos: Public ordinary functions
turn-video-on: Public ordinary functions

U
url-from-string: Private ordinary functions

Y
youtube-url-p: Private ordinary functions