StreamingSoundtracks.com
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!

Donation Meter


Make donations with PayPal!
Monthly Goal:
$500.00

Need:
$27.02

6 Donations:
$472.98

StreamingSoundtracks.com (Nov-17) molossus $45.00
Entranced.FM (Nov-17) Der_Wichtig $5.99
Death.FM (Nov-7) Burnt $10.00
StreamingSoundtracks.com (Nov-4) molossus $111.00
1980s.FM (Nov-3) shru $50.00
Death.FM (Nov-1) SeclusionSolution $250.99

 


Last Month's Donors
StreamingSoundtracks.com (Oct-26) blkhouse $90.00
StreamingSoundtracks.com (Oct-24) molossus $18.22
Entranced.FM (Oct-20) sonia $25.00
Death.FM (Oct-12) Burnt $10.00
StreamingSoundtracks.com (Oct-11) danico $25.00
StreamingSoundtracks.com (Oct-10) klingon50 $10.00




Search

 

SSTore



:: SSTore ::



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
Member#: 3525
Posts: 3
Location: Czech Republic

janbenes is offline View user's profile Send private message janbenes's Favorites are Private
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
Netherlands 607
Lieutenant
Lieutenant



Joined: Sep 19, 2018
Member#: 46975
Posts: 222
Location: Amersfoort

607 is offline View user's profile Send private message Visit poster's website View 607's Favorites
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.
janbenes
Cadet 1
Cadet 1



Joined: Oct 30, 2003
Member#: 3525
Posts: 3
Location: Czech Republic

janbenes is offline View user's profile Send private message janbenes's Favorites are Private
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
Netherlands 607
Lieutenant
Lieutenant



Joined: Sep 19, 2018
Member#: 46975
Posts: 222
Location: Amersfoort

607 is offline View user's profile Send private message Visit poster's website View 607's Favorites
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
janbenes
Cadet 1
Cadet 1



Joined: Oct 30, 2003
Member#: 3525
Posts: 3
Location: Czech Republic

janbenes is offline View user's profile Send private message janbenes's Favorites are Private
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.
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-2020 24seven.FM, LLC All rights reserved.
Comments, images, and trademarks are property of their respective owners.
You can syndicate our news using the file backend.php or ultramode.txt. Robots may follow the Sitemap.