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:
$162.58

5 Donations:
$337.42

Death.FM (Apr-9) shrike $20.00
StreamingSoundtracks.com (Apr-8) trailblder $25.00
Death.FM (Apr-2) SeclusionSolution $242.42
StreamingSoundtracks.com (Apr-2) Locutus76 $30.00
Death.FM (Apr-1) valar_morghulis $20.00

 


Last Month's Donors
Death.FM (Mar-29) htmm $13.37
StreamingSoundtracks.com (Mar-27) klingon50 $10.00
Death.FM (Mar-22) chapper $10.00
Death.FM (Mar-17) swissdeath $9.99
Death.FM (Mar-15) osiris $10.00
1980s.FM (Mar-11) Bondstec $15.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: 221
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: 221
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.