Store lyrics language in tags instead of text representation language (PICARD-242)

This changes the meaning of the "language" tag. It is now no longer
derived from the text representation language of the release, but from
the lyrics language of the linked work(s).

The text representation language of the release is still available (e.g.
for scripting/plugins) as %_releaselanguage%. To get the old behavior
back, one must insert this line at the beginning of the scripting field:

    $set(language,%_releaselanguage%)

http://tickets.musicbrainz.org/browse/PICARD-242
This commit is contained in:
Johannes Weißl
2012-06-21 03:20:46 +02:00
parent fc7470eee0
commit 835fa46c85
2 changed files with 4 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ Version 1.0.1 - unreleased
* Refreshing a non-album track correctly clears previous track metadata (PICARD-220)
* Fixed the preserved tags setting for tags with uppercase characters (PICARD-217)
* Added a completion box to the preserved tags setting, and clarified how it works
* Store lyrics language in tags instead of text representation language (PICARD-242)
Version 1.0 - 2012-06-02
* New UI: Extended comparison of existing vs. MB metadata & tags (PICARD-43)

View File

@@ -251,6 +251,8 @@ def recording_to_metadata(node, track, config):
def work_to_metadata(work, m, config):
m.add("musicbrainz_workid", work.attribs['id'])
if 'language' in work.children:
m.add("language", work.language[0].text)
if 'relation_list' in work.children:
_relations_to_metadata(work.relation_list, m, config)
@@ -298,7 +300,7 @@ def release_to_metadata(node, m, config, album=None):
m['label'], m['catalognumber'] = label_info_from_node(nodes[0])
elif name == 'text_representation':
if 'language' in nodes[0].children:
m['language'] = nodes[0].language[0].text
m['~releaselanguage'] = nodes[0].language[0].text
if 'script' in nodes[0].children:
m['script'] = nodes[0].script[0].text
elif name == 'tag_list':