From 887d4259aa073333f21e96b3eb7439bf719c47dd Mon Sep 17 00:00:00 2001 From: neumann <> Date: Tue, 30 May 2017 08:48:41 +0000 Subject: [PATCH] 37_Spotify: fixed warning git-svn-id: https://svn.fhem.de/fhem/trunk@14414 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/37_Spotify.pm | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index d54c22ec3..8be1fe5a8 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 37_Spotify: fixed prototype warning - feature: 37_Spotify: first release - bugfix: 38_netatmo: fixed blocking connection check on dns error - change: 02_RSS: height/width for rect layout directive diff --git a/fhem/FHEM/37_Spotify.pm b/fhem/FHEM/37_Spotify.pm index 1b4f7fedc..cde3f61b1 100644 --- a/fhem/FHEM/37_Spotify.pm +++ b/fhem/FHEM/37_Spotify.pm @@ -587,7 +587,7 @@ sub Spotify_volumeFade($$$$$) { # fade the volume of a device return 'wrong syntax: set volumeFade [ ] [ ]' if(!defined $targetVolume); Spotify_updateDevices($hash, 1); # make sure devices are up to date (a valid start volume is required) - $device_id = $duration if($duration !~ /^[0-9]+$/); + $device_id = $duration if(defined $duration && $duration !~ /^[0-9]+$/); my $startVolume = $hash->{helper}{device_active}{volume_percent}; return 'could not get start volume of active device' if(!defined $startVolume); $step = 5 if(!defined $step); # fall back to default step if not specified @@ -672,7 +672,7 @@ sub Spotify_getTransferTargetDeviceID($$) { # get target device id for transfer return undef; } -sub Spotify_volumeFadeStep($) { # do a single fading stemp +sub Spotify_volumeFadeStep { # do a single fading stemp my ($hash) = @_; return if(!defined $hash->{helper}{fading}); my $iteration = $hash->{helper}{fading}{iteration}; @@ -913,7 +913,7 @@ sub Spotify_saveArtist($$$$) { # save an artist object to the readings The Spotify module enables you to control your Spotify (Connect) playback.
To be able to control your music, you need to authorize with the Spotify WEB API. To do that, a Spotify API application is required.
While creating the app, enter any redirect_uri. By default the module will use https://oskar.pw/ as redirect_uri since the site outputs your temporary authentification code.
- It is safe to rely on this site because the code is useless without your client secret and only valid for a few minutes.
+ It is safe to rely on this site because the code is useless without your client secret and only valid for a few minutes (important: you have to press the add and save button while adding the url).
If you want to use it, make sure to add it as redirect_uri to your app - however, you are free to use any other url and extract the code after signing in yourself.

@@ -990,7 +990,7 @@ sub Spotify_saveArtist($$$$) { # save an artist object to the readings seeks to the position lt;position> (in seconds, supported formats: 01:20, 80, 00:20, 20)
  • - shuffle <0,1>
    + shuffle <off,on>
    sets the shuffle mode: either on or off
  • @@ -1059,7 +1059,7 @@ sub Spotify_saveArtist($$$$) { # save an artist object to the readings Um die Wiedergabe zu steuern, wird die Spotify WEB API verwendet. Dafür wird eine eigene Spotify API application benötigt.
    Während der Erstellung muss eine redirect_uri angegeben - standardmäßig wird vom Modul https://oskar.pw/ verwendet, da diese Seite nach der Anmeldung den Code in leserlicher Form ausgibt.
    Die Seite kann bedenkenlos verwendet werden, da der Code ohne client_secret nutzlos und nur wenige Minuten gültig ist.
    - Wenn du diese verwenden willst, stelle sicher, diese bei der Erstellung anzugeben, ansonsten kann jede beliebige andere Seite verwendet werden und der Code aus der URL extrahiert werden.
    + Wenn du diese verwenden willst, stelle sicher, diese bei der Erstellung anzugeben (wichtig: das Hinzufügen der URL muss mit add und save bestätigt werden), ansonsten kann jede beliebige andere Seite verwendet werden und der Code aus der URL extrahiert werden.

    Define

    @@ -1135,7 +1135,7 @@ sub Spotify_saveArtist($$$$) { # save an artist object to the readings spult an die Position lt;position> (in Sekunden, erlaubte Formate: 01:20, 80, 00:20, 20)
  • - shuffle <0,1>
    + shuffle <off,on>
    setzt den Shuffle-Modus: entweder on oder off