static t_size merge_tags_calc_rating(const file_info & p_info,const char * p_field) { t_size field_index = p_info.meta_find(p_field); if (field_index != ~0) { return merge_tags_calc_rating_by_index(p_info,field_index); } else { return 0; } }
void selection_properties_t::g_print_field(const char * field, const file_info & p_info, pfc::string_base & p_out) { t_size meta_index = p_info.meta_find(field); if (meta_index != pfc_infinite) { t_size i, count = p_info.meta_enum_value_count(meta_index); for (i = 0; i < count; i++) p_out << p_info.meta_enum_value(meta_index, i) << (i + 1 < count ? "; " : ""); } }
static void strip_redundant_track_meta(unsigned p_tracknumber,const file_info & p_cueinfo,file_info_record::t_meta_map & p_meta,const char * p_metaname) { t_size metaindex = p_cueinfo.meta_find(p_metaname); if (metaindex == pfc_infinite) return; pfc::string_formatter namelocal; build_cue_meta_name(p_metaname,p_tracknumber,namelocal); { const file_info_record::t_meta_value * val = p_meta.query_ptr(namelocal); if (val == NULL) return; file_info_record::t_meta_value::const_iterator iter = val->first(); for(t_size valwalk = 0, valcount = p_cueinfo.meta_enum_value_count(metaindex); valwalk < valcount; ++valwalk) { if (iter.is_empty()) return; if (strcmp(*iter,p_cueinfo.meta_enum_value(metaindex,valwalk)) != 0) return; ++iter; } if (!iter.is_empty()) return; } //success p_meta.remove(namelocal); }