StreamingSoundtracks
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 ::

Listen Live!

Follow Us

Donation Meter


Make donations with PayPal!
Monthly Goal:
$500.00

Need:
$187.62

10 Donations:
$312.38

StreamingSoundtracks.com (Jul-4) paul4opus $15.00
Death.FM (Jul-2) SeclusionSolution $6.66
StreamingSoundtracks.com (Jul-2) MorG $5.00
Death.FM (Jul-2) JERIC $1.00
StreamingSoundtracks.com (Jul-2) JERIC $1.00
1980s.FM (Jul-2) JERIC $1.00
Adagio.FM (Jul-2) JERIC $1.00
Entranced.FM (Jul-2) JERIC $1.00
Death.FM (Jul-1) osiris $10.00
Entranced.FM (Jul-1) Seclu $270.72


 


Last Month's Donors
Entranced.FM (Jun-23) Anonymous $25.00
Death.FM (Jun-13) shru $50.00
1980s.FM (Jun-9) shru $10.00
StreamingSoundtracks.com (Jun-7) Shru $50.00
Death.FM (Jun-2) osiris $10.00
Entranced.FM (Jun-2) SoNiA $25.00




Search

 


Change color of tuya cloud home lights based on playing albu

 
Post new topic   Reply to topic    StreamingSoundtracks.com Forum Index -> Streaming
View previous topic :: View next topic  
Author Message
janbenes
Cadet 1
Cadet 1


Joined: Oct 30, 2003
Posts: 3
Location: Czech Republic

PostPosted: Fri Mar 13, 2020 8:30 am    Post subject: Change color of tuya cloud home lights based on playing albu Reply with quote

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
Back to top
View user's profile Send private message
607
Lieutenant
Lieutenant


Joined: Sep 19, 2018
Posts: 222
Location: Amersfoort

PostPosted: Mon Mar 16, 2020 4:41 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
janbenes
Cadet 1
Cadet 1


Joined: Oct 30, 2003
Posts: 3
Location: Czech Republic

PostPosted: Mon Mar 16, 2020 3:46 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
607
Lieutenant
Lieutenant


Joined: Sep 19, 2018
Posts: 222
Location: Amersfoort

PostPosted: Wed Mar 18, 2020 3:55 am    Post subject: Reply with quote

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. Wink
Back to top
View user's profile Send private message Visit poster's website
janbenes
Cadet 1
Cadet 1


Joined: Oct 30, 2003
Posts: 3
Location: Czech Republic

PostPosted: Wed Mar 18, 2020 7:50 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    StreamingSoundtracks.com Forum Index -> Streaming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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



Forums ©
Copyright © 2001-2026 24seven.FM, LLC. All rights reserved.
The 24seven.FM Network — Community Supported Internet Radio.

[ About Us ] | [ Contact ] | [ Privacy Policy ] | [ Terms of Service ]

Page Generation: 0 Seconds