summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortmzullinger <tmzullinger@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2008-08-09 15:01:31 +0000
committertmzullinger <tmzullinger@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2008-08-09 15:01:31 +0000
commit07e4589f9a6bec310b82fdf63705f5b138c268be (patch)
tree9d49cd2e8fa484a9279ae3e04300cb1838e8a88b /src
parent2172506a12f5580f57f24c3cc5d427cc3b4f89b6 (diff)
downloadlibgpod-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
Diffstat (limited to 'src')
-rw-r--r--src/itdb_playlist.c11
1 files changed, 4 insertions, 7 deletions
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);