home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Fanart Handler
ID3 tag album cover is not displayed
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ajs" data-source="post: 1276632" data-attributes="member: 68833"><p>I create test code for <a href="https://repl.it/languages/csharp" target="_blank">https://repl.it/languages/csharp</a> : Code the some as in FH:</p><p>[CODE=csharp]using System;</p><p>using System.Net;</p><p></p><p>class MainClass {</p><p> public static void Main (string[] args) {</p><p> string DefUserAgent = "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36";</p><p> </p><p> string artist = "Various+Artists";</p><p> string album = "Dream+Dance%2c+Vol.+46";</p><p> // string artist = "Guns+N'+Roses";</p><p> // string album = "Use+Your+Illusion+I";</p><p> string MBURL = "http://www.musicbrainz.org/ws/2/{0}/?query={1}:{2} {3} {4}:{5}";</p><p> </p><p> // I remove HttpUtility.UrlEncode because - error CS0103: The name `HttpUtility' does not exist in the current context</p><p> string URL = String.Format(MBURL, "release-group", "artist", @"""" + artist + @"""", "AND", "release", @"""" + album + @"""");</p><p> </p><p> var uri = new Uri(URL);</p><p> WebClient wc = new WebClient();</p><p> wc.Encoding = System.Text.Encoding.UTF8;</p><p> wc.Proxy.Credentials = CredentialCache.DefaultCredentials;</p><p> wc.UseDefaultCredentials = true;</p><p> wc.Headers.Add("User-Agent", DefUserAgent);</p><p> wc.Headers.Add("Content-Type","application/x-www-form-urlencoded");</p><p> </p><p> var servicePoint = ServicePointManager.FindServicePoint(uri);</p><p> servicePoint.Expect100Continue = false;</p><p> </p><p> string xml = wc.DownloadString(uri);</p><p> Console.WriteLine(xml);</p><p> }</p><p>}[/CODE]</p><p>For GNR all work fine, for you album no result ...</p></blockquote><p></p>
[QUOTE="ajs, post: 1276632, member: 68833"] I create test code for [URL]https://repl.it/languages/csharp[/URL] : Code the some as in FH: [CODE=csharp]using System; using System.Net; class MainClass { public static void Main (string[] args) { string DefUserAgent = "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"; string artist = "Various+Artists"; string album = "Dream+Dance%2c+Vol.+46"; // string artist = "Guns+N'+Roses"; // string album = "Use+Your+Illusion+I"; string MBURL = "http://www.musicbrainz.org/ws/2/{0}/?query={1}:{2} {3} {4}:{5}"; // I remove HttpUtility.UrlEncode because - error CS0103: The name `HttpUtility' does not exist in the current context string URL = String.Format(MBURL, "release-group", "artist", @"""" + artist + @"""", "AND", "release", @"""" + album + @""""); var uri = new Uri(URL); WebClient wc = new WebClient(); wc.Encoding = System.Text.Encoding.UTF8; wc.Proxy.Credentials = CredentialCache.DefaultCredentials; wc.UseDefaultCredentials = true; wc.Headers.Add("User-Agent", DefUserAgent); wc.Headers.Add("Content-Type","application/x-www-form-urlencoded"); var servicePoint = ServicePointManager.FindServicePoint(uri); servicePoint.Expect100Continue = false; string xml = wc.DownloadString(uri); Console.WriteLine(xml); } }[/CODE] For GNR all work fine, for you album no result ... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Fanart Handler
ID3 tag album cover is not displayed
Contact us
RSS
Top
Bottom