tamland / python-tidal

Python API for TIDAL music streaming service
GNU Lesser General Public License v3.0
402 stars 109 forks source link

Help recognizing category entry "Because you listened to ..." #195

Closed GioF71 closed 11 months ago

GioF71 commented 1 year ago

Hello, I am using your excellent library. Thank you for the great work. I am having trouble understanding how can I recognized a category entry which, in Tidal Apps or in their web page, will translate into a suggestion of albums under a title "Because you listened to [some album title]". The entry in the categories only has the album title as its own field "title", but I cannot figure out the criteria I should apply in order to recognized this entry properly. Can you please suggest or point me to some existing resource, if available? Thank you

tehkillerbee commented 1 year ago

I am not quite sure what you mean. "Because you listened to X" playlists/mixes are generated in Tidal's end, based on what you have been listening to.

They are accessible on the Page "For You" that was recently added to tidalapi. So you would use this page to access them. https://tidalapi.netlify.app/pages.html#pages

"For You" is not strictly mentioned, as it appears I did not add it to the docs.

GioF71 commented 1 year ago

Hello, the entries I am referring to are directly presenting in the "Home" section of the Tidal web app, and appear also directly as a Category in the tidal api. They are not in the "For you" category. I have attached two screenshot, maybe those can help clarifying what I am meaning. Please let me know what you think, if I am doing something wrong of course. Thank you.

home-because-you-listened-to home-because-you-listened-to-debug

tehkillerbee commented 12 months ago

Sorry, I was wrong. These are found in the "home" page as you correctly point out. However, it does not seem to be possible to determine WHY an Album/mix/playlist was added. Eg. it does not seem to be possible to determine if it was added "Because you listened to XX" or "Because you added XX"

I have iterated over the home page by doing as follows, and the specific albums are found here:

        home = self._active_session.home()
        for item in home:
            if isinstance(item, tidalapi.Album):
                print("album: {}, artist: {}".format(item.name, item.artist.name))
            elif isinstance(item, tidalapi.Mix):
                print("mix: {}".format(item.title))
            elif isinstance(item, tidalapi.Playlist):
                print("playlist: {}".format(item.name))
                print(item.description)
            elif isinstance(item, tidalapi.Artist):
                print("artist: {}".format(item.name))
            elif isinstance(item, tidalapi.Track):
                print("track: {}".format(item.name))
            else:
                continue
GioF71 commented 12 months ago

I'll try your snippet of code... anyway if no solution appears, I guess I might leave things as they are: a user might expect that if he/she finds something with an album name under the "categories" or "home" (I called it categories) it will probably present some albums/playlists that are related to that album.

Thank you again

tehkillerbee commented 11 months ago

Closing this due to inactivity. Feel free to reopen if you still have issues

GioF71 commented 11 months ago

Hello, it's ok. I have named the entry "Other" in categories. Thank you for your support!

tehkillerbee commented 11 months ago

@GioF71 No problem! I think some of your questions are also very relevant to my other plugin mopidy-tidal, where I am working on adding similar functionality.

GioF71 commented 11 months ago

Yes thank you, I tried your plugin, it is amazing. I wonder if I can build a similar plugin for qobuz, starting from the existing qobuz plugin in upmpdcli.

Btw, I cannot stream in hires (non-mqa flac) however, did I miss something? Do I need some 'special' tokens in order to do that?