{"id":235,"date":"2018-07-01T14:16:48","date_gmt":"2018-07-01T13:16:48","guid":{"rendered":"https:\/\/blogs.churlaud.com\/somefoobar\/?p=235"},"modified":"2018-07-01T15:09:30","modified_gmt":"2018-07-01T14:09:30","slug":"serving-in-file-covers-to-mpd","status":"publish","type":"post","link":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/","title":{"rendered":"Serving in-file covers to MPD"},"content":{"rendered":"<p>It&#8217;s been quite a while that I&#8217;m using a MPD server on my raspberry + hifiberry [<a href=\"https:\/\/www.hifiberry.com\/\">1<\/a>] to play my digital music on my amps. It works very well, the sound is very good and I can control it with my phone, laptop, tablet etc&#8230;\u00a0 That is great.<\/p>\n<p>What is less great is that MPD does not transmit covers to its clients (there is already an issue on MPD&#8217;s github [<a href=\"https:\/\/github.com\/MusicPlayerDaemon\/MPD\/issues\/42\">2<\/a>] to let MPD natively find them).<\/p>\n<p>What most clients do is asking you to setup a HTTP server above your music folder so that they can request the cover file with a query like:<\/p>\n<p><code>GET \/music\/path\/The%20Black%20Keys\/Turn%20Blue\/cover.jpg HTTP\/1.1<\/code><\/p>\n<p>This has 2 drawbacks:<\/p>\n<ol>\n<li>You need to leave an access to your music folder to the HTTP server. I&#8217;m not found of this. Some people worked around this [<a href=\"https:\/\/github.com\/uriel1998\/yolo-mpd\/blob\/master\/webserver_covers.sh\">3<\/a>] but meh&#8230;<\/li>\n<li>I don&#8217;t use cover files next to the songs. Whenever I rip a CD, I like to add the cover within the song files, so that it is nicely shown on my smartphone.<\/li>\n<\/ol>\n<p>So I made a very simple python app to deal with this : <b>mpdcoverserver<\/b>. It has two options: a port and a music folder.<\/p>\n<p>When the HTTP server receives :<\/p>\n<p><code>GET \/The%20Black%20Keys\/Turn%20Blue\/cover.jpg HTTP\/1.1<\/code><\/p>\n<p>it goes to <code>&lt;music folder&gt;\/The Black Keys\/Turn Blue\/<\/code>, takes the first song, extracts the cover from it and serves it.<\/p>\n<p>&#8230;Very simple&#8230;<\/p>\n<p>You an find it there \ud83d\ude42 : <a href=\"https:\/\/github.com\/ochurlaud\/mpdcoverserver\">https:\/\/github.com\/ochurlaud\/mpdcoverserver<\/a><\/p>\n<h3>References<\/h3>\n<p>[1] <a href=\"https:\/\/www.hifiberry.com\/\">https:\/\/www.hifiberry.com\/<\/a><br \/>\n[2] <a href=\"https:\/\/github.com\/MusicPlayerDaemon\/MPD\/issues\/42\">https:\/\/github.com\/MusicPlayerDaemon\/MPD\/issues\/42<\/a><br \/>\n[3] <a href=\"https:\/\/github.com\/uriel1998\/yolo-mpd\/blob\/master\/webserver_covers.sh\">https:\/\/github.com\/uriel1998\/yolo-mpd\/blob\/master\/webserver_covers.sh<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been quite a while that I&#8217;m using a MPD server on my raspberry + hifiberry [1] to play my digital music on my amps. It works very well, the sound is very good and I can control it with my phone, laptop, tablet etc&#8230;\u00a0 That is great. What is less great is that MPD<\/p>\n<p><a class=\"button\" href=\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/\" title=\"More\">  Read More \u2192<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":12,"footnotes":""},"categories":[3,2],"tags":[13,4,27],"class_list":["post-235","post","type-post","status-publish","format-standard","hentry","category-linux","category-raspberrypi","tag-kde","tag-linux","tag-mpd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Serving in-file covers to MPD - Just some FooBar<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Serving in-file covers to MPD - Just some FooBar\" \/>\n<meta property=\"og:description\" content=\"It&#8217;s been quite a while that I&#8217;m using a MPD server on my raspberry + hifiberry [1] to play my digital music on my amps. It works very well, the sound is very good and I can control it with my phone, laptop, tablet etc&#8230;\u00a0 That is great. What is less great is that MPD Read More \u2192\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/\" \/>\n<meta property=\"og:site_name\" content=\"Just some FooBar\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-01T13:16:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-07-01T14:09:30+00:00\" \/>\n<meta name=\"author\" content=\"Olivier\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Olivier\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/\"},\"author\":{\"name\":\"Olivier\",\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/#\/schema\/person\/ee53ba4920ebe33c29228fd0e42e42f6\"},\"headline\":\"Serving in-file covers to MPD\",\"datePublished\":\"2018-07-01T13:16:48+00:00\",\"dateModified\":\"2018-07-01T14:09:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/\"},\"wordCount\":250,\"commentCount\":1,\"keywords\":[\"kde\",\"Linux\",\"mpd\"],\"articleSection\":[\"Linux\",\"RaspberryPi\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/\",\"url\":\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/\",\"name\":\"Serving in-file covers to MPD - Just some FooBar\",\"isPartOf\":{\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/#website\"},\"datePublished\":\"2018-07-01T13:16:48+00:00\",\"dateModified\":\"2018-07-01T14:09:30+00:00\",\"author\":{\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/#\/schema\/person\/ee53ba4920ebe33c29228fd0e42e42f6\"},\"breadcrumb\":{\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/blogs.churlaud.com\/somefoobar\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Serving in-file covers to MPD\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/#website\",\"url\":\"https:\/\/blogs.churlaud.com\/somefoobar\/\",\"name\":\"Just some FooBar\",\"description\":\"Not much to say...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blogs.churlaud.com\/somefoobar\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blogs.churlaud.com\/somefoobar\/#\/schema\/person\/ee53ba4920ebe33c29228fd0e42e42f6\",\"name\":\"Olivier\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/da8de930ce1a22e92ce36b824ee34d1230fb0294d77eebfaa645282ed474f688?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/da8de930ce1a22e92ce36b824ee34d1230fb0294d77eebfaa645282ed474f688?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/da8de930ce1a22e92ce36b824ee34d1230fb0294d77eebfaa645282ed474f688?s=96&d=mm&r=g\",\"caption\":\"Olivier\"},\"sameAs\":[\"http:\/\/olivier.churlaud.com\"],\"url\":\"https:\/\/blogs.churlaud.com\/somefoobar\/author\/olivier\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Serving in-file covers to MPD - Just some FooBar","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/","og_locale":"en_US","og_type":"article","og_title":"Serving in-file covers to MPD - Just some FooBar","og_description":"It&#8217;s been quite a while that I&#8217;m using a MPD server on my raspberry + hifiberry [1] to play my digital music on my amps. It works very well, the sound is very good and I can control it with my phone, laptop, tablet etc&#8230;\u00a0 That is great. What is less great is that MPD Read More \u2192","og_url":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/","og_site_name":"Just some FooBar","article_published_time":"2018-07-01T13:16:48+00:00","article_modified_time":"2018-07-01T14:09:30+00:00","author":"Olivier","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Olivier","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/#article","isPartOf":{"@id":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/"},"author":{"name":"Olivier","@id":"https:\/\/blogs.churlaud.com\/somefoobar\/#\/schema\/person\/ee53ba4920ebe33c29228fd0e42e42f6"},"headline":"Serving in-file covers to MPD","datePublished":"2018-07-01T13:16:48+00:00","dateModified":"2018-07-01T14:09:30+00:00","mainEntityOfPage":{"@id":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/"},"wordCount":250,"commentCount":1,"keywords":["kde","Linux","mpd"],"articleSection":["Linux","RaspberryPi"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/","url":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/","name":"Serving in-file covers to MPD - Just some FooBar","isPartOf":{"@id":"https:\/\/blogs.churlaud.com\/somefoobar\/#website"},"datePublished":"2018-07-01T13:16:48+00:00","dateModified":"2018-07-01T14:09:30+00:00","author":{"@id":"https:\/\/blogs.churlaud.com\/somefoobar\/#\/schema\/person\/ee53ba4920ebe33c29228fd0e42e42f6"},"breadcrumb":{"@id":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blogs.churlaud.com\/somefoobar\/2018\/07\/01\/serving-in-file-covers-to-mpd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/blogs.churlaud.com\/somefoobar\/"},{"@type":"ListItem","position":2,"name":"Serving in-file covers to MPD"}]},{"@type":"WebSite","@id":"https:\/\/blogs.churlaud.com\/somefoobar\/#website","url":"https:\/\/blogs.churlaud.com\/somefoobar\/","name":"Just some FooBar","description":"Not much to say...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blogs.churlaud.com\/somefoobar\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blogs.churlaud.com\/somefoobar\/#\/schema\/person\/ee53ba4920ebe33c29228fd0e42e42f6","name":"Olivier","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/da8de930ce1a22e92ce36b824ee34d1230fb0294d77eebfaa645282ed474f688?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/da8de930ce1a22e92ce36b824ee34d1230fb0294d77eebfaa645282ed474f688?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/da8de930ce1a22e92ce36b824ee34d1230fb0294d77eebfaa645282ed474f688?s=96&d=mm&r=g","caption":"Olivier"},"sameAs":["http:\/\/olivier.churlaud.com"],"url":"https:\/\/blogs.churlaud.com\/somefoobar\/author\/olivier\/"}]}},"_links":{"self":[{"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/posts\/235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/comments?post=235"}],"version-history":[{"count":8,"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"predecessor-version":[{"id":243,"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/posts\/235\/revisions\/243"}],"wp:attachment":[{"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.churlaud.com\/somefoobar\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}