Jump to content

vdesabou

Member
  • Posts

    466
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by vdesabou

  1. Hi All,

     

    I noticed a problem since I installed Mavericks. When I select a file type element to browse it in Alfred, the window blinks and nothing more happens.

     

    Here is a reproduction with a small workflow:

     

    Xuk7+.png

     

     

    And script filter content:

    cat << CODE
    <?xml version="1.0"?>
    <items><item uid="Users" arg="/Users/" valid="yes" type="file">
    <title>/Users/</title>
    <subtitle>Browse in Alfred</subtitle>
    <icon type="fileicon">/Users</icon>
    </item></items>
    CODE
    

    Find the workflow here: http://d.pr/f/dyMh

     

    Let me know if I'm the only one to experience this (I tested on my two Macs)

     

    Thanks

  2. this issue with PHP notices is something I have with a lot of workflows based on PHP, since I am a PHP developer myself I have set the error reporting in my php.ini to E_ALL | E_STRICT, meaning I will get all errors, warnings and notices printed. The quick fix is changing the setting in your php.ini file. The solution I've done is adding:

     

    error_reporting(0);

     

    to php-files in the workflows that are not working for me.

     

    Allright :-)

     

    I can add it to the workflow then, or you can do a Pull request on git if you want :-) 

     

    https://github.com/vdesabou/alfred-spotify-mini-player

     

    Thanks

  3. I have no settings.db directory and I do not remember manually deleting it. And when I invoke the mini player it does not seem to be getting created.

     

    That's strange, because the file should be created if the file does not exist, if you know php, here is the related code:

    //
    // Create settings.db with default values if needed
    //
    if(!file_exists($w->data() . "/settings.db"))
    {
    	touch($w->data() . "/settings.db");
    	
    	$sql = 'sqlite3 "' . $w->data() . '/settings.db" ' . ' "create table settings (all_playlists boolean, is_spotifious_active boolean, is_alfred_playlist_active boolean, is_displaymorefrom_active boolean, max_results int, alfred_playlist_uri text, country_code text)"';
    	exec($sql);
    	
    	$sql = 'sqlite3 "' . $w->data() . '/settings.db" ' . '"insert into settings values (0,1,1,1,50,\"\",\"\")"';
    	exec($sql);
    }
    

    The touch($w->data() . "/settings.db"), should at least create the file.

     

    Are you sure you do not have this file? In the same directory, you should see a library.db as well..

  4. Here you go. I did not know it was in php or else I would have looked at it myself. 

    http://cl.ly/image/233D0f2k4145

     

    The workflow cannot read the settings that are stored in a sqlite DB located in /Users/YOUR_USER/Library/Application Support/Alfred 2/Workflow Data/com.vdesabou.spotify.mini.player/settings.db directory.

     

    Can you check that you have this settings.db file in  /Users/YOUR_USER/Library/Application Support/Alfred 2/Workflow Data/com.vdesabou.spotify.mini.player directory.

    If you have, delete it and when next time the workflow is invoked, a new one should be created with default values.

     

    Keep me posted 

  5. 
    Warning: opendir(/Users/oliver/Library/Application Support/Alfred 2/Workflow Data/com.vdesabou.spotify.mini.player/artwork): failed to open dir: No such file or directory in /Users/oliver/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B481C81C-2890-4A00-8DEB-F80F71AC64E0/functions.php on line 194
    ERROR: JSON data is not valid!
    

     

    The error JSON data is not valid means that when you selected the install library action, the clipboard did not contain your JSON library. You need to follow the steps in "First time use" in the first post, specifically the step where you select the JSON data in the box and copy it to clipboard, right before install/update the library.

     

    Let me know if this is enough clear

  6.  

    output.log
     
    <?xml version="1.0"?>
    <items><item uid="" arg="/Users/oliver/Library/Application Support/Alfred 2/Workflow Data/com.vdesabou.spotify.mini.player/update_library_in_progress" valid="no" autocomplete=""><title>Library update in progress</title><subtitle>Please come back later</subtitle><icon>./images/warning.png</icon></item></items>
     
    

    The output_action.log is empty and 0 Byte

     

     

    Ok, Can you delete the file "update_library_in_progress" in the same folder, and then do an install/update library and then provide the output.log.

    Can you also check that you have a "spotify-app-miniplayer" folder in the same folder?

  7. Hello,

     

    sorry for my bad englisch …

     

    The Miniplayer doesn't work for me. Alfred shows "Library update in progress" for 2 days.

     

    The /Users/(me)/Spotify folder is empty.

     

    Thanks.

     

    Hi, Can you share the output.log and output_actions.log that are located in the workflow folder?

     

    Hi,

     

    I have the same problem as beetlefrosch.  I followed all the steps but the "Library update in progress" never ends.  It's been running for 12 hours now and I only have a few playlists and I would not consider my iTunes library (if it is caching those images too) to be very large either.  Is there any other way of getting this step completed or speeding it up ?

     

    I'm using the latest version from the first post on the first page of this thread.

     

    My Users/Spotify directory is not empty.

    It contains the spotify-app-miniplayer directory, the css and js subdirectories and icon.png, index.html and manifest.json files within the spotify-app-miniplayer folder

     

    Many thanks

     

    Can you share the output.log and output_actions.log that are located in the workflow folder?

     

    Thanks

  8. Oh, I'm sorry! Apparently, my notifications for the forum didn't work properly...

     

    Output_action.log is empty.

    This one's from output.log:

     

    Hi,

     

    You have two issues:

     

    1/ This error:

     

     

    2013-08-01 11:19:05.700 osascript[4093:f0b] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find:
    /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
    osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
     
    I found this on internet. Can you follow the instructions to fix it: http://robpickering.com/2011/01/adobe-type-units-error-how-to-fix-it-343
     

    2/ Error: no such table: counters

     

    After fixing 1, try to update your library. If you still get an issue, please provide your library.db and settings.db in the spotify mini player application  support directory (ping me if you don't know where it is)

     

    Keep me posted!

  9. Many thanks for your great work, really appreciate it!

     

    Still, I've got a problem concerning the installation. I've downloaded the newest version of Spotify and registered for the developer API. Whenever I try to launch the Mini player I only get the following window.

     

    Do you have an idea what I could possibly try to get it working?

     

    Thanks alot!

     

    sgr59i.png

     

    Hi,

     

    Yes, some thing wrong is happening here :-)

    Can you provide the output.log and output_action.log files that are located in the Spotfify mini player workflow folder? 

  10. Performance is fine all things considered - most results come back in <5s however opening some of my larger playlists can take up to 30s but to be honest most of the time I just launch playlist without browsing it first so that's not really an issue

     

    I do have it set to search all my playlists and max results is set to 100 so I wasn't expecting instantaneous results with a library of my size :-P

     

    I made major improvements with version 3.0. Using your library I can set max results to 100 and it takes only 150 ms to get results!!

    You should definitely have a try!

     

    Cheers

  11.  

    Anyway, yeah, an SQLite database would be one way to speed this up. That's how I did the Chrome Bookmarks Search workflow (which I need to finish updating). I used a library I was building initially to try to simplify the interaction with the database but, it seems now that just executing the query from the command line is a lot faster. To do this you would need to set an "updated" flag in the database somewhere so that you could check the last time it was updated (may could even just check the file mod time of the database). Each time you execute, check mod time of the json file and last updated time, if they differ, truncate the database cache and rebuild it. Truncating and rebuilding (even with a lot of records) is surprisingly fast.

     

    Hi David,

     

    I finally implemented this SQL solution in the version 3.0 of my workflow, and yeah that's amazing how this has improved performances!!! I get 100 results with a 18K library, with artworks displayed, within 150ms!!

     

    See it in action here https://vimeo.com/70175318

     

    FYI, I was using your methods from workflows.php to store configuration in plist file but I had some performances issues with it, so I decided to store settings in SQL db as well :-)

     

    Thanks for your help!

  12. I am happy to announce a major update for this workflow:

     

    3.0:

    • Major speed improvements. Using a library with 18000 tracks, search scope set to ALL, with artworks displayed, it takes 150ms to return 50 results
    • Launch your top list
    • Online mode: Lookup for artist online and then browse all albums and tracks
    • Many more improvements

     

    PLEASE UPDATE YOUR LIBRARY AFTER INSTALLING THIS NEW VERSION

×
×
  • Create New...