Apple TV Metadata Search Returns Nothing

Issue #690 resolved
Richard Lyon created an issue

Apple TV Metadata Search Returns Nothing (no results). Results were populating yesterday. Might be a reoccurrence of an older issue (resolved in 1.6.5). Currently running v1.7.3. All other metadata sources (TheMovieDB, iTunes Store) return results, just not Apple TV. The searching message flashes quickly at the bottom, but nothing else.

Subler 1.7.3

Mac OS X Monterey 12.3

Comments (18)

  1. den ako

    Confirming, issue Apple TV metadata observed on Monterey 12.3.1. ThemovieDB and iTunes Store databases work no issues

  2. Richard Lyon reporter

    After some debugging, looks like the URL for searching the metadata has changed for Apple TV:

    HTTP ERROR 404
    
    Problem accessing /uts/v2/search/incremental. Reason:
    
        Not Found
    

    I’m not familiar with the uts-api queries, only the normal searching https://itunes.apple.com/search?parameterkeyvalue

  3. Richard Lyon reporter

    You don’t have the full URL do you? It doesn’t look like a direct v2 for v3 swap.

  4. Nicolas Lenz

    It’s not a direct swap.

    Here’s a sample query for “Halo” on the MacOS TV app.

    https://uts-api.itunes.apple.com/uts/v3/search?caller=js&locale=en-US&pfm=desktop&searchTerm=halo&searchTermSource=KeyInput&sf=143441&utscf=OjAAAAEAAAAAAAIAEAAAAAwADQAQAA~~&utsk=6e3013c6d6fae3c2::::::1fa9ed6616985dcf&v=56

  5. Richard Lyon reporter

    That’s awesome.. With some minor tweaking the basics still work. Did any other /uts/v3 URLs show up? Also in need are examples of what was previously:

    /uts/v2/view/product/
    /uts/v2/view/show/
    /uts/v2/show
    

    On the surface, other than the URL base change, the argument q= becomes searchTerm=

  6. Nicolas Lenz

    Not sure what was previously produced, but…

    Click on Movie title:

    https://uts-api.itunes.apple.com/uts/v3/movies/umc.cmc.2ixfw4odj17ayvx58m46l8tx5?caller=js&locale=en-US&pfm=desktop&sf=143441&utscf=OjAAAAEAAAAAAAIAEAAAAAwADQAQAA~~&utsk=6e3013c6d6fae3c2::::::1fa9ed6616985dcf&v=56

    Click on TV Show:

    https://uts-api.itunes.apple.com/uts/v3/shows/umc.cmc.4zxul7kx9ab0xbl9l7e209k29?caller=js&locale=en-US&pfm=desktop&sf=143441&utscf=OjAAAAEAAAAAAAIAEAAAAAwADQAQAA~~&utsk=6e3013c6d6fae3c2::::::1fa9ed6616985dcf&v=56

    followed by

    https://uts-api.itunes.apple.com/uts/v3/shows/umc.cmc.4zxul7kx9ab0xbl9l7e209k29/episodes?caller=js&includeSeasonSummary=true&locale=en-US&pfm=desktop&sf=143441&utscf=OjAAAAEAAAAAAAIAEAAAAAwADQAQAA~~&utsk=6e3013c6d6fae3c2::::::1fa9ed6616985dcf&v=56

    Click through to S1E1:

    https://uts-api.itunes.apple.com/uts/v3/episodes/umc.cmc.1emb8oblebvxxc5deqew3h89m?caller=js&locale=en-US&pfm=desktop&sf=143441&showId=umc.cmc.4zxul7kx9ab0xbl9l7e209k29&utscf=OjAAAAEAAAAAAAIAEAAAAAwADQAQAA~~&utsk=6e3013c6d6fae3c2::::::1fa9ed6616985dcf&v=56

  7. Richard Lyon reporter

    Yes. /uts/v2/view/product is now /uts/v3/movies/

    Looks like many of the data elements have shifted slightly too. Various attributes will need to be reworked, and possibly a couple re-thought. I hope all this helps @Damiano Galassi , unless he wants some help and a MR/PR.

  8. Damiano Galassi repo owner

    A MR/PR would be would be appreciated. Some health issues prevent me from spending time on this.

  9. Richard Lyon reporter

    No worries. I got this one. Take care of yourself. I’ve finished the Movies part, just working through Shows, which is slightly more complicated. I should have something out in the next day or so.

  10. Richard Lyon reporter

    Basically done now. The only thing I can’t get working are 16x9 Season Poster Artwork. Series Poster artwork is fine. For a series, you will get the normal image (Series Poster), but for Season it’s not the correct scale size Season Artwork

    It would be nice to know how the image came back prior to the uts v2 to v3 change. Right now the imageURLs are coming from the episodes. Not sure where the correct image link came from before.

  11. Richard Lyon reporter

    Wow! Great call… Apparently the root of the issue isn’t that v2 is deprecated, it’s that the “v” parameter that we are passing is no longer accepted. Subler was using v=60. The artwork-finder website is using v=34

    With some trial and error it appears that this parameter affects the returned payloads in some way. Putting in v=20 returns:

    400:Api 2.0 routes only valid with v31 and above.
    

    I went through a whole bunch start from v=31 and up, and the closest to v=60 that produced similar results was v=5 I presume this parameter indicates a resultset version of some kind. 60 must have migrated to v3.

    As a result, I’ll hold on to the code v3 migration for a later date, and just submit a PR/MR for a single line code change. Hopefully @Damiano Galassi will see it when he’s able, create a build, so functionality can resume.

    pull request #31

  12. Log in to comment