Jump to content
vdesabou

Spotify Mini Player: Control your Spotify library at your fingertips

Recommended Posts

alfred-spotify-mini-player.com

Find all information on dedicated website: alfred-spotify-mini-player.com
Follow on Twitter @TheMiniPlayer to get all news

Features

features.jpg

Example

index1.gif
 
 
PS: If you have a problem with the workflow, do not spend time reading the forum post, the workflow has been rewritten many times! Follow instructions from here http://alfred-spotify-mini-player.com/articles/support/ instead

Edited by vdesabou
update version

Share this post


Link to post

I added a simple way to make it easier to update the library.json file: http://cl.ly/OF1t

Thanks. Actually that's what I did at the beginning (having a separate keyword spot_mini to update the library.json file), but then I figured out that most of people will call the mini player by using an hotkey so they will be unaware of this way to update.

So I preferred to put everything in the Settings.

 

Maybe I'm missing something, but I don't get how it is easier like this?

 

In any case thanks for your contribution, and I hope you like this workflow

 

Cheers

Share this post


Link to post

Well, easier is probably not the best terminology. But since my library.json file gets quite large (~13mb), the player takes a while to load. Updating without loading the player is just quicker… this is an issue overall for me with the mini player actually. I guess I have too many playlists...

Share this post


Link to post

Well, easier is probably not the best terminology. But since my library.json file gets quite large (~13mb), the player takes a while to load. Updating without loading the player is just quicker… this is an issue overall for me with the mini player actually. I guess I have too many playlists...

 

Ok I see, it's more an overall problem...

My library.json file is "only" 2.2Mb, and that remains fluid (see the video demo I posted to compare to yours).

 

I personally prefer to have something really responsive for the tracks I listen the most (my starred playlist). When I want to listen for one of my playlists, I can search for it because i created the playlists.json file, and start the playlist quickly.

 

 

So I was thinking to get from the library.json a subset in a library_starred_playlist.json which contains only starred playlist. This is technically possible to do that.

Would that help in your case?

Share this post


Link to post

Hi vedesabou,

 

I've just been adding this in, looks awesome! while the library is updating I was just wondering if there's a quick way to export the information for the playlist json? I've got 100+ playlists and I don't fancy the idea of setting them all by hand.

 

Thanks!

Share this post


Link to post

Hi vedesabou,

 

I've just been adding this in, looks awesome! while the library is updating I was just wondering if there's a quick way to export the information for the playlist json? I've got 100+ playlists and I don't fancy the idea of setting them all by hand.

 

Thanks!

 

Unfortunately, I don't think there is a way to automate it as, if I'm not wrong, the Spotify App API (http://developer.spotify.com/technologies/apps/docs) does not provide a way to do that...

 

If you're using 100+ playlists, your library.json will be very huge. I suggest that you only use "starred playlist search scope only", otherwise you might hit perf issues.

 

Please let me know your feedback once you're using it

 

Thanks!

Share this post


Link to post

Unfortunately, I don't think there is a way to automate it as, if I'm not wrong, the Spotify App API (http://developer.spotify.com/technologies/apps/docs) does not provide a way to do that...

 

If you're using 100+ playlists, your library.json will be very huge. I suggest that you only use "starred playlist search scope only", otherwise you might hit perf issues.

 

Please let me know your feedback once you're using it

 

Thanks!

 

Yeah the library is 14.2MB :-S

 

It's been going for a couple of hours now and while the play/pause/skip etc commands are working fine when I go to the actual mini player (spot_mini) to search etc I just get a "please wait..." message pop up in Alfred...is this just due to the library size and it not being able to cope? "Starred playlist search scope only" is active.

 

Cheers

Edited by WelchWay

Share this post


Link to post

Yeah the library it 14.2MB :-S

 

Mine is "only" 2.1Mb

 

It's been going for a couple of hours now and while the play/pause/skip etc commands are working fine when I go to the actual mini player (spot_mini) to search etc I just get a "please wait..." message pop up in Alfred...is this just due to the library size and it not being able to cope? "Starred playlist search scope only" is active.

 

That's weird because if you use "starred playlist search scope only", the json file used is "library_starred_playlist.json", can you check that you have one in same directory?

 

If you can zip and provide me the 2 json files, I would be able to investigate more

 

Also, can you edit the spot_mini script filter and change it to:

 

php -f main.php -- "{query}" 2>&1 | tee output.log

 

And then provide the output.log that will be generated in the workflow directory

Share this post


Link to post

library_starred_playlist.json doesn't exist in the com.vdesabou.spotify.mini.player folder, only library.json and settings.plist

 

Setting contents:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>all_playlists</key>
<string>false</string>
<key>max_results</key>
<string>10</string>
</dict>
</plist>

Share this post


Link to post

library_starred_playlist.json doesn't exist in the com.vdesabou.spotify.mini.player folder, only library.json and settings.plist

 

Can you check that you're using the latest version (1.9) because since version 1.7, you should have library_starred_playlist.json

 

Please give me the output.log also

Share this post


Link to post

It's v1.9

 

outputlog contents:

 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /Users/andy/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.1C9D6F6A-24BE-4013-A636-E186A1F4BC17/main.php on line 44

Share this post


Link to post

It's v1.9

 

outputlog contents:

 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /Users/andy/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.1C9D6F6A-24BE-4013-A636-E186A1F4BC17/main.php on line 44

 

Thanks. Can you try version 1.10, that should hopefully fix the issue

Share this post


Link to post

Thanks. Can you try version 1.10, that should hopefully fix the issue

 

thanks for quick update, i've installed v1.10 and I now get the following errorin the output log:

 

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 28395741 bytes) in /Users/andy/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.1C9D6F6A-24BE-4013-A636-E186A1F4BC17/main.php on line 51

 

I still haven't got a library_starred_playlist.json file though, how should this be generated? Does the mini player interrogate the library json and produce it itself?

 

If it's only running off the starred_playlist will it only try to allocate that as opposed to the full library?

 

Thanks for all your help, hope we can get this working.

Share this post


Link to post

thanks for quick update, i've installed v1.10 and I now get the following errorin the output log:

 

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 28395741 bytes) in /Users/andy/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.1C9D6F6A-24BE-4013-A636-E186A1F4BC17/main.php on line 51

 

