libspotify

Spotify & Youtube API integration: Liked Youtube music videos in Spotify

本小妞迷上赌 提交于 2020-06-29 05:08:12
问题 An overview of the project. API Used Using Spotify API to Create a Playlist and add music to the playlist Using Youtube Data API to retrieve liked videos OAuth 2.0 for verification Goal: The liked youtube videos of my youtube account should automatically come inside my Spotify newly created playlist Code: import json import os import google_auth_oauthlib.flow import google.oauth2.credentials import googleapiclient.discovery import googleapiclient.errors import requests import youtube_dl from

Spotify & Youtube API integration: Liked Youtube music videos in Spotify

一世执手 提交于 2020-06-29 05:08:08
问题 An overview of the project. API Used Using Spotify API to Create a Playlist and add music to the playlist Using Youtube Data API to retrieve liked videos OAuth 2.0 for verification Goal: The liked youtube videos of my youtube account should automatically come inside my Spotify newly created playlist Code: import json import os import google_auth_oauthlib.flow import google.oauth2.credentials import googleapiclient.discovery import googleapiclient.errors import requests import youtube_dl from

spotify session callback get_audio_buffer_stats

99封情书 提交于 2020-01-17 03:57:48
问题 I'm trying to make a program in Spotify that collects the audio data. I saw in the API that there is a callback get_audio_buffer_stats, which has stutter and samples. I tried adding that to the program (I am just modifying the jukebox example), but it only ever prints 0 for stutter and samples, even when I turn off the wifi and wait for the song to stop playing. And by adding the code, I mean that I made a callback function for it, and I added it to the session callbacks. Am I missing

Playing ohLibSpotify pcm data stream in C# with NAudio

血红的双手。 提交于 2020-01-01 06:37:11
问题 I'm trying to play raw pcm data delivered from ohLibSpotify c# library (https://github.com/openhome/ohLibSpotify). I get the data in the following callback: public void MusicDeliveryCallback(SpotifySession session, AudioFormat format, IntPtr frames, int num_frames) { //EXAMPLE DATA //format.channels = 2, format.samplerate = 44100, format.sample_type = Int16NativeEndian //frames = ? //num_frames = 2048 } Now i want to directly play the received data with NAudio (http://naudio.codeplex.com/).

Build Python package with C bindings in Windows (VC90) causes LNK1181 fatal error

徘徊边缘 提交于 2019-12-24 18:05:35
问题 I'm trying to build a Python package (pyspotify) with bindings to a C library (libspotify). I'm using Python 2.7.5 and have installed VS2008 Express for some required commandline tools. When I call python setup.py build from the Command Prompt (with Admin rights) I get the following output: running build running build_py running build_ext building 'spotify._spotify' extension And then ~18 of these, one for each .c file in the package: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN

C#: marshall strings to utf8 char* [duplicate]

点点圈 提交于 2019-12-23 22:54:55
问题 This question already has answers here : PInvoke struct with array of unspecified length (2 answers) Closed 6 years ago . Background I am trying to write a high level libspotify wrapper based on a modified libspotify.net (http://libspotifydotnet.codeplex.com/). As libspotify.net is just a thin (and completely bugged ... ) pinvoke layer, it does not handle the utf8 encoding libspotify uses. My idea was to convert the string to a byte[] and change the signatures appropriately. I have this

Accessing Spotify API for Multiple Artists in R

独自空忆成欢 提交于 2019-12-14 00:25:38
问题 I have created a Client ID and Secret Key in Spotify's developer app section. I am referencing this document and want to extend this by choosing multiple artists. https://www.r-bloggers.com/the-eurovision-2016-song-contest-in-an-r-shiny-app/ In this example, they are only choosing 1 artist ID but there are some holes to this, 1) How do you obtain the artist name rather than the artist ID because I can't find a glossary key anywhere for the artist ID? 2) How do you choose multiple artists

libSpotify-based client slow, but Spotify's own client fast

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 12:48:04
问题 I've run into some weird issues with libSpotify. It seems that any libSpotify-based client will take ages to process requests (sometimes 20 seconds for a simple search, seconds for loading one single image, etc..) sent to Spotify servers, whereas Spotify's own desktop client for Windows works extremely well on the same system, processing requests and loading images in near realtime. Even the demo app provided with libSpotify, called spshell, exhibits massive problems: Did anyone experience

sp_user_display_name always returns canonical name, even when user is loaded

旧街凉风 提交于 2019-12-13 06:42:48
问题 Hello Spotify community =) I've been beating my head against this for a while. When I ask libspotify for the owner of a playlist via sp_playlist_owner , I am never able to get the user's display name out from sp_user_display_name . In the API, it mentions that the display name is only available after the user has been loaded. Specifically, this should be when sp_user_is_loaded returns true . However, I have found this to not be the case. I have hooked into every available playlist callback in

How can I get song metadata without using playUri using the Android SDK?

烂漫一生 提交于 2019-12-12 04:30:10
问题 I want to get song metadata from a URI without starting to play/buffer that song. The only way I can see of doing it right now is calling playUri() and then getMetadata() but I don't want to play it immediately. Is there any other way? Thanks! Edit: Is there a way to do this via the SDK with non-local files? 回答1: Use MediaMetaDataRetreiver: MediaMetadataRetriever retriever = new MediaMetadataRetriever(); retriever.setDataSource(context, uri); String artist = retreiver.extractMetadata