mherger wrote: 
> How did you plan to present those filtered lists to the users? As 
> virtual libraries?
> 
Exactly that, yes. I just need some 'easy' way to filter tracks for
those virtual libraries. An extra tag (or even perhaps re-using 'Genre')
seemed like the easiest way to do this.

mherger wrote: 
> You plugin would have to register an importer. You already looked at the
> 
> Fulltext Search plugin. You'll get the idea. That importer can be run 
> after the other, regular scans. You could then grab a list of all 
> tracks, and process them with your magic.
I was hoping my plugin could be called as each track is added to the
library. The Full Text Search plugin seems to do this I think?

mherger wrote: 
> The file paths are stored in the url column of the tracks table. That 
> url can be converted to a file path using 
> Slim::Utils::Misc::pathFromFileURL($url).
Excellent, I figured there'd be a relatively simple way to do this,
thanks for the pointer!

mherger wrote: 
> I think this will be the crucial part: how to store your additional 
> data. The library.db has a pretty fixed structure. Unless you can fit 
> your data in there somehow, you might need to manage your own table.
As above, I did consider just adding a list of library names as the
'Genre' tag (I don't really use Genres for anything else at the moment).


mherger wrote: 
> But this might actually be a pretty simple solution if you opted for the
> 
> virtual libraries: a virtual library definition expects an SQL query 
> which returns track IDs to be used in a library. If you created your own
> 
> table, it could be as simple as two columns: user and track ID. The 
> library for user A would be defined as "select track_id from 
> my_custom_user_table where user = 'A'". I hope you get the point :-).
I do. The question then is, where do I create this table? Is there some
kind of hook in the plugin I can use, or would it just be something I
would do in 'initPlugin'?

I think my main issue is that there doesn't seem to be much
documentation regarding the plugin architecture and where to get
started...

Thanks for the response, very helpful. Any further pointers gratefully
received :)

Andy


------------------------------------------------------------------------
adhawkins's Profile: http://forums.slimdevices.com/member.php?userid=650
View this thread: http://forums.slimdevices.com/showthread.php?t=105551

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

Reply via email to