rygel r290 - trunk/src/media-providers/tracker
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r290 - trunk/src/media-providers/tracker
- Date: Tue, 18 Nov 2008 21:00:18 +0000 (UTC)
Author: zeeshanak
Date: Tue Nov 18 21:00:18 2008
New Revision: 290
URL: http://svn.gnome.org/viewvc/rygel?rev=290&view=rev
Log:
Remove the now unneeded methods from TrackerContainer.
Had forgotten to remove add_music_item_from_db and seconds_to_iso8601 methods.
Modified:
trunk/src/media-providers/tracker/rygel-tracker-container.vala
Modified: trunk/src/media-providers/tracker/rygel-tracker-container.vala
==============================================================================
--- trunk/src/media-providers/tracker/rygel-tracker-container.vala (original)
+++ trunk/src/media-providers/tracker/rygel-tracker-container.vala Tue Nov 18 21:00:18 2008
@@ -179,83 +179,6 @@
return true;
}
- private bool add_music_item_from_db (DIDLLiteWriter didl_writer,
- string path) {
- string[] keys = new string[] {"File:Name",
- "File:Mime",
- "Audio:Title",
- "Audio:Artist",
- "Audio:TrackNo",
- "Audio:Album",
- "Audio:ReleaseDate",
- "Audio:DateAdded",
- "DC:Date"};
-
- string[] values = null;
-
- /* TODO: make this async */
- try {
- values = TrackerContainer.metadata.Get (this.category,
- path,
- keys);
- } catch (GLib.Error error) {
- critical ("failed to get metadata for %s: %s\n",
- path,
- error.message);
-
- return false;
- }
-
- string title;
- if (values[2] != "")
- title = values[2];
- else
- /* If title wasn't provided, use filename instead */
- title = values[0];
-
- MediaItem item = new MediaItem (this.root_id + ":" + path,
- this.id,
- title,
- this.child_class);
-
- if (values[4] != "")
- item.track_number = values[4].to_int ();
-
- if (values[8] != "") {
- item.date = seconds_to_iso8601 (values[8]);
- } else if (values[6] != "") {
- item.date = seconds_to_iso8601 (values[6]);
- } else {
- item.date = seconds_to_iso8601 (values[7]);
- }
-
- item.mime = values[1];
- item.author = values[3];
- item.album = values[5];
- item.uri = uri_from_path (path);
-
- item.serialize (didl_writer);
-
- return true;
- }
-
- static string seconds_to_iso8601 (string seconds) {
- string date;
-
- if (seconds != "") {
- TimeVal tv;
-
- tv.tv_sec = seconds.to_int ();
- tv.tv_usec = 0;
-
- date = tv.to_iso8601 ();
- } else {
- date = "";
- }
-
- return date;
- }
-
private string uri_from_path (string path) {
string escaped_path = Uri.escape_string (path, "/", true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]