Hi David, just query in lowercase for *_FOLDED fields, check this code: https://bitbucket.org/jimcerberus/rhythmweb/src/0701a4cd8368/rbhandle/__init__.py around line 471
Cheers! <https://bitbucket.org/jimcerberus/rhythmweb/src/0701a4cd8368/rbhandle/__init__.py> On Mon, Apr 18, 2011 at 11:16 AM, Lachlan <[email protected]> wrote: > 2011/4/18 David Jelić <[email protected]>: > > 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 > > [email protected] > > http://mail.gnome.org/mailman/listinfo/rhythmbox-devel > > > _______________________________________________ > rhythmbox-devel mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/rhythmbox-devel > -- Pablo Carranza
_______________________________________________ rhythmbox-devel mailing list [email protected] http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
