comparison audacious/playlist.c @ 1825:8b71a2b0577b trunk

[svn] - results from more profiling
author nenolod
date Thu, 05 Oct 2006 03:26:36 -0700
parents 2a5621bfc610
children d66712838e9f
comparison
equal deleted inserted replaced
1824:2a5621bfc610 1825:8b71a2b0577b
124 static void playlist_generate_shuffle_list(void); 124 static void playlist_generate_shuffle_list(void);
125 static void playlist_generate_shuffle_list_nolock(void); 125 static void playlist_generate_shuffle_list_nolock(void);
126 126
127 static void playlist_recalc_total_time_nolock(void); 127 static void playlist_recalc_total_time_nolock(void);
128 static void playlist_recalc_total_time(void); 128 static void playlist_recalc_total_time(void);
129 129 static gboolean playlist_entry_get_info(PlaylistEntry * entry);
130 130
131 PlaylistEntry * 131 PlaylistEntry *
132 playlist_entry_new(const gchar * filename, 132 playlist_entry_new(const gchar * filename,
133 const gchar * title, 133 const gchar * title,
134 const gint length, 134 const gint length,
141 entry->title = str_to_utf8(title); 141 entry->title = str_to_utf8(title);
142 entry->length = length; 142 entry->length = length;
143 entry->selected = FALSE; 143 entry->selected = FALSE;
144 entry->decoder = dec; 144 entry->decoder = dec;
145 145
146 /* only do this if we have a decoder, otherwise it just takes too long */
146 if (entry->decoder) 147 if (entry->decoder)
147 entry->tuple = entry->decoder->get_song_tuple(entry->filename); 148 playlist_entry_get_info(entry);
148 149
149 return entry; 150 return entry;
150 } 151 }
151 152
152 void 153 void
1553 } 1554 }
1554 1555
1555 entry = node->data; 1556 entry = node->data;
1556 1557
1557 /* FIXME: simplify this logic */ 1558 /* FIXME: simplify this logic */
1558 if ( (!entry->title && entry->length == -1) || 1559 if ((!entry->title && entry->length == -1) ||
1559 (entry->tuple && (entry->tuple->mtime != playlist_get_mtime(entry->filename))) ){ 1560 (entry->tuple && (entry->tuple->mtime > 0 && entry->tuple->mtime != playlist_get_mtime(entry->filename))) ){
1560 if (playlist_entry_get_info(entry)) 1561 if (playlist_entry_get_info(entry))
1561 title = entry->title; 1562 title = entry->title;
1562 } 1563 }
1563 else { 1564 else {
1564 title = entry->title; 1565 title = entry->title;