/emms-player-mpv-jp-radios

EMMS players and stream lists of Japan radio stations

Primary LanguageEmacs Lisp

http://melpa.org/packages/emms-player-mpv-jp-radios-badge.svg

emms-player-mpv-jp-radios

This provides EMMS ( The Emacs Multimedia System ) simple players for Japan radio stations:

The following plugins are available:

  • emms-streams-jp-radios.el
  • emms-streams-jp-radios-anything.el
  • emms-streams-jp-radios-helm.el ( helm v1.7.9 or later )
  • emms-streams-jp-radios-counsel.el ( ivy 0.9.0 or later )

image/image.gif

Table of contents

Requirements

Tested on GNU Emacs 25.3.1 (emacs-mac-app @6.8), EMMS 4.4, mpv 0.26.0

Setup

(add-to-list 'load-path "/path/to/emms-player-mpv-jp-radios")

(require 'emms-player-mpv-jp-radios)

Adding all EMMS jp radio players

(emms-player-mpv-jp-radios-add-all)

Adding separately

Function: emms-player-mpv-jp-radios-add &rest names

names is as follows:

  • “radiko” (Radiko)
  • “radiru” (らじる★らじる)
  • “agqr” (超!A&G+)
  • “onsen” (インターネットラジオステーション〈音泉〉)
  • “hibiki” (響 - HiBiKi Radio Station -)
  • “anitama” (アニたまどっとコム)
  • “animate” (animate.tv)
  • “simul” (SimulRadio)
  • “listen” (ListenRadio)
  • “seaside” (Sea Side Communications)
  • “lantis” (Lantis)
  • “famitsu” (ファミ通.com)
;; An example of setting only for Radiko and らじる★らじる
(emms-player-mpv-jp-radios-add "radiko" "radiru")

Using another media player with some emms streams files

e.g. 音泉 with mplayer

(require 'emms-player-mplayer)

(add-to-list 'load-path "/path/to/onsen")
(require 'emms-streams-onsen)

;; `emms-player-mplayer-onsen' is defined in this case.
(define-emms-simple-player mplayer-onsen '(streamlist)
  "\\`onsen://" "mplayer" "-slave" "-quiet" "-really-quiet")

(dolist (key '(pause seek seek-to))
  (emms-player-set 'emms-player-mplayer-onsen
                   key (intern (format "emms-player-mplayer-%s" key))))

(emms-player-set emms-player-mplayer-onsen 'resume nil)

;; `emms-player-mplayer-onsen' needs a specific function to start a streamlist.
(emms-player-set 'emms-player-mplayer-onsen 'start
                 'emms-player-mplayer-onsen-start-stream)

(defun emms-player-mplayer-onsen-start-stream (track)
  ;; Each emms streams file provides emms-stream-*-stream-url-to-*
  (emms-player-simple-start (emms-stream-onsen-stream-url-to-moviePath
                             (emms-track-name track))
                            emms-player-mplayer-onsen
                            emms-player-mplayer-onsen-command-name
                            emms-player-mplayer-onsen-parameters))

(add-to-list 'emms-player-list 'emms-player-mplayer-onsen)

Usage

Adding a stream list to *EMMS Streams* buffer

Each emms streams file provides a function to add a stream list to *EMMS Streams* buffer.

M-x emms-streams
;; stationName is radiko, radiru, etc.
M-x emms-stream-stationName-add-bookmark

Some functions can update cache of stream list.

;; Updating synchronously
C-u M-x emms-stream-stationName-add-bookmark
;; Updating asynchronously
C-u -1 M-x emms-stream-stationName-add-bookmark

emms-streams-jp-radios.el

emms-streams-jp-radios.el provides emms-stream-jp-radios-update-cache-async and emms-streams-jp-radios / emms-stream-jp-radios-popup like emms-streams.

(require 'emms-streams-jp-radios)

M-x emms-stream-jp-radios-update-cache-async updates each stream list.

M-x emms-streams-jp-radios refreshes *EMMS JP Radios* buffer and switches to it.

M-x emms-stream-jp-radios-popup pops up the window of *EMMS JP Radios* buffer.

This file provides the following functions to display the stream name of a streamlist.

  • Function: emms-stream-jp-radios-track-description track

    This function displays the stream name of a streamlist in *EMMS Playlist* buffer.

    (custom-set-variables
     '(emms-track-description-function
       'emms-stream-jp-radios-track-description))
        
  • Function: emms-stream-jp-radios-playlist-current

    This function is used for emms-mode-line-mode-line-function.

    (require 'emms-mode-line)
    (custom-set-variables
     '(emms-mode-line-mode-line-function 'emms-stream-jp-radios-playlist-current))
        
  • Function: emms-stream-jp-radios-mode-line-icon-function

    This function is used for emms-mode-line-mode-line-function.

    (require 'emms-mode-line-icon)
    (custom-set-variables
     '(emms-mode-line-mode-line-function 'emms-stream-jp-radios-mode-line-icon-function))
        
  • Function: emms-stream-jp-radios-current-title-function

    This function is used for emms-mode-line-cycle-current-title-function.

    (require 'emms-mode-line-cycle)
    (custom-set-variables
     '(emms-mode-line-cycle-current-title-function
       'emms-stream-jp-radios-current-title-function))
        

emms-streams-jp-radios-anything.el

If anything is installed, emms-streams-jp-radios-anything is available.

(autoload 'emms-streams-jp-radios-anything
  "emms-streams-jp-radios-anything" nil t)

;; e.g.
(defalias 'anything-jp-radios 'emms-streams-jp-radios-anything)
;; If `emms-stream-jp-radios-anything-use-emms-stream-list-p' is non-nil,
;; candidates include `emms-stream-list'.
(custom-set-variables
 '(emms-stream-jp-radios-anything-use-emms-stream-list-p t))

Basic action

keyAction
EnterDefault action: Play the current stream
C-u EnterAdd the current stream
C-zDefault persistent action: Play the current stream
C-u C-zPersistent action: Add the current stream

Other actions

  • Action (with prefix)
    • Play(Add) the current stream
    • (Clear emms-playlist-buffer, ) Add streams and Play if emms-player-playing-p is nil
    • Update streams asynchronously

emms-streams-jp-radios-helm.el

If helm is installed, emms-streams-jp-radios-helm is available.

(autoload 'emms-streams-jp-radios-helm
  "emms-streams-jp-radios-helm" nil t)

;; e.g.
(defalias 'helm-jp-radios 'emms-streams-jp-radios-helm)
;; If `emms-stream-jp-radios-helm-use-emms-stream-list-p' is non-nil,
;; candidates include `emms-stream-list'.
(custom-set-variables
 '(emms-stream-jp-radios-helm-use-emms-stream-list-p t))

Actions

keyAction
Enter/<f1>Default action: Play the current stream
C-u Enter/<f1>Add the current stream
C-jDefault persistent action: Play the current stream
C-u C-jPersistent action: Add the current stream
<f2>Add streams(s) and Play if emms-player-playing-p is nil
C-u <f2>Clear emms-playlist-buffer, Add stream(s) and Play
if emms-player-playing-p is nil
<f3>Update streams asynchronously

emms-streams-jp-radios-counsel.el

If ivy is installed, emms-streams-jp-radios-counsel is available.

(autoload 'emms-streams-jp-radios-counsel
  "emms-streams-jp-radios-counsel" nil t)

;; e.g.
(defalias 'counsel-jp-radios 'emms-streams-jp-radios-counsel)
(push '(emms-streams-jp-radios-counsel . ivy--regex-ignore-order)
      ivy-re-builders-alist)
(custom-set-variables
 ;; If `emms-stream-jp-radios-counsel-use-emms-stream-list-p' is non-nil,
 ;; candidates include `emms-stream-list'.
 '(emms-stream-jp-radios-counsel-use-emms-stream-list-p t)
 '(emms-stream-jp-radios-counsel-ivy-height 21))

Default emms-streams-jp-radios-counsel-map

KeyAction
C-SPC(Un)mark the current candidate
M-aMark visible candidates
C-u M-aUnmark visible candidates
M-UUnmark all candidates

Actions

KeyAction
oDefault action: Play the current stream
aAdd stream(s) and Play
AAdd stream(s)
cClear emms-playlist-buffer, Add stream(s) and Play
CClear emms-playlist-buffer and Add stream(s)
uUpdate streams asynchronously

Key a and c depend on emms-stream-jp-radios-counsel-always-play-p.

If emms-stream-jp-radios-counsel-always-play-p is non-nil, a new stream will be started regardless of emms-player-playing-p.

References