Kodi Community Forum
Beta Spotify for Kodi - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Music Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=148)
+---- Thread: Beta Spotify for Kodi (/showthread.php?tid=265356)



RE: Spotify for Kodi - Wanilton - 2016-11-09

@FernetMenta, trouble is in curlfile.cpp (filesystem), if changed code a little, addon work fine, tested in windows 10, with more recent nightly.

Removing this
Code:
else if (name == "postdata")
        {
          m_postdata = Base64::Decode(value);
          m_postdataset = true;
        }
        else if (name == "active-remote")// needed for DACP!
        {
          SetRequestHeader(it->first, value);
        }
        // other standard headers (see https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)
        else if (name == "accept" || name == "accept-language" || name == "accept-datetime" ||
                 name == "authorization" || name == "cache-control" || name == "connection" ||
                 name == "content-md5" || name == "content-type" || name == "date" ||
                 name == "expect" || name == "forwarded" || name == "from" ||
                 name == "if-match" || name == "if-modified-since" || name == "if-none-match" ||
                 name == "if-range" || name == "if-unmodified-since" || name == "max-forwards" ||
                 name == "origin" || name == "pragma" || name == "range" || name == "te" ||
                 name == "upgrade" || name == "via" || name == "warning" ||
                 name == "x-requested-with" || name == "dnt" || name == "x-forwarded-for" ||
                 name == "x-forwarded-host" || name == "x-forwarded-proto" ||
                 name == "front-end-https" || name == "x-http-method-override" ||
                 name == "x-att-deviceid" || name == "x-wap-profile" || name == "x-uidh" ||
                 name == "x-csrf-token" || name == "x-request-id" || name == "x-correlation-id" ||
                 name == "icy-metadata")
        {
          SetRequestHeader(it->first, value);
          if (name == "authorization")
            CLog::Log(LOGDEBUG, "CurlFile::ParseAndCorrectUrl() adding custom header option '%s: ***********'", it->first.c_str());
          else
            CLog::Log(LOGDEBUG, "CurlFile::ParseAndCorrectUrl() adding custom header option '%s: %s'", it->first.c_str(), value.c_str());
        }
        // we don't add blindly all options to headers anymore
        // if anybody wants to pass options to ffmpeg, explicitly prefix those
        // to be identified here
        else
        {
          CLog::Log(LOGDEBUG, "CurlFile::ParseAndCorrectUrl() ignoring header option '%s: %s'", it->first.c_str(), value.c_str());
        }
      }
    }
  }

And replace with only this code, addon work fine in Krypton.

Code:
else if (name == "postdata")
        {[video=youtube]https://youtu.be/EOyOxIJ6loQ[/video]
          m_postdata = Base64::Decode(value);
          m_postdataset = true;
        }        
        else
          SetRequestHeader(it->first, value);      
      }
    }
  }

Prabably have better way for fix, hope help you.

Make one video show spotify working Kodi Krypton, skin Aeon MQ7. Test Spotify begin 0:30 sec




RE: Spotify for Kodi - rypkep - 2016-11-10

I am getting the 'no valid browser was found...' message.

Working on a Asustor NAS. There are two browsers installed.

What can i do?


RE: Spotify for Kodi - A600 - 2016-11-10

(2016-11-09, 22:52)Wanilton Wrote: trouble is in curlfile.cpp (filesystem), if changed code a little, addon work fine, tested in windows 10, with more recent nightly.

The addon is sending the name "x-spotify-token"

so replacing

Code:
name == "icy-metadata")

with

Code:
name == "icy-metadata" || name == "x-spotify-token")

fixes the issue (compiled and tested on Windows)

or a better solution: replace all the instances of "x-spotify-token" in the addon with, for example, "x-csrf-token" (also tested and working).


RE: Spotify for Kodi - ray2301 - 2016-11-10

(2016-11-10, 04:55)A600 Wrote: or a better solution: replace all the instances of "x-spotify-token" in the addon with, for example, "x-csrf-token" (also tested and working).

