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
Audioscrobbler (last.fm) support for MediaPortal!
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="zombiepig" data-source="post: 86229" data-attributes="member: 12049"><p>Ok - tracked down whats causing my problem, and there's a little problem i've found in AudioscrobblerUtils.cs:</p><p></p><p>like you said, getValidURLLastFMString is adding a + behind any .'s in the string. however, if the string already has a space after the .'s, getValidURLLastFMString incorrectly puts another space there (well, a + anyway <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />). so, it's turning St. Anger into St.++Anger. This works ok for some strings, since last.fm seems to ignore it and return results anyway, but for other artists/cds, it just returns no results. Replacing the .++ with .+ returns the correct results. if i add a</p><p>[CODE] outString = outString.Replace("++", "+");</p><p>[/CODE]</p><p>after the </p><p>[CODE] List<Char> invalidSingleChars = new List<Char>();</p><p> invalidSingleChars.Add('.');</p><p> invalidSingleChars.Add(',');</p><p> foreach (Char singleChar in invalidSingleChars)</p><p> {</p><p> do</p><p> {</p><p> dotIndex = urlString.IndexOf(singleChar);</p><p> if (dotIndex > 0)</p><p> if (dotIndex > lastIndex)</p><p> {</p><p> if (dotIndex < urlString.Length -1)</p><p> {</p><p> lastIndex = dotIndex;</p><p> outString = urlString.Insert(dotIndex + 1, "+");</p><p> urlString = outString;</p><p> } </p><p> }</p><p> else</p><p> break;</p><p> }</p><p> while (dotIndex > 0);</p><p> } </p><p>[/CODE]</p><p></p><p>loop, then it fixes this problem. </p><p></p><p>hope that helps!</p></blockquote><p></p>
[QUOTE="zombiepig, post: 86229, member: 12049"] Ok - tracked down whats causing my problem, and there's a little problem i've found in AudioscrobblerUtils.cs: like you said, getValidURLLastFMString is adding a + behind any .'s in the string. however, if the string already has a space after the .'s, getValidURLLastFMString incorrectly puts another space there (well, a + anyway :P). so, it's turning St. Anger into St.++Anger. This works ok for some strings, since last.fm seems to ignore it and return results anyway, but for other artists/cds, it just returns no results. Replacing the .++ with .+ returns the correct results. if i add a [CODE] outString = outString.Replace("++", "+"); [/CODE] after the [CODE] List<Char> invalidSingleChars = new List<Char>(); invalidSingleChars.Add('.'); invalidSingleChars.Add(','); foreach (Char singleChar in invalidSingleChars) { do { dotIndex = urlString.IndexOf(singleChar); if (dotIndex > 0) if (dotIndex > lastIndex) { if (dotIndex < urlString.Length -1) { lastIndex = dotIndex; outString = urlString.Insert(dotIndex + 1, "+"); urlString = outString; } } else break; } while (dotIndex > 0); } [/CODE] loop, then it fixes this problem. hope that helps! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Audioscrobbler (last.fm) support for MediaPortal!
Contact us
RSS
Top
Bottom