tag_ape: move code to tag_ape_name_parse()
This commit is contained in:
		@@ -37,6 +37,12 @@ static const char *const ape_tag_names[TAG_NUM_OF_ITEM_TYPES] = {
 | 
				
			|||||||
	[TAG_ITEM_DATE] = "year"
 | 
						[TAG_ITEM_DATE] = "year"
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static enum tag_type
 | 
				
			||||||
 | 
					tag_ape_name_parse(const char *name)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return tag_table_lookup(ape_tag_names, name);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct tag *
 | 
					static struct tag *
 | 
				
			||||||
tag_ape_import_item(struct tag *tag, unsigned long flags,
 | 
					tag_ape_import_item(struct tag *tag, unsigned long flags,
 | 
				
			||||||
		    const char *key, const char *value, size_t value_length)
 | 
							    const char *key, const char *value, size_t value_length)
 | 
				
			||||||
@@ -45,7 +51,7 @@ tag_ape_import_item(struct tag *tag, unsigned long flags,
 | 
				
			|||||||
	if ((flags & (0x3 << 1)) != 0)
 | 
						if ((flags & (0x3 << 1)) != 0)
 | 
				
			||||||
		return tag;
 | 
							return tag;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	enum tag_type type = tag_table_lookup(ape_tag_names, key);
 | 
						enum tag_type type = tag_ape_name_parse(key);
 | 
				
			||||||
	if (type == TAG_NUM_OF_ITEM_TYPES)
 | 
						if (type == TAG_NUM_OF_ITEM_TYPES)
 | 
				
			||||||
		return tag;
 | 
							return tag;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user