Jump to content


Photo

Spotify Mini Player [Version 4.2.2]

spotify

  • Please log in to reply
285 replies to this topic

#1 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 09 April 2013 - 07:03 PM

Alfred Spotify Mini Player
This is "Spotify Mini Player", like the alfred built-in iTunes Mini Player, but for Spotify!

Description
Speed is the key word here: instead of using slow Spotify API, it uses a local version of your library stored in a database(it includes all the playlists you created and playlists that you're subscribed to). You can decide to search in your starred playlist only, or in all all your playlists. You can browse by Artist, Album or Playlist. You can also lookup for artists online, search for lyrics, get related artists, display biography, etc..
You can also control Spotify using keywords such as play/next/volmax/random/shuffle/star/etc...

Animated Gifs

  • Search in all your playlists

  • pKTGG2faiC.gif
     
  • Browse and launch your playlists


  • A9tePlpX1S.gif
     
  • Update your playlist and see progress


  • tx8lqblTEu.gif
     
  • Browse by artist


  • UKMug-dWQV.gif
     
  • Lookup artist "online"


  • zbv6NCInTi.gif

    Features
  • Hotkey to trigger the workflow
  • Update of playlists directly from the workflow!
  • Search for Albums, Artists or Tracks
  • Search for playlists (including your Top List), browse them and launch them
  • Browse by Artists, Albums or Playlists
  • Lookup artist online by using ctrl key on a track
  • Alfred Playlist manage a playlist from Alfred: add track (using fn), albums or playlist (using ⇧)
  • Select a track with ⌥ to play the album, or ⌘ to play the artist
  • Same control keywords as iTunes Mini Player: play, pause, mute, next, random, previous, volmax, volmid. And shuffle to activate shuffling.
  • Star currently played track with keyword star
  • Display artist bigraphy
  • Browse Related artists
  • Display current track lyrics
  • Two themes available: black and green
  • Auto-Updater: it checks once per day and download automatically the new version
  • Direct call to Spotifious workflow

  • Settings
  • Configurable Search Scope: Only Starred playlist (by default) or All your playlists
  • Set max number of results. 50 by default
  • enable/disable Spotifious or Alfred Playlist
  • enable/disable Lookup this artist online
  • Check for workflow update
  • Choose workflow theme: black or green
  • Install/Update of the library (see next section for explanations)
  • [/list]
    First time use
    You'll need to do the following steps:
     
  • Sign up for a developer account on Spotify (you must allow app API).

  •  
  • Download the latest version of Spotify and install it (I had to do it, even though I was pretty sure to already have the latest version, so please do it!)

  •  
  • Type "spot_mini" or configured hotkey to invoke Spotify Mini Player, and select "1/ Open Spotify Mini Player App <spotify:app:miniplayer>"


  • QVFwkPR7V7.png
     
  • If it doesn't work (Spotify indicates "Failed to load application miniplayer."):


  • * try to restart Spotify multiple times

    * try to logout from Spotify and login again

    * make sure you see in Developer Account:

      
    Developer Account
    Your account has already been enabled to use the Spotify Apps API. Happy hacking!
    
  • If it works, invoke the Spotify Mini Player workflow again and select "2/ Install library"

  •  
  • After some time, you should get a notification saying that library has been created.


  • Note that the first time the library is created, all artworks are downloaded, so it can take a while!

    You can check progress by invoking the workflow again:-

    NajHMexvb7.png


    Library/Playlist Update
    You can now update your entire library and/or only one specific playlist directly from the Spotify Mini Player!

    For example:

    QER69TlaZa.png

    Alfred Playlist
    The Alfred Playlist is one of your playlists where tracks, albums and even playlists can be added from within the workflow.
     
  • Simply choose one of your playlists as the current "Alfred Playlist" (you can even choose your starred playlist)


  • CkEfC9emQI.png
     
  • To add a track to your playlist select it with fn modifier


  • O9I8lqCvl3.png
     
  • To add an album or another playlist to your playlist select it with shift modifier


  • I6zvg23d39.png

     
  • You can also clear all tracks from your Alfred Playlist (for security, you cannot do it if your starred playlist is the Alfred Playlist), be careful when doing it.


  • A confirmation will be asked:

    y6qlZZaGaK.png


    Now Playing
    This is an option to diplay various options based on the current track (play/pause, browse artist, display lyrics, show playlists where the track belongs)

    PZrDLRlLwb.png

    Commands
  • Modifer keys
  • [/list]
    8TSup8JB2l.png
     
  • Other commands


  • Note: These commands can also be triggered from the main workflow window

    nGQOVeLbdr.png


    Auto-Update
    The workflow checks for update once per day, if an update is available, it will download the new version in your Downloads folder.

    Note that you can also force a check for update in Settings section


    Troubleshooting
    If you experience an issue with the workflow, use the "spot_mini_debug" command, it will generate a spot_mini_debug.tgz file in your Downloads directory. Then send this file to me.

    rkqaeTehJK.png

    If the update library is stuck (be aware the first time, it can take hours as all artworks are downloaded, next times it shall not exceed 10 minutes), you can kill it by invoking "spot_mini_kill" command:

    rusuJc78Wg.png

    If you want to report an issue or propose an enhancement, use the "spot_mini_issue" command.

    Credits
  • Spotifious workflow
  • Ratchet
  • SpotCommander
  • Terminal-Notifier
  • [/list]

    Download the workflow
    Download the workflow below and open in Alfred.

    alfred-workflow-icon.png
  • [/list]
  • [/list]

Edited by vdesabou, Yesterday, 07:11 PM.

  • thec13 and dmclimbr like this

#2 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 10 April 2013 - 01:18 PM

Just updated to version 1.3 with bugs fixes and enhancements!



#3 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 10 April 2013 - 08:58 PM

I don't feel a lot of enthusiasm!!! :-) if you are afraid of the setup, don't be, it takes at most 5 minutes! You just have to follow steps.
The playlist setup is totally optional
If you are a spotify user, you should definitely give it a try !

#4 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 11 April 2013 - 09:02 AM

1.5:
  • Display current track information.
  • Select current track to play/pause the track
  • Added More from this Artist and More from this album

Edited by vdesabou, 20 April 2013 - 12:14 PM.


#5 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 11 April 2013 - 05:41 PM

Version 1.6 Please update your library.json after installing this version
 
  • Fix for duplicate tracks in results. 
  • Better handling of UTF-8 characters.


#6 linuslundahl

linuslundahl

    Newbie

  • Member
  • Pip
  • 8 posts

Posted 12 April 2013 - 06:52 AM

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



#7 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 12 April 2013 - 07:46 AM

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



#8 linuslundahl

linuslundahl

    Newbie

  • Member
  • Pip
  • 8 posts

Posted 12 April 2013 - 12:25 PM

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...



#9 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 12 April 2013 - 12:33 PM

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?



#10 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 12 April 2013 - 01:38 PM

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?

 

Ok i implemented it:

 

 

Download
 
Version 1.7 Please update your library.json after installing this version
 
History
 
1.7:
  • Performance improvement when using Starred Playlist only Search Scope (only a subset of library.json is loaded)


#11 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 13 April 2013 - 09:03 AM

Download
 
 
History
 
1.8:
  • Added same keywords as iTunes Mini Player: play, pause, mute, next, previous, volmax, volmid. And shuffle to activate shuffling.


#12 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 17 April 2013 - 12:30 PM

Download
 
 
History
 
1.9:
  • Do not fetch online artworks for current track(for performance reasons).
  • Minor bug fixes. 
  • New icons.


#13 WelchWay

WelchWay

    Member

  • Member
  • PipPip
  • 36 posts

Posted 17 April 2013 - 01:19 PM

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!



#14 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 17 April 2013 - 01:35 PM

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.spo...ogies/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!



#15 WelchWay

WelchWay

    Member

  • Member
  • PipPip
  • 36 posts

Posted 17 April 2013 - 03:58 PM

Unfortunately, I don't think there is a way to automate it as, if I'm not wrong, the Spotify App API (http://developer.spo...ogies/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, 17 April 2013 - 04:02 PM.


#16 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 17 April 2013 - 04:05 PM

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



#17 WelchWay

WelchWay

    Member

  • Member
  • PipPip
  • 36 posts

Posted 17 April 2013 - 04:12 PM

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...rtyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>all_playlists</key>
<string>false</string>
<key>max_results</key>
<string>10</string>
</dict>
</plist>


#18 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 17 April 2013 - 04:15 PM

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



#19 WelchWay

WelchWay

    Member

  • Member
  • PipPip
  • 36 posts

Posted 17 April 2013 - 04:22 PM

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



#20 vdesabou

vdesabou

    Advanced Member

  • Member
  • PipPipPip
  • 273 posts

Posted 17 April 2013 - 04:52 PM

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





Also tagged with one or more of these keywords: spotify

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users