comparison src/audacious/playlist.c @ 4087:776c30747439

avoid unnecessary serial increment.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sun, 16 Dec 2007 20:54:53 +0900
parents 96d8114f0b89
children e1ecacef3789
comparison
equal deleted inserted replaced
4086:96d8114f0b89 4087:776c30747439
2602 entry = node->data; 2602 entry = node->data;
2603 2603
2604 if(playlist->attribute & PLAYLIST_STATIC || 2604 if(playlist->attribute & PLAYLIST_STATIC ||
2605 (entry->tuple && tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 && 2605 (entry->tuple && tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
2606 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1)) { 2606 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1)) {
2607 update_playlistwin = TRUE;
2608 continue; 2607 continue;
2609 } 2608 }
2609
2610 AUDDBG("len=%d mtime=%d\n",
2611 tuple_get_int(entry->tuple, FIELD_LENGTH, NULL),
2612 tuple_get_int(entry->tuple, FIELD_MTIME, NULL));
2610 2613
2611 if (!playlist_entry_get_info(entry)) { 2614 if (!playlist_entry_get_info(entry)) {
2612 if (g_list_index(playlist->entries, entry) == -1) 2615 if (g_list_index(playlist->entries, entry) == -1)
2613 /* Entry disapeared while we 2616 /* Entry disapeared while we
2614 looked it up. Restart. */ 2617 looked it up. Restart. */
2620 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) { 2623 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) {
2621 update_playlistwin = TRUE; 2624 update_playlistwin = TRUE;
2622 } 2625 }
2623 } 2626 }
2624 } // on_demand 2627 } // on_demand
2628
2625 else if (cfg.get_info_on_demand && 2629 else if (cfg.get_info_on_demand &&
2626 (!cfg.playlist_visible || cfg.playlist_shaded || !cfg.use_pl_metadata)) 2630 (!cfg.playlist_visible || cfg.playlist_shaded || !cfg.use_pl_metadata))
2627 { 2631 {
2628 g_mutex_lock(mutex_scan); 2632 g_mutex_lock(mutex_scan);
2629 playlist_get_info_scan_active = FALSE; 2633 playlist_get_info_scan_active = FALSE;
2630 g_mutex_unlock(mutex_scan); 2634 g_mutex_unlock(mutex_scan);
2631 } 2635 }
2636
2632 else /* not on_demand and not on_load... 2637 else /* not on_demand and not on_load...
2633 NOTE: this shouldn't happen anymore, sanity check in bmp_config_load now */ 2638 NOTE: this shouldn't happen anymore, sanity check in bmp_config_load now */
2634 { 2639 {
2635 g_mutex_lock(mutex_scan); 2640 g_mutex_lock(mutex_scan);
2636 playlist_get_info_scan_active = FALSE; 2641 playlist_get_info_scan_active = FALSE;