# HG changeset patch # User yaz # Date 1160157055 25200 # Node ID 7d0cd3fab6a268c5cf4b7abf96353338970649a5 # Parent b64edd53d3a93b87b73d82e399e3935477a31f4c [svn] - mtime=-1 has been introduced to represent "uninitialized". - scanning for uninitialized tuple works correctly. - "Update View" works again. diff -r b64edd53d3a9 -r 7d0cd3fab6a2 ChangeLog --- a/ChangeLog Thu Oct 05 22:41:09 2006 -0700 +++ b/ChangeLog Fri Oct 06 10:50:55 2006 -0700 @@ -1,3 +1,11 @@ +2006-10-06 05:41:09 +0000 William Pitcock + revision [2637] + - actually, apparently we need that... fucking apple + + trunk/audacious/mainwin.c | 6 ++++++ + 1 file changed, 6 insertions(+) + + 2006-10-06 05:38:01 +0000 William Pitcock revision [2635] - only set window hints after the resize diff -r b64edd53d3a9 -r 7d0cd3fab6a2 audacious/playlist.c --- a/audacious/playlist.c Thu Oct 05 22:41:09 2006 -0700 +++ b/audacious/playlist.c Fri Oct 06 10:50:55 2006 -0700 @@ -178,7 +178,7 @@ g_return_val_if_fail(entry != NULL, FALSE); - if (!entry->tuple || entry->tuple->mtime > 0) + if (entry->tuple == NULL || entry->tuple->mtime > 0 || entry->tuple->mtime == -1) modtime = playlist_get_mtime(entry->filename); else modtime = 0; /* URI -nenolod */ @@ -1556,8 +1556,9 @@ entry = node->data; /* FIXME: simplify this logic */ - if ((!entry->title && entry->length == -1) || - (entry->tuple && (entry->tuple->mtime > 0 && entry->tuple->mtime != playlist_get_mtime(entry->filename))) ){ + if ((entry->title == NULL && entry->length == -1) || + (entry->tuple && entry->tuple->mtime != 0 && (entry->tuple->mtime == -1 || entry->tuple->mtime != playlist_get_mtime(entry->filename)))) + { if (playlist_entry_get_info(entry)) title = entry->title; } @@ -1599,7 +1600,9 @@ tuple = entry->tuple; // if no tuple or tuple with old mtime, get new one. - if (!tuple || (entry->tuple->mtime > 0 && entry->tuple->mtime != playlist_get_mtime(entry->filename))) { + if (tuple == NULL || + (entry->tuple && entry->tuple->mtime != 0 && (entry->tuple->mtime == -1 || entry->tuple->mtime != playlist_get_mtime(entry->filename)))) + { playlist_entry_get_info(entry); tuple = entry->tuple; } @@ -1629,8 +1632,8 @@ } entry = node->data; - - if (!entry->tuple || (entry->tuple->mtime > 0 && entry->tuple->mtime != playlist_get_mtime(entry->filename))){ + if (entry->tuple == NULL || + (entry->tuple->mtime != 0 && (entry->tuple->mtime == -1 || entry->tuple->mtime != playlist_get_mtime(entry->filename)))) { if (playlist_entry_get_info(entry)) song_time = entry->length; @@ -2088,8 +2091,8 @@ PLAYLIST_UNLOCK(); /* No tuple? Try to set this entry up properly. --nenolod */ - if (entry->tuple == NULL || entry->tuple->mtime == 0 || - (entry->tuple->mtime != playlist_get_mtime(entry->filename))) + if (entry->tuple == NULL || entry->tuple->mtime == -1 || + entry->tuple->mtime == 0 || entry->tuple->mtime != playlist_get_mtime(entry->filename)) { playlist_entry_get_info(entry); tuple = entry->tuple; @@ -2631,7 +2634,7 @@ /* invalidate mtime to reread */ if (entry->tuple != NULL) - entry->tuple->mtime = 0; + entry->tuple->mtime = -1; /* -1 denotes "non-initialized". now 0 is for stream etc. yaz */ if (!playlist_entry_get_info(entry)) { if (g_list_index(playlist_get(), entry) == -1)