lrossouw;451556 Wrote: 
> Oops no :)  I'm using SQL as my script is not written as a plugin. 
> Everything is done with SQL statements and get statements to fetch xml
> from the Last.fm website.  
> 
> Is there a place I can look at the source for your plugins to learn a
> few lessons on this?  I suppose I should be switching to the "Schema"
> but maybe I'd just fix what I have now first.
> 
I'm not sure if Slim::Schema::* will work for a standalone
application.

Please, note that I'm not sure I've done this the correct way. I think
I asked in the Developers section but I didn't get an answer so I just
tried different variants until it worked.

Have a look at the _exectue method in this file:
http://erlandplugins.googlecode.com/svn/CustomBrowse/trunk/src/MenuHandler/SQLHandler.pm

As you can see I'm in SqueezeCenter 7.3 and earlier I'm using:

Code:
--------------------
    
  Slim::Utils::Unicode::utf8on(Slim::Utils::Unicode::utf8decode($name,'utf8'));
  
--------------------


Or in Squeezebox Server 7.4 and later:

Code:
--------------------
    
  Slim::Utils::Unicode::utf8decode($name,'utf8');
  
--------------------


I think the different behaviors is because some change in the
Slim::Utils::Unicode module between 7.3 and 7.4.

Also please note that you can get really strange behavior if you use
the strings in log messages. The reason is that perl sometime converts
strings when you concatenate two strings with different encoding, the
result is that the code could suddenly start to work when you add a log
message.


-- 
erland

Erland Isaksson
'My homepage' (http://erland.isaksson.info) (Install my plugins through
Extension Downloader)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan,  Custom Skip, Multi Library, Title Switcher and Database
Query plugins'
(http://wiki.erland.isaksson.info/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=66987

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to