Cover Display

Please report any bug found here

Re: Cover Display

Postby Midnight » 09 Apr 2014, 08:42

Also note that this config only serves the cover files (jpg|png|jpeg|bmp) of your music directory, if you want to access a directory listing or another file type you'll get a "403 Forbidden".
User avatar
Midnight
Moderator
 
Posts: 141
Joined: 19 Feb 2014, 14:46

Re: Cover Display

Postby Midnight » 05 Jun 2014, 15:48

Midnight wrote:
Midnight wrote:Using the "cover.[jpg|png]" in the album folder would be great ;)


It could be done like this:
In nginx.conf add a proxy for the covers to server1 section:
Code: Select all
        location /covers {
        proxy_pass        http://localhost:83/;
        }


Then add another server section that only serves images from the mpd library dir:
Code: Select all
    #start server4 section [/covers]
    server {
        listen       83;
        root   /mnt/MPD;
        location ~* \.(jpg|png|jpeg|bmp) {
            expires           7d;
        }
        location  / {
            deny all;
        }
    } #end server4 section


After that cover images should be available on a url like this (depending on your library structure):
http://runeaudio/covers/my-library/a/ad ... /cover.jpg


Any chance to have this added to the nginx configuration in the v0.3 release? It works very well for me together with MPDroid 8-)
User avatar
Midnight
Moderator
 
Posts: 141
Joined: 19 Feb 2014, 14:46

Re: Cover Display

Postby MindwarpJules » 19 Jun 2014, 21:30

Hi,

Can something guide me through the process of creating a nginx.conf file and what I need to add to it.
My goal is to follow the approach here to create a covers alias..

I've just just figured how to ssh, that is all so far.

Really hoping to just get this fix done and not have to bother anymore :)

I found this with the same name ?
https://github.com/RuneAudio/RaspyFi/bl ... nginx.conf

Anyone else reading can get to where I am now via this
https://wiki.archlinux.org/index.php/SS ... the_server

I'm using a Mac, from terminal I used.
ssh root@192.168.1.82 - but your ip will be different

Also here for user name and password.
http://www.runeaudio.com/documentation/

Thanks in advance,

MJ
MindwarpJules
 
Posts: 1
Joined: 19 Jun 2014, 19:30

Re: Cover Display

Postby skrodahl » 23 Jul 2014, 22:04

Midnight wrote:
Midnight wrote:Using the "cover.[jpg|png]" in the album folder would be great ;)


It could be done like this:
In nginx.conf add a proxy for the covers to server1 section:
Code: Select all
        location /covers {
        proxy_pass        http://localhost:83/;
        }


Then add another server section that only serves images from the mpd library dir:
Code: Select all
    #start server4 section [/covers]
    server {
        listen       83;
        root   /mnt/MPD;
        location ~* \.(jpg|png|jpeg|bmp) {
            expires           7d;
        }
        location  / {
            deny all;
        }
    } #end server4 section


After that cover images should be available on a url like this (depending on your library structure):
http://runeaudio/covers/my-library/a/ad ... /cover.jpg


Following up on my tests of Android MPD clients on BlackBerry 10, I started to wonder how to get MPDroid to show cover art. Midnight's solution works perfectly.

