Daverz;619316 Wrote: > > That would be great, thanks. I'll also start looking at the Custom > Scan code. The idea would be to replace the file scanning phase with > just scanning the file (in XML or some Perl specific format?) produced > by the external scanner. > I've just sent you a PM about something else related to this.
Anyway, a sample plugin is attached with this post. The sample plugin just returns some hard coded tag values to Custom Scan plugin, you will have to adapt it so it reads the file your Python script generates. A plugin like this will add data to the Custom Scan tables and it will be possible to browse the information through SBS/Squeezebox using the Custom Browse plugin. You will have to adapt the Custom Browse templates so they use "shelftags" instead of "customtag" and "mixedtag" as they currently do. I'm not sure which is the best approach in 7.5, I'm guessing you could either: 1. Perform the Python part externally and just let this plugin scan the .shelf file or 2. Launch the Python script in scanInit function in the sample plugin and read the generated file in the scanTrack function or 3. Launch the Python script per track in the scanTrack function in the plugin. Solution 2 is probably going to be problematic as it will lock SBS for 20 minutes. So I'm guessing solution 1 or 3 will be preferred in SBS 7.5. In SBS 7.6 it will be possible to run the scanning in a separate process and then something like solution 2 will be an option. As mentioned before, there is a risk the performance is more related to the the background scheduling in SBS than actually reading tags and write information to the database, if this is the case it won't help to read the tags from a file instead of the physical files. If the background scheduling is the problem, it's going to be a lot better with the new scanner API in 7.6. +-------------------------------------------------------------------+ |Filename: ShelfScanner-0.1.zip | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=11544| +-------------------------------------------------------------------+ -- erland Erland Isaksson ('My homepage' (http://erland.isaksson.info)) (Developer of 'many plugins/applets' (http://wiki.slimdevices.com/index.php/User:Erland). If my answer helped you and you like to encourage future presence on this forum and/or third party plugin/applet development, 'donations are always appreciated' (http://erland.isaksson.info/donate)) ------------------------------------------------------------------------ erland's Profile: http://forums.slimdevices.com/member.php?userid=3124 View this thread: http://forums.slimdevices.com/showthread.php?t=85180 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
