Using XL databases for...

Help each other out

Using XL databases for...

Postby rbziggy on Mon Sep 05, 2005 10:54 pm

First, what I'd like to achieve:

I have a radio with presets controllable by IR that I'd like to control from XL. I aim to do this with a USB UIRT (on order but not yet arrived). I'd like to be able to switch radio channels via the presets (20 available, plenty for my need) and identify each preset by the station graphic. Punch the button and you change channel.

How to do it:

- Conceivably, I could set up 20 buttons with a station graphic each and a 'click' event that would execute a (learnt) IR command to switch the station. Straight forward stuff?
- However, I thought it would be more flexible to set up a new database with a structure that echoed my station organisation (e.g. top level ‘talk’, ‘rock’, ‘classical’ and within those, the stations I want). So I set up a ‘Radio’ database, linked to the station graphic (as coverart) and linked to the event (using the ‘advanced’ tab on the db edit panel).

My problem with the second approach is… I can get the nice navigation panel set up that shows the station logos under the categorisation just fine (as you would for the normal ‘music’ db) but:

- I can’t seem to get the associated event (linked to the db entry) to execute when the station is ‘pressed’ (clicked). (I can’t see an explicit way of setting up an execute event that is linked to a db entry.) Is there a way to do this?
- I can’t seem to display the current ‘nowplaying’ station ‘coverart’ anywhere else (as you would do for nowplaying>music in the music db). Is there anyway of doing this (I tried nowplaying>radio to no effect).

I’d love to be able to use the db feature this way but can’t see if this is possible (i.e. the documented features are only available for the standard music/movies databases and not for any special ones you set up with a different name, albeit that they have the same fields).

If I have to revert to the first approach, ok, nut it wont be as neat or fit into the user interface approach used in the rest of XL nearly as well.

Any feedback/help very gratefully received.

Thanks
rbziggy
 
Posts: 124
Joined: Mon Mar 21, 2005 11:49 pm
Location: UK

Postby dgemily on Tue Sep 06, 2005 10:15 am

- I can’t seem to get the associated event (linked to the db entry) to execute when the station is ‘pressed’ (clicked). (I can’t see an explicit way of setting up an execute event that is linked to a db entry.) Is there a way to do this?

If you assigned an event to every item, that should works when you press an item…
Or maybe, try to assign an event "caterory:execute" to the category….

- I can’t seem to display the current ‘nowplaying’ station ‘coverart’ anywhere else (as you would do for nowplaying>music in the music db). Is there anyway of doing this (I tried nowplaying>radio to no effect).


This should works only with a database audio ( using foobar or winamp) and with specifics fields (like <type>track</type> ) in the database. So I don’t think it’s possible using “nowplaying>radio” because you are not using foobar or winamp.

I think there’s a solution… if you add a command to the event of every item ( of your database radio) xlobby:buttons set text ( but I’m not I didn’t try it ;) )

later
dgemily
 
Posts: 793
Joined: Thu May 13, 2004 6:24 am
Location: Paris, France

Postby rbziggy on Tue Sep 06, 2005 9:24 pm

If you assigned an event to every item, that should works when you press an item…
Or maybe, try to assign an event "caterory:execute" to the category….


Yes, tried this (associating an event to the database item but it does not seem to execute when the item is pressed. (I'd hoped that it was the way it worked in that the event was executed on a press.) Is there anything 'special' I need to do/set to get the event referenced in the db to execute?

I'm not sure what "category:execute" does. Couldn't really understand from the explanation in the Help section of this site.

This should works only with a database audio ( using foobar or winamp) and with specifics fields (like track ) in the database. So I don’t think it’s possible using “nowplaying>radio” because you are not using foobar or winamp.


I am using winamp to play the radio input (it comes in from the 'line in' on the soundcard and winamp can play this with the winamp 'play file' command using the parameter 'line://title=BBC Radio 4,hideformat'. This case executes the line in as the file for winamp and shows "BBC Radio 4" as the trackname in winamp). In my current (original) setup, this reflects back the text of the now playing track as the same. "BBC Radio 4" in XL without this being referenced anywhere else (i.e. at present its just one event and not in a db.) However, in the new set up I'm trying to do with presets and a db, the coverart is in the normal place in the 'coverart' section of the db item but I just cant seem to get at it; thought the nowplaying>'dbname' would do it. Seems not though. Does 'nowplaying' only work when the dbname is the fixed 'music' name?

Thanks again.
rbziggy
 
Posts: 124
Joined: Mon Mar 21, 2005 11:49 pm
Location: UK

Postby dgemily on Tue Sep 06, 2005 10:24 pm

Yes, tried this (associating an event to the database item but it does not seem to execute when the item is pressed. (I'd hoped that it was the way it worked in that the event was executed on a press.) Is there anything 'special' I need to do/set to get the event referenced in the db to execute?

in fact ( after check at home), you don't need to assign any event to your category, it's works like that ;)

I am using winamp to play the radio input (it comes in from the 'line in' on the soundcard and winamp can play this with the winamp 'play file' command using the parameter 'line://title=BBC Radio 4,hideformat'. This case executes the line in as the file for winamp and shows "BBC Radio 4" as the trackname in winamp). In my current (original) setup, this reflects back the text of the now playing track as the same. "BBC Radio 4" in XL without this being referenced anywhere else (i.e. at present its just one event and not in a db.) However, in the new set up I'm trying to do with presets and a db, the coverart is in the normal place in the 'coverart' section of the db item but I just cant seem to get at it; thought the nowplaying>'dbname' would do it. Seems not though. Does 'nowplaying' only work when the dbname is the fixed 'music' name?


so use a structure like that ( same at the dadatbase music but you can give the name that you want):
Image
post original from baddabing : http://www.xlobby.com/forum/viewtopic.php?p=18715#18715

later
dgemily
 
Posts: 793
Joined: Thu May 13, 2004 6:24 am
Location: Paris, France

Postby rbziggy on Fri Sep 09, 2005 11:25 pm

Thanks for the tips and the details. I'll spend a bit of time working it up and testing.
rbziggy
 
Posts: 124
Joined: Mon Mar 21, 2005 11:49 pm
Location: UK

Postby rbziggy on Sun Sep 18, 2005 12:04 am

Now got it all working properly. Thanks for the pointers.
rbziggy
 
Posts: 124
Joined: Mon Mar 21, 2005 11:49 pm
Location: UK