diff options
author | tmzullinger <tmzullinger@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2008-08-09 15:01:31 +0000 |
---|---|---|
committer | tmzullinger <tmzullinger@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2008-08-09 15:01:31 +0000 |
commit | 07e4589f9a6bec310b82fdf63705f5b138c268be (patch) | |
tree | 9d49cd2e8fa484a9279ae3e04300cb1838e8a88b | |
parent | 2172506a12f5580f57f24c3cc5d427cc3b4f89b6 (diff) | |
download | libgpod-tmz-07e4589f9a6bec310b82fdf63705f5b138c268be.tar.gz libgpod-tmz-07e4589f9a6bec310b82fdf63705f5b138c268be.tar.xz libgpod-tmz-07e4589f9a6bec310b82fdf63705f5b138c268be.zip |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/itdb_playlist.c | 11 | ||||
-rw-r--r-- | tests/test-ls.c | 2 |
3 files changed, 10 insertions, 8 deletions
@@ -1,3 +1,8 @@ +2008-08-09 Todd Zullinger <tmzullinger at users.sourceforge.net> + + * src/itdb_playlist.c + tests/test-ls.c: Remove uses of deprecated itdb_time_* functions + 2008-08-03 Jorg Schuler <jcsjcs at users.sourceforge.net> * 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); |