this works perfectly!


RE: Spotify for Kodi - User 224999 - 2016-11-10

(2016-11-10, 04:55)A600 Wrote: or a better solution: replace all the instances of "x-spotify-token" in the addon with, for example, "x-csrf-token" (also tested and working).

Great work, I will try this tonight and deploy a new beta version if it's working.

BTW: Sorry That I did not yet reply here to all the comments. I switched to Macbook recently and the Spotify addon doesn't work at all on MacOs Sierra, like FernetMenta was also experiencing


RE: Spotify for Kodi - loggio - 2016-11-10

(2016-11-10, 04:55)A600 Wrote: or a better solution: replace all the instances of "x-spotify-token" in the addon with, for example, "x-csrf-token" (also tested and working).

@Marcelveldt, I can confirm this works. Just converted all instances of x-Spotify-token in the addon directory with x-csrf-token, then reboot.
Working on RPi using latest nightlies! Big Grin

Thanks Wanilton and A600


RE: Spotify for Kodi - Jönke - 2016-11-11

Great news guys ! Thanks !!


RE: Spotify for Kodi - sanity - 2016-11-11

Where exactly are those files located that needs to be replaced?
I did search but can't seem to find them.


RE: Spotify for Kodi - ray2301 - 2016-11-11

(2016-11-11, 09:43)sanity Wrote: Where exactly are those files located that needs to be replaced?
I did search but can't seem to find them.

the files are in the add-on directory. in plugin.audio.spotify.
i just opened all the files in notepad++, searched them all for "x-spotify-token" and replaced all with "x-csrf-token".
i didn't even look which exact files i replaced. i just opened all files within plugin.audio.spotify folder with notepad++ in tabs.


RE: Spotify for Kodi - sanity - 2016-11-11

Thank you! I forgot about the great program notepad++


Spotify for Kodi - pflm2324 - 2016-11-11

Hi to all, just like to ask if it's possible to integrate spotify in kodi library. Thanks in advanced


Enviado do meu iPad usando Tapatalk


RE: Spotify for Kodi - DarkHelmet - 2016-11-11

To my knowledge adding music from an addon to the music library is impossible for all music addons.


RE: Spotify for Kodi - foxstefano - 2016-11-11

(2016-11-10, 16:04)ray2301 Wrote:
(2016-11-10, 04:55)A600 Wrote: or a better solution: replace all the instances of "x-spotify-token" in the addon with, for example, "x-csrf-token" (also tested and working).

this works perfectly!

Just tried: I confirm, it works! Wink

Thank you!


RE: Spotify for Kodi - macardi - 2016-11-11

(2016-11-10, 16:31)marcelveldt Wrote:
(2016-11-10, 04:55)A600 Wrote: or a better solution: replace all the instances of "x-spotify-token" in the addon with, for example, "x-csrf-token" (also tested and working).

Great work, I will try this tonight and deploy a new beta version if it's working.

BTW: Sorry That I did not yet reply here to all the comments. I switched to Macbook recently and the Spotify addon doesn't work at all on MacOs Sierra, like FernetMenta was also experiencing

Please do not leave the development of this fantastic addon behind because of this. Its such a wonderful addition to the Kodi experience. When this addon was first released and I realized who the developer was I felt such joy because of your devotion and hard work and excellence on other scrips witch have made Kodi so great. Dont get me wrong, the addon is fantastic as it is and I dosent miss anything, but I guess it has to be maintained in order to work in the long run.

Im such a fan of your work and so very grateful for sharing your work with the community.

/Marcus

On another note, the default view for artist, album, song does not seem to work for me anymore, Has anything changed in the core wish could have had an effect on this?


Spotify for Kodi - pflm2324 - 2016-11-13

(2016-11-11, 16:48)DarkHelmet Wrote: To my knowledge adding music from an addon to the music library is impossible for all music addons.


Ok thanks for the info.




Enviado do meu iPad usando Tapatalk