Fallback procedure when displayFormat results in an empty string
|
29-08-2013, 00:25
(This post was last modified: 29-08-2013 00:48 by winxi.)
Post: #1
|
|||
|
|||
Fallback procedure when displayFormat results in an empty string
Hi Simon,
I mainly use the MusicBrainz database to tag my music files. For releases with multiple artists, MusicBrainz provides link phrases in addition to the artists themselves. These link phrases sometimes contain useful information which I want to retain when using MinimServer (e.g. ArtistA and ArtistB, ArtistA vs. ArtistB, ArtistA feat. ArtistB, ...). Thus, for a track with the artists ArtistA and ArtistB and the link phrase ' vs. ' I apply the two ARTIST tags 'ArtistA' and 'ArtistB' and an additional custom tag named DISPLAYARTIST containing the string 'ArtistA vs. ArtistB'. In MinimServer, I add Artist.displayFormat={$displayartist} to the tagFormat property. This enables me to browse for ArtistA and ArtistB in the All Artists index and also to display the full displayartist string containing the link phrase at the control point and the renderer. In my library, I've three different combinations concerning the ARTIST and the DISPLAYARTIST tags: 1) A single ARTIST tag and no DISPLAYARTIST tag 2) Multiple ARTIST tags and no DISPLAYARTIST tag (when no dedicated link phrase is available) 3) Multiple ARTIST tags and a corresponding DISPLAYARTIST tag With the displayFormat setting from above, MinimServer displays the following for the three cases: 1) The content of the single ARTIST tag 2) 'Unknown Artist' 3) The content of the DISPLAYARTIST tag I think that there is an inconsistency between the cases 1) and 2). It should be either 'Unknown Artist' in both these cases or the content of the single ARTIST tag in case 1) and combined ARTIST tags using the default rule in case 2 (ArtistA, ArtistB, ...). Personally, I would prefer the latter option because otherwise I'd have to apply the custom DISPLAYARTIST tag to all my files, even to those with just a single ARTIST tag. On this occcasion I'd also like to encourage you to allow the indexValue.yearOnly tag option to be applied for all date related tags (DATE, ORIGINALDATE, RELEASEDATE) and to provide a corresponding displayValue.yearOnly tag option for these tags. Many thanks! |
|||
29-08-2013, 06:46
Post: #2
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(29-08-2013 00:25)winxi Wrote: With the displayFormat setting from above, MinimServer displays the following for the three cases: From a quick look at the code, it seems that MinimServer would send an empty string in the XML tags <upnp:artist> and <dc:creator> in cases 1) and 2). This is consistent, but I think it would be better to completely omit these XML tags instead. Please can you post the complete XML that MinimServer is sending for cases 1) and 2). You can get this by using Kinsky Windows. If you right-click on the track and select Details, then click on 'Copy to clipboard', this will give you the complete XML. Please zip the XML and post it as an attachment. It will be a few days before I'm able to do more investigations on this. Quote:On this occcasion I'd also like to encourage you to allow the indexValue.yearOnly tag option to be applied for all date related tags (DATE, ORIGINALDATE, RELEASEDATE) and to provide a corresponding displayValue.yearOnly tag option for these tags. I'll put this on the (very long) to-do list. |
|||
29-08-2013, 10:23
Post: #3
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(29-08-2013 06:46)simoncn Wrote: From a quick look at the code, it seems that MinimServer would send an empty string in the XML tags <upnp:artist> and <dc:creator> in cases 1) and 2). This is consistent, but I think it would be better to completely omit these XML tags instead. Please find the XML in the attachment. Quote:Quote:On this occcasion I'd also like to encourage you to allow the indexValue.yearOnly tag option to be applied for all date related tags (DATE, ORIGINALDATE, RELEASEDATE) and to provide a corresponding displayValue.yearOnly tag option for these tags. Thanks! |
|||
29-08-2013, 22:15
Post: #4
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(29-08-2013 10:23)winxi Wrote: Please find the XML in the attachment. I've had an opportunity to spend a few minutes looking at this. case1.xml contains no <upnp:artist> XML tag for the Artist, but it does contain AlbumArtist information as follows: <upnp:artist role="AlbumArtist" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">Johnny Cash</upnp:artist> case2.xml also contains no <upnp:artist> XML tag for the Artist, but it does contain Composer information as follows: <upnp:artist role="Composer" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">Stan Jones</upnp:artist> Does the first track have an AlbumArtist tag, and does the second track have a Composer tag? If so, it would seem that the inconsistency you are seeing is caused by the control point's interpretation of correct XML data sent by MinimServer. |
|||
31-08-2013, 11:04
Post: #5
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(29-08-2013 22:15)simoncn Wrote: I've had an opportunity to spend a few minutes looking at this. Both the tracks have AlbumArtist tags which are identical to the corresponding Artist tags. The first track has no Composer tag, the second track has a composer tag. |
|||
01-09-2013, 21:12
(This post was last modified: 01-09-2013 21:12 by simoncn.)
Post: #6
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(31-08-2013 11:04)winxi Wrote: Both the tracks have AlbumArtist tags which are identical to the corresponding Artist tags. The first track has no Composer tag, the second track has a composer tag. I don't understand why the AlbumArtist tag for the second track isn't included in the XML metadata sent to the control point. Please upload this track to my FTP server so that I can investigate this further. Please also post the values of the following properties: aliasTags indexTags itemTags tagOptions tagCustom tagFormat |
|||
01-09-2013, 21:56
Post: #7
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(01-09-2013 21:12)simoncn Wrote:(31-08-2013 11:04)winxi Wrote: Both the tracks have AlbumArtist tags which are identical to the corresponding Artist tags. The first track has no Composer tag, the second track has a composer tag. I've uploaded this track to your ftp along with my MinimServer configuration file. MinimServer not including the AlbumArtist tag into the XML seems to be related to the multi-value AlbumArtist tag. I've save the tags using MP3tag. |
|||
01-09-2013, 22:27
Post: #8
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(01-09-2013 21:56)winxi Wrote: I've uploaded this track to your ftp along with my MinimServer configuration file. MinimServer not including the AlbumArtist tag into the XML seems to be related to the multi-value AlbumArtist tag. I've save the tags using MP3tag. MinimServer doesn't support multi-valued AlbumArtist tags. If you use these, you will get warning messages saying that these tags have been ignored. |
|||
09-09-2013, 21:04
Post: #9
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(29-08-2013 00:25)winxi Wrote: I think that there is an inconsistency between the cases 1) and 2). It should be either 'Unknown Artist' in both these cases or the content of the single ARTIST tag in case 1) and combined ARTIST tags using the default rule in case 2 (ArtistA, ArtistB, ...). Personally, I would prefer the latter option because otherwise I'd have to apply the custom DISPLAYARTIST tag to all my files, even to those with just a single ARTIST tag. I'm thinking of making a small enhancement to format strings that would help with this. The or sign '|' could be used as a binary operator that selects the second operand if and only if the first operand is absent. For example, Artist.displayValue={$displayartist|$artist} would use the DisplayArtist value(s) if there are any, and would use the Artist value(s) otherwise. |
|||
09-09-2013, 21:18
Post: #10
|
|||
|
|||
RE: Fallback procedure when displayFormat results in an empty string
(09-09-2013 21:04)simoncn Wrote: I'm thinking of making a small enhancement to format strings that would help with this. The or sign '|' could be used as a binary operator that selects the second operand if and only if the first operand is absent. For example, This sounds great and it would be a proper solution to this specific problem. I think that there might be also other use cases for the '|' operator. I've just another related question concerning the tag names. Are they case insensitive referring to the specifications and how is this handled in MinimServer? I see them sometimes spelled e.g. 'displayartist', 'DisplayArtist' or 'DISPLAYARTIST'. Will MinimServer treat all this strings equally? Thanks! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)