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

Unexpected response from /rest/getIndexes endpoint #184

Closed
pluggemi opened this issue Nov 9, 2021 · 2 comments
Closed

Unexpected response from /rest/getIndexes endpoint #184

pluggemi opened this issue Nov 9, 2021 · 2 comments
Milestone

Comments

@pluggemi
Copy link

pluggemi commented Nov 9, 2021

First of all, really like this software - especially since it is the only Subsonic compatible server software that I have found that correctly parses multi-value attributes for the Artist tag - so thanks for that!

While investigating some weird behavior on a client app - specifically iSub on IOS - I noticed that the result of the /rest/getIndexes endpoint was not what I was expecting. Put simply, all of the returned artists were showed <index name="?"> instead of being broken up into separate letters.

I confirmed this by doing a curl command to the server - specifically this command:

curl 'http://localhost:5082/rest/getIndexes?c=iSub&v=1.16.0&u=<MASKED>&p=<MASKED>' > sample.xml

The result is this - sample.xml

<?xml version="1.0" encoding="utf-8"?>
<subsonic-response status="ok" version="1.16.0">
  <indexes ignoredArticles="" lastModified="946684800000">
    <index name="?">
      <artist id="ar-1" name="A Winged Victory for the Sullen"/>
      <artist id="ar-2" name="Adam Bryanbaum Wiltzie"/>
      <artist id="ar-5" name="DJ Pone"/>
      <artist id="ar-4" name="dOP"/>
      <artist id="ar-12" name="Elam"/>
      <artist id="ar-11" name="Hilyard"/>
      <artist id="ar-6" name="Jaw"/>
      <artist id="ar-10" name="Jon McCafferty"/>
      <artist id="ar-13" name="Northumbria"/>
      <artist id="ar-3" name="Petite Noir"/>
      <artist id="ar-9" name="Stars of the Lid"/>
      <artist id="ar-7" name="The Shoes"/>
      <artist id="ar-8" name="Thomas Azier"/>
    </index>
  </indexes>
</subsonic-response>

Expected result
This is the result that I expected - expected.xml

<?xml version="1.0" encoding="utf-8"?>
<subsonic-response status="ok" version="1.16.0">
  <indexes ignoredArticles="" lastModified="946684800000">
    <index name="A">
      <artist id="ar-1" name="A Winged Victory for the Sullen"/>
      <artist id="ar-2" name="Adam Bryanbaum Wiltzie"/>
    </index>
    <index name="D">
      <artist id="ar-5" name="DJ Pone"/>
      <artist id="ar-4" name="dOP"/>
    </index>
    <index name="E">
      <artist id="ar-12" name="Elam"/>
    </index>
    <index name="H">
      <artist id="ar-11" name="Hilyard"/>
    </index>
    <index name="J">
      <artist id="ar-6" name="Jaw"/>
      <artist id="ar-10" name="Jon McCafferty"/>
    </index>
    <index name="N">
      <artist id="ar-13" name="Northumbria"/>
    </index>
    <index name="P">
      <artist id="ar-3" name="Petite Noir"/>
    </index>
    <index name="S">
      <artist id="ar-9" name="Stars of the Lid"/>
      <artist id="ar-7" name="The Shoes"/>
    </index>
    <index name="T">
      <artist id="ar-8" name="Thomas Azier"/>
    </index>
  </indexes>
</subsonic-response>

Is the expected result a correct assumption?

I am using the epoupon/lms Docker container of version 3.27.0 for amd64, digest 5ab9b8f92072.

Thoughts? Thanks!

@pluggemi pluggemi changed the title Unexected response from /rest/getIndexes endpoint Unexpected response from /rest/getIndexes endpoint Nov 9, 2021
@epoupon
Copy link
Owner

epoupon commented Nov 9, 2021

Hello!

Yes indeed it is currently implemented this way.
I have a question: what should we do with non-latin artist names?

@epoupon epoupon added this to the v3.28.0 milestone Nov 9, 2021
@pluggemi
Copy link
Author

pluggemi commented Nov 9, 2021

Excellent question and I am not sure what the correct answer is. Sorting (and by extension creating an Index) for non-Latin characters is a widespread challenge.

However, what I have seen other programs do is rely on the ARTISTSORT/ALBUMARTISTSORT tag for this. Musicbrainz requires Latin script for the sort name for this reason.

Other non-default tag combos include COMPOSER/COMPOSERSORT and CONDUCTOR/CONDUCTORSORT and a few other *SORT options listed here:
https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html

So for example:

  • 鼓童 would be listed in the <index name="K"> because transliteration for that group name from Japansese is Kodō, which has a sort name of "Kodō"
  • გია ყანჩელი would be listed in the <index name="K"> because the transliteration for that person name from Georgian is Giya Kancheli, which has a sort name of "Kancheli, Giya"

That would also address names that are in RTL scripts such as Arabic:

  • The singer محمد عبد الوهاب would be listed in the <index name="W"> because it transliterates to Mohamed Abdel Wahab, which ‎has a sort name of "Wahab, Mohammed Abdel"

So I guess the logic would be if there is an ARTISTSORT, use that for the the index, otherwise put it in the <index name="?">?

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants