Jump to content

Improved search function with multiple ARTIST fields


T4g

Recommended Posts

Hey all, got a feature request! Currently in Poweramp if you do a search for an artist and click the artist name, all the songs tagged solely with that artist will show up. However if you have songs with multiple artist tagged, those will NOT show up, even though the artist has been in tagged in those songs.

Example; tag one song with "Lauryn Hill" in the ARTIST field and another song with "Fugees; Lauryn Hill" in the ARTIST field. Do a search for Lauryn Hill in Poweramp, it will show the artists "Lauryn Hill" and "Fugees; Lauryn Hill". So far so good. However if you click Lauryn Hill it ONLY shows the song tagged solely with Lauryn Hill, whereas I would like a feature where it also shows the song tagged Fugees; Lauryn Hill - ie it should show every single song tagged with Lauryn Hill in the ARTIST field.

Hope I'm making sense.

That's not happening for me. In the search results, the 'Artists' group only shows the actual searched artist's name (properly split) not any source multi-artist tag contents. The only place you see the full collaborative artist details per song in the Songs list (which you would expect). Drilling down into the Artist name shows all the matches for that artist, including collaborations.

image.png

Andre

Andre

That looks like what I would expect to see if Artist Splitting was not enabled. What version of PA are you using, as the split feature has been available from around 899?

To check or enable it (as it's turned off by default) you need to see what is defined for the separator symbols in PA Settings > Library > Scanner > 'Symbols to Split Multiple Artists'. In your case, you seem be be using semicolon, but you can tap that setting to add however many you want. I have quite a few, to cover a variety of files:

image.png

You have one song there which uses a comma as a separator. You can of course include this, but there could easily be real band names containing commas - e.g. "Earth, Wind & Fire", "Emerson, Lake & Palmer", and any artists listed as "surname, firstname" - which you would not want split, so it might better to edit those tags rather than including comma as a separator. Spaces are ignored by the way, and the split feature works equally well with FLAC (Vorbis tagging) and MP3 (ID3 tagging) files.

Andre

I'm running build 905 (latest update). I've just tried enabled artist splitting, added ";" symbol, done a rescan and it doesn't make a difference.

To be clear, I'm happy with how the search shows the results (except for incorrect mp3 demarcation), I just wanted the search function to show all songs containing the artist when I click the artist name, including songs with multiple ARTIST fields, not only songs solely tagged with that artist.

It should work the way you want. In my previous example of searching for Olivia Newton-John, when I then click on the artist name shown in those Search results, I see all of the songs attributed to her, whether solo or collaborations:

image.png

So yes, there could be a tagging issue. This is how the first of the above songs (MP3) is tagged:

image.png

Andre

Aha, you were right, I figured out the problem! After enabling artist split, you need to do a "Full Rescan", not just a standard Rescan - then it shows up like in your player. It had nothing to do with tagging (I tried adding a space before and after ; in a file and it doesn't make a difference)

However, now I've got the opposite issue, I actually liked having both the groups and artists showing up in search 😄. E.g. in your example, you've only got "Olivia Newton-John" showing up in Artist when you search for olivia, but it's convenient to also have "Olivia Newton-John; John Travolta" showing up, because then you can quickly select all the songs with both Olivia and Travolta as artists, and exclude songs with only Olivia as the artist.

So I guess that's my new feature request: In the search results, please show every multiple ARTIST field of songs containing the artist you searched for.

Oh and thanks so much for taking the time Andre!

36 minutes ago, andrewilley said:

Yes, you need to do a FULL Rescan after changing anything in the splitting modes. 

You can see the collaboration artist details in the Songs lists. So just search for two terms, e.g. "Olivia Travolta".

image.png

Andre

This is weird, for some reason my mp3 files are not showing multiple artists correctly like yours. They're demarcated with a space, instead of a semicolon. Flac files are fine.

2 hours ago, T4g said:

This is weird, for some reason my mp3 files are not showing multiple artists correctly like yours. They're demarcated with a space, instead of a semicolon. Flac files are fine.

That is usually down to encoding/compatibility issues in the ID3 tags. Unlike Vorbis (FLAC files), the ID3 spec only supports one instance of each tag type, so the convention is to split items using a text separator symbol (like a semicolon). However it's also possible for tag editors to save the tag using a null character separator, which might be causing the effect your are seeing. What does Info/Tags show for one of those songs, is each individual artist shown as a separate underlined name? And do the names show up correctly as individual entries in the Artists listing?

Andre

49 minutes ago, andrewilley said:

That is usually down to encoding/compatibility issues in the ID3 tags. Unlike Vorbis (FLAC files), the ID3 spec only supports one instance of each tag type, so the convention is to split items using a text separator symbol (like a semicolon). However it's also possible for tag editors to save the tag using a null character separator, which might be causing the effect your are seeing. What does Info/Tags show for one of those songs, is each individual artist shown as a separate underlined name? And do the names show up correctly as individual entries in the Artists listing?

Andre

No, the artist names are just listed one after another separated with spaces, with one continuous underline. They don't show up as individual entries in Artists.

6 minutes ago, T4g said:

No, the artist names are just listed one after another separated with spaces, with one continuous underline. They don't show up as individual entries in Artists.

Could you upload a sample file via some file sharing site for checking? Thanks.

Andre

As I suspected, that file uses a null separator within the TPE1 (Track Artist) tag, instead of an actual text character such as semicolon. It actually uses a null followed by a BOM (byte order mark, used for two-byte Unicode ordering). Different tag editors interpret the null bytes in different ways for displaying - TagScanner shows a semicolon, MP3Tag shows "\\", Exiftool (below) shows "/".

  | Artist = 2Pac/Big Daddy Kane
  | - Tag 'TPE1' (45 bytes):
  |     0079: 01 ff fe 32 00 50 00 61 00 63 00 00 00 ff fe 42 [...2.P.a.c.....B]
  |     0089: 00 69 00 67 00 20 00 44 00 61 00 64 00 64 00 79 [.i.g. .D.a.d.d.y]
  |     0099: 00 20 00 4b 00 61 00 6e 00 65 00 00 00          [. .K.a.n.e...]

I loaded the file into TagScanner and re-saved it with no changes, and it adjusted the tag content for that line to use a regular semicolon character:

  | Artist = 2Pac; Big Daddy Kane
  | - Tag 'TPE1' (43 bytes):
  |     0077: 01 ff fe 32 00 50 00 61 00 63 00 3b 00 20 00 42 [...2.P.a.c.;. .B]
  |     0087: 00 69 00 67 00 20 00 44 00 61 00 64 00 64 00 79 [.i.g. .D.a.d.d.y]
  |     0097: 00 20 00 4b 00 61 00 6e 00 65 00                [. .K.a.n.e.]

The use of null separators in text fields is defined in the ID3v2.4 spec, but the file header data indicates it is ID3v2.3 so technically they should not be there. I think this is common usage in the wild though, so maybe @maxmp could modify the scanner code to accept ID3 null byte separators?

By the way, while I was looking at the file I also noticed the use of TXXX "(Band)<null> 2pac" to provide the band name, however there is no TPE2 (Album Artist) tag present. Album Artist would be a lot more useful for grouping your songs in cases where they have varying Track Artist names.

Andre

On 5/6/2021 at 11:24 AM, andrewilley said:

The use of null separators in text fields is defined in the ID3v2.4 spec, but the file header data indicates it is ID3v2.3 so technically they should not be there. I think this is common usage in the wild though, so maybe @maxmp could modify the scanner code to accept ID3 null byte separators?

So how can I fix this? I use Foobar and mp3tag to tag my files, does anybody know how to tag "correctly" using these tools to avoid the null byte? I guess I could load all the files into Tagscanner, but that's an annoying step.

 

On 5/6/2021 at 11:24 AM, andrewilley said:

By the way, while I was looking at the file I also noticed the use of TXXX "(Band)<null> 2pac" to provide the band name, however there is no TPE2 (Album Artist) tag present. Album Artist would be a lot more useful for grouping your songs in cases where they have varying Track Artist names.

Not sure I understand this, in Mp3tag there is already an ALBUMARTIST field present (see attached)?

Capture.PNG

The file you sent me did not have an Album Artist tag, it had a 'Band' tag (which in the world of ID3-tagged files will be stored under the open-format tag 'TXXX').

image.png

  | UserDefinedText = (Band) 2Pac
  | - Tag 'TXXX' (25 bytes)

For PA to recognise it as Album Artist, it needs to be named as such (so it gets saved in the ID3 tag called 'TPE2').

As for Artists, as you can see even though this is an MP3 file with ID3v2.3 tags, it contains two ARTIST tags. This is normal for FLAC/Vorbis files, but less common with MP3s. I think the ability to store two items of data in a single TPE1 tag (it gets split using a null character embedded in the file) was only added to the spec in v2.4, whereas previously people just used "/" or ";". It seems that PA is not recognising this as containing two separate names - @maxmp can you confirm this, and perhaps update the scanner to allow for this possibility?

Andre

Thanks. Would you recommend I update all my mp3s to ID3v2.4? In the settings there is an option to write ID3v2.4. I think the reason I didn't select it was I read somewhere that some players had trouble interpreting ID3v2.4 correctly, so ID3v2.3 had best compatibility. But tbh I only use foobar and Poweramp and I think both of them are fine with ID3v2.4, except for PA and the multiple ARTIST fields.

Capture.PNG

It might be an idea to wait for @maxmp to comment, as this could be a bug in PA not recognising null-byte separators in ID3 text tags. I would have thought if it works, it ought to work if nulls are found in files that are technically only flagged as v2.3.

TagScanner does not write that format back to ID3 files anyway by the way, so you could simply scan them into TagScanner and batch re-save them all. It will write a normal TPE1 'text only' format, with a semicolon separating the artist names.  

You could try one as a test I guess.

Andre

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...