AutoTools AutoTools 2.0 + webscreens, how to get started?

Discussion in 'AutoApps' started by Wouter, Jul 28, 2017.

  1. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    Thanks, this version works. I've chosen %url_big. The three double images are gone!

    However, some of the images aren't there. I saw that earlier. Please compare the pictures. For instance Adele - 25 and some others are missing.
    [images deleted]
     
    Last edited: Aug 1, 2017
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    804
    Can you please enable system logs in AutoWeb and check what the JSON response is for that request?
     
  3. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    Yes. This is the log:
    version 0.0.46b

    OS Build NRD90M release-keys
    OS Code 24
    Device HTC 10
    Manufacturer HTC
    Product pmeuhl_00401
    Code (Text):

    Api Updates - 2017-08-01 15:33:51.127 - Not uploading because no updates since last upload
    Api Calls - 2017-08-01 15:33:50.929 -

    [Log edited out]
     
    Last edited: Aug 1, 2017
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    804
    Yeah, for some reason that Adele - 25 playlist isn't returning any images:

    Code (Javascript):
    {
                "collaborative": false,
                "external_urls": {
                    "spotify": "http://open.spotify.com/user/deechtewber/playlist/7Ld1Uw8m0kVfzqgPBFuJUN"
                },
                "href": "https://api.spotify.com/v1/users/deechtewber/playlists/7Ld1Uw8m0kVfzqgPBFuJUN",
                "id": "7Ld1Uw8m0kVfzqgPBFuJUN",
                "images": [],
                "name": "Adele – 25",
                "owner": {
                    "external_urls": {
                        "spotify": "http://open.spotify.com/user/deechtewber"
                    },
                    "href": "https://api.spotify.com/v1/users/deechtewber",
                    "id": "deechtewber",
                    "type": "user",
                    "uri": "spotify:user:deechtewber"
                },
                "public": true,
                "snapshot_id": "LWGztLTaLIOCxWBbAIjgvr2PKc7KA/w5qCkJf6JmxHrdjltEudfS2YIoJe7YvxvQ",
                "tracks": {
                    "href": "https://api.spotify.com/v1/users/deechtewber/playlists/7Ld1Uw8m0kVfzqgPBFuJUN/tracks",
                    "total": 11
                },
                "type": "playlist",
                "uri": "spotify:user:deechtewber:playlist:7Ld1Uw8m0kVfzqgPBFuJUN"
            }
    Have any idea why? Maybe try setting it yourself if possible?
     
  5. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    I don't know why. And it's not the only playlist. I can check what I can do in the Spotify app. Wouldn't it be possible to make AutoWeb output something, if the api doesn't give anything? Maybe some default image of a broken link or something? This way, the missing image makes all of the images move up one place, not corresponding with the name anymore.

    And can you tell me how to play the list? What variable do I need from the Spotify api, and how to play that? Do I send an intent?
     
  6. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    I removed and readded Adele - 25, which fixed that. I removed the playlist "Favorites" entirely, it showed no image either. I guess it was automatically generated by Spotify.

    The first 20 images are OK now, using %url_big. It's not showing more than 20. I went to purchase the full versions of AutoTools and AutoWeb to be sure, but the latter still isn't fetching more than 20.

    And can you tell me how to play the list? What variable do I need from the Spotify api, and how to play that? Do I send an intent?
     
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    804
  8. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
  9. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    The variable to query for the link to play the playlist is %item_uri.

    The playing part was easy. Just for future reference to whomever would like to create this too:

    In the AutoTools WebScreens action that actually makes the navigation drawer appear, enter a commands prefix > spotifypl

    Make a new profile > event > plugin > autoapps. Command filter > spotifypl=:=
    Under Variable Names enter %uri

    Make that profile execute a new task. The task contains only 1 action > NET > Browse url. For url choose %uri

    Now my last remaining question is how to show all my playlists instead of just the first 20?
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    804
    Ok, I've updated the API to include the Limit and Offset parameters :) Hope this helps!
    Let me know if you have any trouble using them!
    Also, about your profile, I would make that more generic :)
    Something like a "openurl=:=" command that would work for any URL. That way you can always send a command like that from any of your tasks and it will open the URL!
     
  11. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    Thanks for the api update and for the advice, Joao!
    Unfortunately, I have 107 playlists. I've been using Spotify for a long time :) Would it be possible to raise the max from 50 to 150 or something? Would be great!
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    804
    Nope. But you can use the offset to get them in steps :) First get 1 to 50, then get 51 to 100, etc :)
     
  13. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    Ah, that's a good night idea! Will work around it this way.
     
  14. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    I configured AutoWeb to get playlists 1-50 from the Spotify api. Next 51-100 with offset 50. Lastly 101-150 with offset 100. The result is 3 times playlists 1-50. Looking in the AutoWeb log, I see the three calls to the api. The log says offset=0 for all calls. I think the offset isn't properly handled. Could you look into it? Thanks!
     
  15. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    804
    Oops, sorry! You're right! I misconfigured the offset parameter. Should be fixed now! :) Sorry for the delay!
     
  16. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    Thank you. Yes, with today's update of the api in AutoWeb it works great!
     
  17. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    804
    Awesome! :)
     
  18. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    Hi Joao, I've found a problem specific to the navigation drawer WebScreen. When I tap exactly on the line on the left, my screen becomes unresponsive in all of Android. I mean the line that you swipe to drag open the navigation drawer. Just not dragging it but a short tap. Then the whole screen except for the notification bar will become unresponsive, until the moment you actually drag open the drawer, that will fix it.

    It took me a while to find this. Kept wondering why my phone sometimes wouldn't work. Then I first found out that opening the drawer fixed it and finally what the related cause was.

    Is it possible to fix this in the WebScreen?
     
  19. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    804
    Thanks, I'll try to fix it when I can :) Thanks for the report!
     
    Wouter likes this.
  20. Wouter

    Wouter Member

    Joined:
    Feb 4, 2016
    Messages:
    71
    Likes Received:
    2
    Thanks!
     
: spotify

Share This Page