<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[What is wrong with my url?]]></title><description><![CDATA[<p dir="auto">The url scraped from a music player always produces a broken image icon (middle of pic).<br />
If I input the url in manually and then run the module it will display the image (see comment at the top of the pic).<br />
If I don’t put in a url I get an outline with no broken image icon.<br />
I can output the url as a string on the screen (middle of pic and code)<br />
I can check the url from the music players web interface (bottom of pic).<br />
<img src="/assets/uploads/files/1603578033644-problem.png" alt="Problem.png" class=" img-fluid img-markdown" /><br />
Could someone please tell me how to the url into image.src from data[‘albumart’]. This has been bugging me for 2 full days now.</p>
<pre><code>        var data = this.volumioData;
        var item = document.createElement('div');
        var image = document.createElement('img');
        image.src = data['albumart']; //  If I replace this with the url it will display the image
        image.height = 450;
        image.width = 450;
        image.className = 'image';
        item.className = 'mmm-volumio-item';
        item.innerHTML = '&lt;div&gt;' + data['artist'] + ' • ' + data['album'] +
                         '&lt;/div&gt;' + '&lt;div&gt;' + data['albumart'] + '&lt;/div&gt;';//I put 'albumart' here to prove I had the url
        wrapper.appendChild(item);
        wrapper.appendChild(image);
        return wrapper;
    }
});
</code></pre>
<p dir="auto">I am modifying MMM-Volumio to show the Album Covers  what is playing. I can’t program in Java but have done a tiny bit in C++,Pascal,Visual Basic and Python. I am sorry if my code is really bad (all 4 lines of it that took me 2 days), it is working except for the url problem. I will also do a better layout when it is working.</p>
]]></description><link>https://forum.magicmirror.builders/topic/13905/what-is-wrong-with-my-url</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 08:36:05 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/13905.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Oct 2020 22:35:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to What is wrong with my url? on Sun, 25 Oct 2020 23:41:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ellyj" aria-label="Profile: EllyJ">@<bdi>EllyJ</bdi></a> go to github on the original project<br />
push the fork button top right. now u have a copy, and ‘could’ submit changes back to the author as ‘pull request’,  pull from your repo back to his.</p>
<p dir="auto">now, rename your current module folder<br />
and then git clone your fork, and do npm install if the original asked for it</p>
<p dir="auto">now, copy the changed files from the renamed folder to the new one.</p>
<p dir="auto">if all is good<br />
then we can work on getting the changes pushed up to your fork</p>
]]></description><link>https://forum.magicmirror.builders/post/83960</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83960</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 25 Oct 2020 23:41:12 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sun, 25 Oct 2020 23:06:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> I did not. I do not know how to or what a fork is. I am not sure if it is good enough, it looks like it is commercial quality and it works but I just kind of forced it to do what I wanted. I don’t know JavaScript or CSS, I just googled, copied, tried and guessed until it worked. Perhaps someone could try it out and then fork it if it works for them.</p>
]]></description><link>https://forum.magicmirror.builders/post/83959</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83959</guid><dc:creator><![CDATA[EllyJ]]></dc:creator><pubDate>Sun, 25 Oct 2020 23:06:33 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sun, 25 Oct 2020 22:49:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ellyj" aria-label="Profile: EllyJ">@<bdi>EllyJ</bdi></a> did u make a fork of the original and upload your changes back , so others can get your version?</p>
<p dir="auto">fork original<br />
download your forked copy<br />
make changes<br />
git  add/commit/push your chnages back to your fork…</p>
]]></description><link>https://forum.magicmirror.builders/post/83958</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83958</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 25 Oct 2020 22:49:37 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sun, 25 Oct 2020 22:42:51 GMT]]></title><description><![CDATA[<p dir="auto">I have finished this now and tidied the code up (I hope it is up to standard). Below is a screenshot of the layout I went with, the changes I made to the .js file and the whole CSS file. I would like to give a lot of credit to <a class="plugin-mentions-user plugin-mentions-a" href="/user/trgraglia" aria-label="Profile: trgraglia">@<bdi>trgraglia</bdi></a> who created MMM-Volumio and those who modified it before me. I hope there is enough info here for anyone who wants to create there own Volumio viewer. The position in the MagicMirror config file was top_bar.</p>
<p dir="auto"><img src="/assets/uploads/files/1603664848339-finished.png" alt="Finished.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">File: modules/MMM-Volumio/MMM-Volumio.js (the bit I changed at the end)</p>
<pre><code>        var data = this.volumioData;
        var amendUrl = "";
        var item = document.createElement('div');
        var image = document.createElement('img');
        var artists = document.createElement('div');

        if (data['service'] == "mpd") {
            amendUrl = this.config.volumioUrl + data['albumart'];} // if local playback put volumio url +  albumart url 
        else{
            amendUrl = data['albumart'];}                   // else if web radio just albumart url

        artists.className = 'text';
        artists.innerHTML = '&lt;div&gt;' + '&lt;br /&gt;' + data['artist'] + '&lt;br /&gt;';
        wrapper.appendChild(artists);

        item.className = 'smalltext' //'mmm-volumio-item';
        item.innerHTML = '&lt;div&gt;' + data['album'] + '&lt;div&gt;' + '&lt;/div&gt;' + data['title'] + '&lt;/div&gt;';//I put 'albumart' here to prove I had the url
        wrapper.appendChild(item);                          // display artist, album and title info

        image.src = amendUrl;                               // set url to the image
        image.className = 'image';
        wrapper.appendChild(image);                         // display album artwork
        return wrapper;
    }
});
</code></pre>
<p dir="auto">File: modules/MMM-Volumio/MMM-Volumio.css</p>
<pre><code>.region.fullscreen.below {
    position: absolute;
    height:   100%
    width:    100%
}

