Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple genres in tags #437

Closed
wants to merge 3 commits into from
Closed

Add support for multiple genres in tags #437

wants to merge 3 commits into from

Conversation

pollyzoid
Copy link

This converts the comma-delimited string into a list when writing tags
and vice-versa when reading.
This way it adds support for media browsers separating genres without
breaking database storage or querying.

Should help with #119

This converts the comma-delimited string into a list when writing tags
and vice-versa when reading.
This way it adds support for media browsers separating genres without
breaking database storage or querying.
Now actually converts the genre list into a comma-delimited string.
@pollyzoid
Copy link
Author

Multiple genres doesn't seem to work for MP4 or ASF audio files, so I left them intact for now.

Whoops. Last change broke tests because it incorrectly returned a list.
@sampsyo
Copy link
Member

sampsyo commented Oct 25, 2013

Very cool! Thanks for taking the first stab at this; we should definitely move closer to real multi-genre support.

I'm not 100% certain about using commas to separate the genres for this case, though. It would be great to be able to losslessly distinguish between a string with commas in it and a list of strings. So, concretely, it would be great if mf.genre returned a list of strings.

This would, of course, be a headache for all the client code that currently expects it to be a string, though. One possible resolution would be to introduce a genres field that's list-valued and keep the genre field string-valued. The latter could either hold the first genre or use the comma-separated approach you have here.

Does that sound reasonable, or is it just crazy? (FWIW, there is precedent in MediaFile for providing two views onto the same data—see the date fields.)

@pollyzoid pollyzoid closed this Mar 17, 2014
@pollyzoid pollyzoid deleted the lastgenre-multiple branch March 17, 2014 09:18
@pollyzoid pollyzoid restored the lastgenre-multiple branch March 17, 2014 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants