{
if (!cd) return;
- if (debug) printf("collection \"%s\" freed\n", cd->name);
+ DEBUG_1("collection \"%s\" freed\n", cd->name);
collection_load_stop(cd);
collection_list_free(cd->list);
{
cd->ref++;
- if (debug) printf("collection \"%s\" ref count = %d\n", cd->name, cd->ref);
+ DEBUG_1("collection \"%s\" ref count = %d\n", cd->name, cd->ref);
}
void collection_unref(CollectionData *cd)
{
cd->ref--;
- if (debug) printf("collection \"%s\" ref count = %d\n", cd->name, cd->ref);
+ DEBUG_1("collection \"%s\" ref count = %d\n", cd->name, cd->ref);
if (cd->ref < 1)
{
ci = collection_info_new_if_not_exists(cd, &st, fd);
if (!ci) return FALSE;
- if (debug > 2) printf("add to collection: %s\n", fd->path);
+ DEBUG_3("add to collection: %s\n", fd->path);
cd->list = collection_list_add(cd->list, ci, sorted ? cd->sort_method : SORT_NONE);
cd->changed = TRUE;
ci = collection_info_new_if_not_exists(cd, &st, fd);
if (!ci) return FALSE;
- if (debug > 2) printf("insert in collection: %s\n", fd->path);
+ DEBUG_3("insert in collection: %s\n", fd->path);
cd->list = collection_list_insert(cd->list, ci, insert_ci, sorted ? cd->sort_method : SORT_NONE);
cd->changed = TRUE;