changeset 1818:e3e31a084b09 trunk

[svn] - try not to reject tuples that have an mtime of 0. (special tuples referring to URIs)
author nenolod
date Thu, 05 Oct 2006 01:54:37 -0700
parents 0734a9808884
children 9257454b617c
files ChangeLog audacious/playlist.c
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Oct 05 01:31:41 2006 -0700
+++ b/ChangeLog	Thu Oct 05 01:54:37 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-05 08:31:41 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2591]
+  - make sure the PlaylistEntry has a tuple.
+  
+  trunk/audacious/playlist.c |    3 ++-
+  1 file changed, 2 insertions(+), 1 deletion(-)
+
+
 2006-10-05 06:45:55 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2589]
   - missed a couple of properties, sorry
--- a/audacious/playlist.c	Thu Oct 05 01:31:41 2006 -0700
+++ b/audacious/playlist.c	Thu Oct 05 01:54:37 2006 -0700
@@ -176,9 +176,6 @@
 
     modtime = playlist_get_mtime(entry->filename);
 
-    if (modtime == 0) // maybe file not exist
-	    return FALSE;
-
     if (entry->decoder == NULL)
         entry->decoder = input_check_file(entry->filename, FALSE);
 
@@ -1552,7 +1549,6 @@
     entry = node->data;
 
     /* FIXME: simplify this logic */
-//    if (!entry->title && entry->length == -1) {
     if ( (!entry->title && entry->length == -1) || 
 	 (entry->tuple && (entry->tuple->mtime != playlist_get_mtime(entry->filename))) ){
         if (playlist_entry_get_info(entry))
@@ -2072,6 +2068,7 @@
     GList *node;
     PlaylistEntry *entry = NULL;
     TitleInput *tuple = NULL;
+    gint mtime;
 
     PLAYLIST_LOCK();
 
@@ -2085,8 +2082,8 @@
     PLAYLIST_UNLOCK();
 
     /* No tuple? Try to set this entry up properly. --nenolod */
-//    if (entry->tuple == NULL)
-    if (!entry->tuple || (entry->tuple->mtime != playlist_get_mtime(entry->filename)))
+    if (entry->tuple == NULL || entry->tuple->mtime == 0 ||
+	(entry->tuple->mtime != playlist_get_mtime(entry->filename)))
     {
         playlist_entry_get_info(entry);
         tuple = entry->tuple;