changeset 1824:2a5621bfc610 trunk

[svn] - more mtime = 0 checks - try to grab the tuple immediately on add
author nenolod
date Thu, 05 Oct 2006 03:03:56 -0700
parents 043143e4578e
children 8b71a2b0577b
files ChangeLog audacious/playlist.c
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Oct 05 02:43:17 2006 -0700
+++ b/ChangeLog	Thu Oct 05 03:03:56 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-05 09:43:17 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2603]
+  - ditto for playlist_get_songtime().
+  
+  trunk/audacious/playlist.c |    3 +--
+  1 file changed, 1 insertion(+), 2 deletions(-)
+
+
 2006-10-05 09:41:57 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2601]
   - tuples with an mtime of 0 don't need to be checked
--- a/audacious/playlist.c	Thu Oct 05 02:43:17 2006 -0700
+++ b/audacious/playlist.c	Thu Oct 05 03:03:56 2006 -0700
@@ -143,6 +143,9 @@
     entry->selected = FALSE;
     entry->decoder = dec;
 
+    if (entry->decoder)
+        entry->tuple = entry->decoder->get_song_tuple(entry->filename);
+
     return entry;
 }
 
@@ -174,7 +177,10 @@
 
     g_return_val_if_fail(entry != NULL, FALSE);
 
-    modtime = playlist_get_mtime(entry->filename);
+    if (!entry->tuple || entry->tuple->mtime > 0)
+	modtime = playlist_get_mtime(entry->filename);
+    else
+	modtime = 0;  /* URI -nenolod */
 
     if (entry->decoder == NULL)
         entry->decoder = input_check_file(entry->filename, FALSE);