From 07e4589f9a6bec310b82fdf63705f5b138c268be Mon Sep 17 00:00:00 2001 From: tmzullinger Date: Sat, 9 Aug 2008 15:01:31 +0000 Subject: Remove uses of deprecated itdb_time_* functions git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2095 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 5 +++++ src/itdb_playlist.c | 11 ++++------- tests/test-ls.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e48c72d..fa626fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-09 Todd Zullinger + + * src/itdb_playlist.c + tests/test-ls.c: Remove uses of deprecated itdb_time_* functions + 2008-08-03 Jorg Schuler * src/ithumb-writer (ithumb_writer_handle_pixbuf_transform): diff --git a/src/itdb_playlist.c b/src/itdb_playlist.c index 074d543..2fbc691 100644 --- a/src/itdb_playlist.c +++ b/src/itdb_playlist.c @@ -340,7 +340,6 @@ gboolean itdb_splr_eval (Itdb_SPLRule *splr, Itdb_Track *track) guint32 datecomp = 0; Itdb_Playlist *playcomp = NULL; time_t t; - guint64 mactime; g_return_val_if_fail (splr, FALSE); g_return_val_if_fail (track, FALSE); @@ -567,13 +566,11 @@ gboolean itdb_splr_eval (Itdb_SPLRule *splr, Itdb_Track *track) case ITDB_SPLACTION_IS_IN_THE_LAST: time (&t); t += (splr->fromdate * splr->fromunits); - mactime = itdb_time_host_to_mac (t); - return (datecomp > mactime); + return (datecomp > t); case ITDB_SPLACTION_IS_NOT_IN_THE_LAST: time (&t); t += (splr->fromdate * splr->fromunits); - mactime = itdb_time_host_to_mac (t); - return (datecomp <= mactime); + return (datecomp <= t); case ITDB_SPLACTION_IS_IN_THE_RANGE: return ((datecomp <= splr->fromvalue && datecomp >= splr->tovalue) || @@ -1237,7 +1234,7 @@ Itdb_Playlist *itdb_playlist_new (const gchar *title, gboolean spl) pl->name = g_strdup (title); pl->sortorder = ITDB_PSO_MANUAL; - pl->timestamp = itdb_time_get_mac_time (); + pl->timestamp = time (NULL); pl->is_spl = spl; if (spl) @@ -1319,7 +1316,7 @@ void itdb_playlist_add (Itdb_iTunesDB *itdb, Itdb_Playlist *pl, gint32 pos) pl->id = id; } if (pl->sortorder == 0) pl->sortorder = ITDB_PSO_MANUAL; - if (pl->timestamp == 0) pl->timestamp = itdb_time_get_mac_time (); + if (pl->timestamp == 0) pl->timestamp = time (NULL); /* pos == -1 appends at the end of the list */ itdb->playlists = g_list_insert (itdb->playlists, pl, pos); diff --git a/tests/test-ls.c b/tests/test-ls.c index ed881e7..c2250b7 100644 --- a/tests/test-ls.c +++ b/tests/test-ls.c @@ -48,7 +48,7 @@ display_recently_played (Itdb_iTunesDB *db) if (track->recent_playcount != 0) { char date[30]; - time_t track_time = itdb_time_mac_to_host (track->time_played); + time_t track_time = track->time_played; g_print ("%s - %s - %s:\n", track->artist, track->album, track->title); -- cgit