Re: [Rhythmbox-devel] Question: How to query rhythmdb case insensitive?
- From: Lachlan <lachlan 00 gmail com>
- Cc: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] Question: How to query rhythmdb case insensitive?
- Date: Mon, 18 Apr 2011 19:16:51 +1000
2011/4/18 David Jelić <burgulgoth gmail com>:
> Hello,
>
> I am trying to write a small plugin in python for syncing multiple
> Rhythmbox players via Last.FM and I would appreciate some help about
> little problem.
do you mean like these?
http://code.google.com/p/lastfm-stats-in-rhythmbox
https://launchpad.net/rb-mergeplays
> What is a proper way of querying rhythmdb for case-insensitive artist
> and title?
> I've been doing it like this:
> query = self.db.query_new()
> self.db.query_append(query, (rhythmdb.QUERY_PROP_EQUALS,
> rhythmdb.PROP_ARTIST, artist, rhythmdb.QUERY_PROP_EQUALS,
> rhythmdb.PROP_TITLE, title))
> query_model = self.db.query_model_new_empty()
> self.db.do_full_query_parsed(query_model, query)
>
> It works fine in cases when data from last.fm and my database have the
> same case, but I need to retrieve results even if case don't mach.
>
> Appreciate your help,
>
> --
> David Jelić
> http://burgulgoth.buksna.net | Personal blog
> _______________________________________________
> rhythmbox-devel mailing list
> rhythmbox-devel gnome org
> http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]