W3cubDocs

/Hammerspoon

hs.deezer

Controls for Deezer music player.

Heavily inspired by 'hs.spotify', credits to the original author.

API Overview

API Documentation

Constants

state_paused
Signature hs.deezer.state_paused
Type Constant
Description

Returned by hs.deezer.getPlaybackState() to indicates deezer is paused

Source extensions/deezer/deezer.lua line 13
state_playing
Signature hs.deezer.state_playing
Type Constant
Description

Returned by hs.deezer.getPlaybackState() to indicates deezer is playing

Source extensions/deezer/deezer.lua line 18
state_stopped
Signature hs.deezer.state_stopped
Type Constant
Description

Returned by hs.deezer.getPlaybackState() to indicates deezer is stopped

Source extensions/deezer/deezer.lua line 23

Functions

displayCurrentTrack
Signature hs.deezer.displayCurrentTrack()
Type Function
Description

Displays information for current track on screen

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 100
ff
Signature hs.deezer.ff()
Type Function
Description

Skips the playback position forwards by 5 seconds

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 295
getCurrentAlbum
Signature hs.deezer.getCurrentAlbum()
Type Function
Description

Gets the name of the album of the current track

Parameters
  • None
Returns
  • A string containing the Album of the current track, or nil if an error occurred
Source extensions/deezer/deezer.lua line 129
getCurrentArtist
Signature hs.deezer.getCurrentArtist()
Type Function
Description

Gets the name of the artist of the current track

Parameters
  • None
Returns
  • A string containing the Artist of the current track, or nil if an error occurred
Source extensions/deezer/deezer.lua line 116
getCurrentTrack
Signature hs.deezer.getCurrentTrack()
Type Function
Description

Gets the name of the current track

Parameters
  • None
Returns
  • A string containing the name of the current track, or nil if an error occurred
Source extensions/deezer/deezer.lua line 142
getPlaybackState
Signature hs.deezer.getPlaybackState()
Type Function
Description

Gets the current playback state of deezer

Parameters
  • None
Returns
  • A string containing one of the following constants:
    • hs.deezer.state_stopped
    • hs.deezer.state_paused
    • hs.deezer.state_playing
Source extensions/deezer/deezer.lua line 155
getPosition
Signature hs.deezer.getPosition()
Type Function
Description

Gets the playback position (in seconds) in the current song

Parameters
  • None
Returns
  • A number indicating the current position in the song
Source extensions/deezer/deezer.lua line 255
getVolume
Signature hs.deezer.getVolume()
Type Function
Description

Gets the deezer volume setting

Parameters
  • None
Returns
  • A number containing the volume deezer is set to between 1 and 100
Source extensions/deezer/deezer.lua line 207
isPlaying
Signature hs.deezer.isPlaying()
Type Function
Description

Returns whether deezer is currently playing

Parameters
  • None
Returns
  • A boolean value indicating whether deezer is currently playing a track, or nil if an error occurred (unknown player state). Also returns false if the application is not running
Source extensions/deezer/deezer.lua line 184
isRunning
Signature hs.deezer.isRunning()
Type Function
Description

Returns whether deezer is currently open. Most other functions in hs.deezer will automatically start the application, so this function can be used to guard against that.

Parameters
  • None
Returns
  • A boolean value indicating whether the deezer application is running.
Source extensions/deezer/deezer.lua line 171
next
Signature hs.deezer.next()
Type Function
Description

Skips to the next deezer track

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 74
pause
Signature hs.deezer.pause()
Type Function
Description

Pauses the current deezer track

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 61
play
Signature hs.deezer.play()
Type Function
Description

Plays the current deezer track

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 48
playpause
Signature hs.deezer.playpause()
Type Function
Description

Toggles play/pause of current deezer track

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 35
previous
Signature hs.deezer.previous()
Type Function
Description

Skips to previous deezer track

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 87
rw
Signature hs.deezer.rw()
Type Function
Description

Skips the playback position backwards by 5 seconds

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 306
setPosition
Signature hs.deezer.setPosition(pos)
Type Function
Description

Sets the playback position in the current song

Parameters
  • pos - A number containing the position (in seconds) to jump to in the current song
Returns
  • None
Source extensions/deezer/deezer.lua line 266
setVolume
Signature hs.deezer.setVolume(vol)
Type Function
Description

Sets the deezer volume setting

Parameters
  • vol - A number between 1 and 100
Returns
  • None
Source extensions/deezer/deezer.lua line 218
volumeDown
Signature hs.deezer.volumeDown()
Type Function
Description

Reduces the volume by 5

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 244
volumeUp
Signature hs.deezer.volumeUp()
Type Function
Description

Increases the volume by 5

Parameters
  • None
Returns
  • None
Source extensions/deezer/deezer.lua line 233

© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.deezer.html