VIP |
Subscribe to become a VIP member of SST!
· Request More Often
· Unshared Requests
· Request Countdown Timer
· Request Ready Indicator
· Your Request History
· Access To The VIP Forum
· Add More Favorites
:: Click Here To Upgrade ::
:: Give VIP as a Gift ::
|
|
View previous topic ::
View next topic
|
Author |
Message |
janbenes
Cadet 1
Joined: Oct 30, 2003
Member#: 3525
Posts: 3
Location: Czech Republic
|
Posted:
Fri Mar 13, 2020 8:30 am Post subject: Change color of tuya cloud home lights based on playing albu |
|
Hello all,
for Spotify, lamps in my home change color according to album that is played. It works for any color bulb connected to tuya cloud.
I can easily make same modification for streamingsoundtracks, but I am struggling to get URL of the image of currently playing album.
If anyone can advise me how to get image of currently playing album for download, I will publish here script that can change color of your home lights by playing album.
Best regars, Jan |
|
|
607
Lieutenant
Joined: Sep 19, 2018
Member#: 46975
Posts: 222
Location: Amersfoort
|
Posted:
Mon Mar 16, 2020 4:41 am Post subject: |
|
It's http://www.streamingsoundtracks.com/images/cover/[ASIN].jpg. You can get the ASIN in several places. Assuming you can get the HTML source of the page periodically, you could search for "modules.php?name=Album&asin=", it will give the ASIN right after that.
There is no url that always contains the cover of the currently playing album, I'm pretty sure. |
|
|
janbenes
Cadet 1
Joined: Oct 30, 2003
Member#: 3525
Posts: 3
Location: Czech Republic
|
Posted:
Mon Mar 16, 2020 3:46 pm Post subject: |
|
Thanks very much. I have created the code, but it does not work for following reason: the string "modules.php?name=Album&asin=" does not appear anywhere in the page code. I looked for "asin=", it is there but it's first occurence is apparently some album in playlist history, because it does not return currently playing album.
If you can help me how to identify the correct asin, my code is ready. Unfortunately the string you gave me did not work.
Jan |
|
|
607
Lieutenant
Joined: Sep 19, 2018
Member#: 46975
Posts: 222
Location: Amersfoort
|
Posted:
Wed Mar 18, 2020 3:55 am Post subject: |
|
Hm, you're right. That's because the ASIN isn't in the html source, as it is dynamically updated. If you search for "asin=" you don't find an album in the playlist history, but either nothing (if you're on the queue page) or an album that got added to the playlist recently (if you're on the homepage).
I got the string from Inspect Element, but I'm not sure if you can use that. I did find that in the HTML5 player there is {{song.ThumbnailLink}} in the page source. However, I'm not sure how to actually get to the content of that variable, or if it's the right one.
I am also not experienced with such things, although I am interested to try to help. |
|
|
janbenes
Cadet 1
Joined: Oct 30, 2003
Member#: 3525
Posts: 3
Location: Czech Republic
|
Posted:
Wed Mar 18, 2020 7:50 am Post subject: |
|
Thank you. Even if it is possible to right-click on the image and copy its URL, the actual address is not in the HTML code. Too bad, here it is where I am stuck. |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
|
|