.mmm-volumio-item {
    text-align:  center;
    line-height: 40pt;
    font-size:   95%;
    color:       LightGrey;
    position: absolute;
    height:   100%;
    width:    100%;
    border-right:  24px;
}
.image 
{
    position:    Fixed;
    bottom:      0px;
    left:        0px;
    width:   100%;
}

.text
{   
    text-align:  center;
    line-height: 60pt;
    font-size:   160%;
    color:       DimGrey;
}

.smalltext
{
    text-align:  center;
    line-height: 40pt;
    font-size:   100%;
    color:       Grey;
}

</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/83957</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83957</guid><dc:creator><![CDATA[EllyJ]]></dc:creator><pubDate>Sun, 25 Oct 2020 22:42:51 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sun, 25 Oct 2020 03:45:02 GMT]]></title><description><![CDATA[<p dir="auto">Sam it was from the NAS that has all my music. I have three Pi’s, a NAS, a Volumio music player and now a Magic Mirror. The Mirror Pi got the image url from Volumio Pi and then got the image from the NAS Pi. Lots of Pi! I have fiddled with the layout and it is presentable but not finished. <img src="/assets/uploads/files/1603597457026-almost.png" alt="Almost.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.magicmirror.builders/post/83917</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83917</guid><dc:creator><![CDATA[EllyJ]]></dc:creator><pubDate>Sun, 25 Oct 2020 03:45:02 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sun, 25 Oct 2020 00:52:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ellyj" aria-label="Profile: EllyJ">@<bdi>EllyJ</bdi></a> did u download the image to the mm server?</p>
]]></description><link>https://forum.magicmirror.builders/post/83913</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83913</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 25 Oct 2020 00:52:48 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sun, 25 Oct 2020 00:48:58 GMT]]></title><description><![CDATA[<p dir="auto">Ok it works :grinning_face_with_smiling_eyes: The problem was I needed to add the Raspberry Pi’ address before the album art url. Thank you very much <a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> for asking me a question that led to that info.<img src="/assets/uploads/files/1603586643769-working.png" alt="working.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">As you can see it needs to be shifted about a little to look good.</p>
<pre><code>        var data = this.volumioData;
        var item = document.createElement('div');
        var amendUrl = "";
        var image = document.createElement('img');
        if (data['service'] == "mpd") {
            amendUrl = this.config.volumioUrl + data['albumart'];} // if local playback use volumio url +  albumart url 
        else{
            amendUrl = data['albumart'];}                   // else if web radio just albumart url
        image.src = amendUrl;                               // set url to the image
        image.height = 600;
        image.className = 'image';
        item.className = 'mmm-volumio-item';
        item.innerHTML = '&lt;div&gt;' + data['artist'] + ' • ' + data['album'] +
                         '&lt;/div&gt;' + '&lt;div&gt;' + data['album'] + '&lt;/div&gt;';//I put 'albumart' here to prove I had the url
        wrapper.appendChild(item);                          // display artist, album and title info
        wrapper.appendChild(image);                         // display album artwork
        return wrapper;
    }
});
</code></pre>
<p dir="auto">Here is my messy code, I don’t really do any coding so I was winging it.</p>
]]></description><link>https://forum.magicmirror.builders/post/83912</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83912</guid><dc:creator><![CDATA[EllyJ]]></dc:creator><pubDate>Sun, 25 Oct 2020 00:48:58 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sat, 24 Oct 2020 23:37:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> it is. If you look at the url it gives to the album art it does not start with <a href="http://192.168" target="_blank" rel="noopener noreferrer nofollow ugc">http://192.168</a>… so I just need to add that I believe. I stumbled on that info by mistake thanks to you. I will try and get that working now.</p>
]]></description><link>https://forum.magicmirror.builders/post/83911</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83911</guid><dc:creator><![CDATA[EllyJ]]></dc:creator><pubDate>Sat, 24 Oct 2020 23:37:38 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sat, 24 Oct 2020 23:31:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ellyj" aria-label="Profile: EllyJ">@<bdi>EllyJ</bdi></a> this.volumioData should be the response from the server</p>
]]></description><link>https://forum.magicmirror.builders/post/83910</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83910</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 24 Oct 2020 23:31:56 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sat, 24 Oct 2020 23:25:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ellyj" aria-label="Profile: EllyJ">@<bdi>EllyJ</bdi></a> I’m not sure</p>
]]></description><link>https://forum.magicmirror.builders/post/83909</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83909</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 24 Oct 2020 23:25:26 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sat, 24 Oct 2020 23:24:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> I think I have to add my IP address for the Volumio. When I was looking to see if Volumio is json I stumbled on this on their website. Can I += strings?</p>
]]></description><link>https://forum.magicmirror.builders/post/83908</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83908</guid><dc:creator><![CDATA[EllyJ]]></dc:creator><pubDate>Sat, 24 Oct 2020 23:24:44 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sat, 24 Oct 2020 23:23:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ellyj" aria-label="Profile: EllyJ">@<bdi>EllyJ</bdi></a> ok, you need to use<br />
let data=JSON.parse(this.volumioData)<br />
to get into object form, then your<br />
data[‘albumart’] might work</p>
<p dir="auto">on my phone</p>
]]></description><link>https://forum.magicmirror.builders/post/83907</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83907</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 24 Oct 2020 23:23:12 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sat, 24 Oct 2020 23:19:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ellyj" aria-label="Profile: EllyJ">@<bdi>EllyJ</bdi></a>  sorry I don’t know about Volumio. At the bottom of the picture is the live data. I just found this but don’t understand what it is getting at.</p>
<p dir="auto">If albumart value starts with http, then no further operation is needed and the resulting url will show an albumart<br />
Otherwise, prepend the string formed by: http:// + IP ADDRESS of Volumio device. Example: <a href="http://192.168.1.22/albumart" target="_blank" rel="noopener noreferrer nofollow ugc">http://192.168.1.22/albumart</a>?</p>
]]></description><link>https://forum.magicmirror.builders/post/83906</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83906</guid><dc:creator><![CDATA[EllyJ]]></dc:creator><pubDate>Sat, 24 Oct 2020 23:19:02 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sat, 24 Oct 2020 23:12:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> it json I believe. I’m on a RaspberryPi and the file extension is .js.</p>
]]></description><link>https://forum.magicmirror.builders/post/83905</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83905</guid><dc:creator><![CDATA[EllyJ]]></dc:creator><pubDate>Sat, 24 Oct 2020 23:12:47 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong with my url? on Sat, 24 Oct 2020 22:51:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ellyj" aria-label="Profile: EllyJ">@<bdi>EllyJ</bdi></a> what format is the this.volumioData? string, json, object?</p>
]]></description><link>https://forum.magicmirror.builders/post/83904</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/83904</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 24 Oct 2020 22:51:35 GMT</pubDate></item></channel></rss>