Commit fb6e21df authored by James Livingston's avatar James Livingston
Browse files

update README a bit, and add query pre-processing

parent b0c9e724
2005-09-27 James Livingston <jrl@ids.org.au>
* README: point to the gnome.org web sites, and update the example
gstreamer pipeline to a plybin/decodebin based one. Closes bug 317108
* rhythmdb/rhythmdb-query-model.c:
(rhythmdb_query_model_set_property),
(rhythmdb_query_model_get_property),
(rhythmdb_query_model_finalize):
* rhythmdb/rhythmdb.c: (rhythmdb_query_internal),
(rhythmdb_entry_set_visibility), (rhythmdb_query_preprocess):
* rhythmdb/rhythmdb.h:
* sources/rb-iradio-source.c: (impl_search):
* sources/rb-library-source.c: (impl_search): Add query
"preprocessing", which performs operations such as casefolding any
strings that will be compared to any of the *_FOLDED properties.
Closes bug 316039
2005-09-27 James Livingston <jrl@ids.org.au>
* data/glade/daap-prefs.glade:
......
General Information
===================
This is Rhythmbox version 0.8. Rhythmbox is your one-stop multimedia
This is Rhythmbox version 0.9. Rhythmbox is your one-stop multimedia
application, supporting a music library, multiple playlists,
internet radio, and more.
Rhythmbox is free software, licensed under the GNU GPL.
The official web site is:
http://web.rhythmbox.org/
http://www.gnome.org/projects/rhythmbox/
Information about mailing lists can be found at:
http://lists.gnome.org/mailman/listinfo/rhythmbox-devel
Our IRC channel is #rhythmbox on GIMPnet (irc.gimp.org).
Rhythmbox is developed primarily using the arch revision control
system, specifically the "tla" implementation. To get a copy
Rhythmbox is developed primarily using in gnome cvs. To get a copy
of the latest development tree, see this web page:
http://web.rhythmbox.org/development.html
http://www.gnome.org/projects/rhythmbox/development.html
Installation
============
......@@ -43,24 +42,23 @@ In the bug report please include:
* If rhythmbox crashes when you try to import a folder full of music files
to your library, you can pinpoint the exact file causing the crash
by running rhythmbox -d from a console. It will output lots of debugging
by running "rhythmbox -d" from a console. It will output lots of debugging
information, the last file mentioned in the console output will quite likely
correspond to the file causing the crash.
correspond to the file causing the crash. If you want to save the debug log
to a file, use "rhythmbox -d 2> debug.log".
* Before you report a bug, it will be useful to know if GStreamer works.
If you have playback issues, try running this command:
$ gst-launch-0.8 gnomevfssrc location=/path/to/my/musicfile.ogg ! spider ! volume ! audioscale ! audioconvert ! $(gconftool-2 -g /system/gstreamer/0.8/default/audiosink)
$ gst-launch-0.8 playbin uri="file:///path/to/my/musicfile.ogg"
If you have troubles importing a specific file to your library, try running:
$ gst-launch-0.8 filesrc location=/path/to/my/musicfile.ogg ! typefind ! spider ! audio/x-raw-int ! fakesink
$ gst-launch-0.8 -t filesrc location=/path/to/my/musicfile.ogg ! decodebin ! fakesink
Just replace /path/to/my/musicfile.ogg with some sound file in the 2 commands
above.
You might also want to try the monkey-media tests/test-cmdline program.
* How to reproduce the bug.
If you can reproduce the bug with one of the programs in tests/, that
......
......@@ -139,7 +139,7 @@ struct RhythmDBQueryModelPrivate
gpointer sort_user_data;
GDestroyNotify sort_destroy_notify;
GPtrArray *query;
GPtrArray *query, *original_query;
guint stamp;
......@@ -339,12 +339,12 @@ rhythmdb_query_model_set_property (GObject *object,
switch (prop_id)
{
case PROP_RHYTHMDB:
{
model->priv->db = g_value_get_object (value);
break;
}
case PROP_QUERY:
model->priv->query = rhythmdb_query_copy (g_value_get_pointer (value));
model->priv->original_query = rhythmdb_query_copy (model->priv->query);
rhythmdb_query_preprocess (model->priv->query);
break;
case PROP_SORT_FUNC:
model->priv->sort_func = g_value_get_pointer (value);
......@@ -384,7 +384,7 @@ rhythmdb_query_model_get_property (GObject *object,
g_value_set_object (value, model->priv->db);
break;
case PROP_QUERY:
g_value_set_pointer (value, model->priv->query);
g_value_set_pointer (value, model->priv->original_query);
break;
case PROP_SORT_FUNC:
g_value_set_pointer (value, model->priv->sort_func);
......@@ -513,6 +513,8 @@ rhythmdb_query_model_finalize (GObject *object)
if (model->priv->query)
rhythmdb_query_free (model->priv->query);
if (model->priv->original_query)
rhythmdb_query_free (model->priv->original_query);
while ((update = g_async_queue_try_pop (model->priv->pending_updates)) != NULL)
rhythmdb_query_model_free_pending_update (model, update);
......
......@@ -2569,6 +2569,8 @@ rhythmdb_query_internal (struct RhythmDBQueryThreadData *data)
struct RhythmDBEvent *result;
RhythmDBClass *klass = RHYTHMDB_GET_CLASS (data->db);
rhythmdb_query_preprocess (data->query);
rb_debug ("doing query");
klass->impl_do_full_query (data->db, data->query,
......@@ -3048,3 +3050,31 @@ rhythmdb_entry_set_visibility (RhythmDB *db, RhythmDBEntry *entry,
}
g_value_unset (&old_val);
}
void
rhythmdb_query_preprocess (GPtrArray *query)
{
int i;
for (i = 0; i < query->len; i++) {
RhythmDBQueryData *data = g_ptr_array_index (query, i);
if (data->subquery) {
rhythmdb_query_preprocess (data->subquery);
} else switch (data->propid) {
case RHYTHMDB_PROP_TITLE_FOLDED:
case RHYTHMDB_PROP_GENRE_FOLDED:
case RHYTHMDB_PROP_ARTIST_FOLDED:
case RHYTHMDB_PROP_ALBUM_FOLDED:
{
/* as we are matching against a folded property, the string needs to also be folded */
const char *orig = g_value_get_string (data->val);
char *folded = g_utf8_casefold (orig, -1);
g_value_reset (data->val);
g_value_take_string (data->val, folded);
break;
}
}
}
}
......@@ -448,6 +448,7 @@ GPtrArray * rhythmdb_query_parse (RhythmDB *db, ...);
void rhythmdb_query_append (RhythmDB *db, GPtrArray *query, ...);
void rhythmdb_query_free (GPtrArray *query);
GPtrArray * rhythmdb_query_copy (GPtrArray *array);
void rhythmdb_query_preprocess (GPtrArray *query);
void rhythmdb_query_serialize (RhythmDB *db, GPtrArray *query,
xmlNodePtr node);
......
......@@ -502,10 +502,7 @@ impl_search (RBSource *asource, const char *search_text)
search_text = NULL;
g_free (source->priv->search_text);
if (search_text)
source->priv->search_text = g_utf8_casefold (search_text, -1);
else
source->priv->search_text = NULL;
source->priv->search_text = g_strdup (search_text);
rb_iradio_source_do_query (source, RB_IRADIO_QUERY_TYPE_SEARCH);
rb_source_notify_filter_changed (RB_SOURCE (source));
......
......@@ -1026,7 +1026,7 @@ impl_search (RBSource *asource, const char *search_text)
rb_debug ("doing search for \"%s\"", search_text ? search_text : "(NULL)");
g_free (source->priv->search_text);
source->priv->search_text = search_text != NULL ? g_utf8_casefold (search_text, -1) : NULL;
source->priv->search_text = g_strdup (search_text);
rb_library_source_do_query (source, RB_LIBRARY_QUERY_TYPE_SEARCH);
rb_source_notify_filter_changed (RB_SOURCE (source));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment