[tracker] tracker-albumart: Simplify uri vs mtime logic
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-albumart: Simplify uri vs mtime logic
- Date: Wed, 23 Feb 2011 19:17:31 +0000 (UTC)
commit 1008a0fc35a2085743ff9905db5795299e54ec52
Author: Aleksander Morgado <aleksander lanedo com>
Date: Wed Feb 23 20:16:20 2011 +0100
tracker-albumart: Simplify uri vs mtime logic
src/tracker-extract/tracker-albumart.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-albumart.c
index 8d49292..babb398 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-albumart.c
@@ -781,7 +781,6 @@ tracker_albumart_process (const unsigned char *buffer,
gchar *local_uri = NULL;
gchar *filename_uri;
guint64 mtime, a_mtime = 0;
- GFile *mfile;
g_debug ("Processing album art, buffer is %ld bytes, artist:'%s', album:'%s', filename:'%s', mime:'%s'",
(long int) len,
@@ -790,13 +789,13 @@ tracker_albumart_process (const unsigned char *buffer,
filename,
mime);
- if (strstr (filename, "://")) {
- filename_uri = g_strdup (filename);
- mtime = tracker_file_get_mtime_uri (filename);
- } else {
- filename_uri = g_filename_to_uri (filename, NULL, NULL);
- mtime = tracker_file_get_mtime (filename);
- }
+ /* TODO: We can definitely work with GFiles better here */
+
+ filename_uri = (strstr (filename, "://") ?
+ g_strdup (filename) :
+ g_filename_to_uri (filename, NULL, NULL));
+
+ mtime = tracker_file_get_mtime_uri (filename_uri);
albumart_get_path (artist,
album,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]