Re: [Rhythmbox-devel] How to import RBIRadioSource reference
- From: Jannik Heller <scrawl baseoftrash de>
- To: Jonathan Matthew <jonathan d14n org>
- Cc: rhythmbox-devel <rhythmbox-devel gnome org>
- Subject: Re: [Rhythmbox-devel] How to import RBIRadioSource reference
- Date: Mon, 14 Dec 2009 22:00:21 +0100
Am Dienstag, den 15.12.2009, 06:28 +1000 schrieb Jonathan Matthew:
> On Tue, Dec 15, 2009 at 1:04 AM, Jannik Heller <scrawl baseoftrash de> wrote:
> > Am Montag, den 14.12.2009, 11:55 +1000 schrieb Jonathan Matthew:
> >> > So how to import the RBIRadioSource that I can access it? Or does
> >> > someone know another way to get the Radio source?
> >>
> >> You'd have to check the source name or maybe its entry type.
> > That's what I tried at first. But it seems the "name" Property is
> > translated in the user's language, so that won't work with all
> > languages. Currently I'm using a workaround, importing the Rhythmbox
> > translation file and comparing the Radio translation to the name
> > property.
>
> Here's a better approach: shell.guess_source_for_uri("mms://x")
Thanks, that works and seems to be safe.
> This would be better again, but it doesn't work yet:
> entrytype = db.entry_type_get_by_name("iradio")
> source = shell.get_source_by_entry_type(entrytype)
Maybe the Radio Plugin (it's a Plugin, internally, as far as I'm
informed) should rather register a property in the shell. Because for
example shell.get_property("library-source") works.
Thanks again for your help.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]