Album cover on website

You have a question or need an advice about how to do something? Ask it here!
User avatar
rockdj
Posts: 23
Joined: 25 Feb 2013 16:44
Re: Album cover on website

Post by rockdj »

Hello Bernd,
I will try to explain what I'm looking for..
The 'test.html' works fine! But there only the songartist en songtitle information in it. And I like to get the albumcover info also in that html.
I already understand that there are macros for this. But I don't excactly know where to "place" these macros...
rockfiles.nl 110% rock radio!!
the no.1 rock & metal station!!
User avatar
rockdj
Posts: 23
Joined: 25 Feb 2013 16:44
Re: Album cover on website

Post by rockdj »

Ok!! So I just need to fill in the line in "test html", that is located on a map on my computer and automaticly uploads to my server?
rockfiles.nl 110% rock radio!!
the no.1 rock & metal station!!
atlantic
Posts: 82
Joined: 09 Apr 2012 18:35
Location: Belgium
Contact:
Re: Album cover on website

Post by atlantic »

You should save it as template.php and test.php
User avatar
rockdj
Posts: 23
Joined: 25 Feb 2013 16:44
Re: Album cover on website

Post by rockdj »

Is that all :D
So I need to adjust the "test html" and "template html" and fill in this next line in both..
<?php echo "<img src=data:image/jpg;base64,${currentalbumart} width='200' height='200' border='0' title='${currenttrackname}' >"; ?>
rockfiles.nl 110% rock radio!!
the no.1 rock & metal station!!
atlantic
Posts: 82
Joined: 09 Apr 2012 18:35
Location: Belgium
Contact:
Re: Album cover on website

Post by atlantic »

Create a template.php with this in it.

Code: Select all

<HTML>

<script src="/A2EB891D63C8/avg_ls_dom.js" type="text/javascript"></script><script>
<!--

/*
Auto Refresh Page with Time script
*/

//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:45"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{ 
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
else
curtime=cursec+"Station naam"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script>

<style type="text/css">
<!--
.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #FF9900;
	font-weight: bold;
}
body {
	background-color: #020202;
	background-image: url();
}
.style3 {color: #FF0000}
.style6 {color: #666666}
.style9 {
	font-size: 10px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.style11 {color: #FFFFFF}
.style13 {color: #658BD8}
-->
</style>
<BODY>

<p class="style1"><span class="style13">Current Track:</span> <span class="style11"> <?php
echo "<img src=data:image/jpg;base64,${currentalbumart} width='200' height='200' border='0' title='${currenttrackname}' >";
?>${currenttrackname}</span></p>

<p class="style1"><span class="style3">Next:</span> <span class="style11"><?php
echo "<img src=data:image/jpg;base64,${nextalbumart} width='200' height='200' border='0' title='${nexttrackname}' >";
?>${nexttrackname}</span></p>


</BODY>
</HTML>
Last edited by atlantic on 16 Apr 2013 16:30, edited 1 time in total.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Album cover on website

Post by radio42 »

No, the test.html is created out of the template.html, by replacing all macros....so you only need to adjust the template file!
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Album cover on website

Post by radio42 »

You can place this line into your template file (as posted by the user):

Code: Select all

<?php echo "<img src=data:image/jpg;base64,${currentalbumart} width='200' height='200' border='0' title='${currenttrackname}' >"; ?>
The resulting test file might not work locally anymore (as it requires PHP to be installed/available) - but it should work fine on your web-site (assuming you have PHP available there).
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Album cover on website

Post by radio42 »

Yes - I mean the line given is just a sample...you might modify the template a bit more, so that it is aligned to your web layout...but basically yes - that's all.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Album cover on website

Post by radio42 »

A good place is the global event called "Streaming.OnSongTitleChanged" - see general settings, section 'Events/Commands'.
gerritk
Posts: 34
Joined: 06 Feb 2018 10:21
Re: Album cover on website

Post by gerritk »

Hi,
for our dab transmitting we want to use the album art for the slideshow (some radio's can show this).
We simply want to copy the album art from Proppfrexx to a given map (so the dab mux can handle this).

What command can we use?
EXEC_SHELL_COMMAND or
EXEC_WRITE_FILE

Thanks.

Gerrit

Post Reply