I still haven't got a library_starred_playlist.json file though, how should this be generated? Does the mini player interrogate the library json and produce it itself?

Yes it produces it itself if it cannot find it. This is where is it failing.

 

Let me have a deeper look, I'll have to reproduce the problem first

Share this post


Link to post

Any chance you can share with me your library.json file? I would like to avoid subscribing to 100+ playlists, just to reproduce your problem :-)

 

I tried to send you a private message but apparently you can't receive it.. Please send me a direct message with a link to your json file.

Share this post


Link to post

Updated to V1.11 and reinstalled everything, still no library_starred_playlist.json and now the outputlog gives:

 

 
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /Users/andy/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.8990DD0A-7097-4936-903B-B9D8A0E41705/main.php on line 51
 
It seems like the library is getting loaded into memory multiple times? as a 15mb json file should only take up 15728640 bytes.
 
I've been looking around the forum and can't see any way to direct message you, it could be due to my being a new member? I get this message at the top of my replies
 
"You can make 5 more posts until Today, 02:19 PM. This restriction is in place until 24 April 2013 - 02:16 PM"

Share this post


Link to post

Updated to V1.11 and reinstalled everything, still no library_starred_playlist.json and now the outputlog gives:

 

 
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /Users/andy/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.8990DD0A-7097-4936-903B-B9D8A0E41705/main.php on line 51
 
It seems like the library is getting loaded into memory multiple times? as a 15mb json file should only take up 15728640 bytes.
 
wow, I really need to reproduce using your json file...Can you post a link to you (zipped) json file here?
 
 
 
I've been looking around the forum and can't see any way to direct message you, it could be due to my being a new member? I get this message at the top of my replies
 
"You can make 5 more posts until Today, 02:19 PM. This restriction is in place until 24 April 2013 - 02:16 PM"

 

No idea, this is a question for the staff :)

Share this post


Link to post

Updated to V1.11 and reinstalled everything, still no library_starred_playlist.json and now the outputlog gives:

 

 
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /Users/andy/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.8990DD0A-7097-4936-903B-B9D8A0E41705/main.php on line 51
 
Ok I reproduced with your library.json and updated to 256Mb, everything works now on my side.
 
Can you update to 1.12?
 
Version 1.12:
 
- Updated (again) allocated memory to 256M
- Check json data is valid when creating/updating library
- Minor fixes

Share this post


Link to post
 
Ok I reproduced with your library.json and updated to 256Mb, everything works now on my side.
 
Can you update to 1.12?
 
Version 1.12:
 
- Updated (again) allocated memory to 256M
- Check json data is valid when creating/updating library
- Minor fixes

 

V1.12 works for me too! Awesome! Thank you.

 

Might try changing to search all playlists just to see the impact later on...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×