So in order to display cover art in MPDroid (regardless if you're on Android or BB10), first follow Midnight's steps above to make the RuneAudio webserver able to serve cover art. (It's too late in the night for me to test if the location section could be added directly to the server running on port 80, maybe you can answer that Midnight?)

MPDroid only supports one specific filename for the cover art. You will need a cover file in each directory and it has to have the same name throughout your library. In these examples I'm using 'cover.jpg', you may have called yours 'folder.jpg' or something else. Substitute 'cover.jpg' in the steps below to suite your naming convention.

Next, start MPDroid on your phone or tablet.

Go into 'Settings' -> 'Cover art settings'. Here you should tick 'Cache cover art' and 'Download local cover art':
Image

Now, select 'Path to music' and write '/covers' as shown below:
Image

This is where your naming convention comes in. As I said, all my cover art files are called 'cover.jpg'. So I click on 'Cover filename' and write 'cover.jpg':
Image

Finally, click 'Clear cover art cache' and MPDroid will be showing your local cover art. (Don't know why/if this is needed, but I had to in order to get cover art to work...)

To make sure it works, I copied a bogus cover art picture into one of my albums. And voila!
Image

(Edit: Added picture to show that MPDroid really uses 'cover.jpg'.)
-skrodahl

Muffsy Phono Preamp PP-3 || Audiobah TPA3116 || ESP P88 || ProJect Debut Carbon Espirit DC || RuneAudio / RaspBerry Pi / HifiBerry DAC || Dynaco A25
User avatar
skrodahl
Moderator
 
Posts: 160
Joined: 27 Jan 2014, 10:08
Location: Sweden

Re: Cover Display

Postby Midnight » 24 Jul 2014, 09:36

skrodahl wrote:So in order to display cover art in MPDroid (regardless if you're on Android or BB10), first follow Midnight's steps above to make the RuneAudio webserver able to serve cover art. (It's too late in the night for me to test if the location section could be added directly to the server running on port 80, maybe you can answer that Midnight?)

I'm sure you can configure nginx to also serve the cover files from standard port 80 and the subdir /covers, but I would need to test how to do it the right way. I guess the alias directive may be the right thing for it.

Something like this inside of the "listen 80" section may work:
Code: Select all
        location /covers/(.*)\.(jpg|png|jpeg|bmp)$ {
                alias /mnt/MPD/$1;
                expires           7d;
        }
        location /covers/ {
                deny all;
        }

Note that you maybe have to change the settings in MPDroid afterwards.
User avatar
Midnight
Moderator
 
Posts: 141
Joined: 19 Feb 2014, 14:46

Re: Cover Display

Postby Orion » 10 Sep 2014, 07:31

Midnight wrote:Any chance to have this added to the nginx configuration in the v0.3 release? It works very well for me together with MPDroid 8-)


Integrated. You can see the new code here:

First integration
commit a99cecc

Refined integration, with support for feeding the embedded coverart to MPDroid clients
commit 014463c

To make it works you have to adopt this configuration at MPDroid side:

Download local cover art = <checked>
Path to music = coverart
Cover filename = <whatever you want>

Also supported this nice optional feature:
Album cover art listing in library = <checked>

Please note that if you want to try the new code, you must to update the PHP code on you player using git pull, and update the redis.conf installed in the player (/etc/redis.conf) with the new version published here: https://raw.githubusercontent.com/RuneAudio/RuneOS/master/01_raspberrypi/os_config/etc/redis.conf

With this mod, also the RuneUI's coverart display now looks for local coverarts trying to find one of those paths:

Code: Select all
$local_cover_path[] = $local_cover_root.'/folder.jpg';
$local_cover_path[] = $local_cover_root.'/cover.jpg';
$local_cover_path[] = $local_cover_root.'/folder.png';
$local_cover_path[] = $local_cover_root.'/cover.png';


You can find the complete code here: https://github.com/RuneAudio/RuneUI/blob/master/app/coverart_ctl.php#L107-L110
RuneAudio - Embedded Hi-Fi music player
SoloStereo - Alla riscoperta dell'alta fedeltà
User avatar
Orion
RuneAudio co-founder
 
Posts: 189
Joined: 29 Nov 2013, 02:03
Location: Udine, Italy

Re: Cover Display

Postby Midnight » 10 Sep 2014, 08:18

Great ;)
User avatar
Midnight
Moderator
 
Posts: 141
Joined: 19 Feb 2014, 14:46

Re: Cover Display

Postby skrodahl » 10 Sep 2014, 22:06

Excellent news Orion!
-skrodahl

Muffsy Phono Preamp PP-3 || Audiobah TPA3116 || ESP P88 || ProJect Debut Carbon Espirit DC || RuneAudio / RaspBerry Pi / HifiBerry DAC || Dynaco A25
User avatar
skrodahl
Moderator
 
Posts: 160
Joined: 27 Jan 2014, 10:08
Location: Sweden

Re: Cover Display

Postby amadeus74 » 23 Oct 2014, 09:32

Hi to all.

I'm very new to make config modification for coverart display on Mpdroid.
Can you write a "guide" with the location of the files to change / substitite and how to accomplish that?

Thanks to all
amadeus74
 
Posts: 26
Joined: 21 Oct 2014, 19:34

Re: Cover Display

Postby ACX » 23 Oct 2014, 10:55

amadeus74 wrote:Can you write a "guide" with the location of the files to change / substitite and how to accomplish that?

Hi amadeus74,
this feature is going to work out of the box from 0.3-beta, so my advice is to wait for that.
User avatar
ACX
RuneAudio co-founder
 
Posts: 1692
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

support RuneAudio Donate with PayPal

PreviousNext

Return to Bug report

Who is online

Users browsing this forum: No registered users and 2 guests