Code Monkey home page Code Monkey logo

Comments (5)

bbye98 avatar bbye98 commented on June 10, 2024 1
  1. I hadn't considered the unauthenticated case, as I have set up my environment to always automatically log me in. Perhaps I'll add keyword arguments to accept the app ID and secret to the qobuz.Session constructor.
  2. Yep, there are no results when I search for "ABBA" with "MainArtist". This matches what I get when I search for "ABBA" directly on play.qobuz.com (since it's the same API call). Looks like I was incorrect earlier in my assumptions on how the search endpoint works. From what I can gather, if you want to search for an artist, you cannot specify any of the "types". Specifying #ByMainArtist only returns releases and tracks by artists that contain the search query. I'll probably update the documentation to be more clear about how the type parameter works, but there isn't anything to change to the implementation as it is working as intended.
  3. The design goal of Minim is to implement the APIs exactly as they are with no fluff. That's exactly what you get when you use qobuz.Session. If you don't want to deal with the unformatted responses from the Qobuz API, you should use the experimental qobuz.User instead, as all responses in that class are actually qobuz.Artist, qobuz.Track, etc. objects with well defined attributes. See the Using the Qobuz API guide for more information.

from minim.

bbye98 avatar bbye98 commented on June 10, 2024

Hello! Thanks for opening an issue.

  1. Python 3.7 has reached end-of-life on June 27, 2023. As such, I do not have any plans on adding support for it. I realize the pyproject.toml file incorrectly has requires-python = ">=3.7"; this will be updated to requires-python = ">=3.8" (Python 3.8 and above supports type hints) in a later update when I get some sort of continuous integration up and running.
  2. Currently, the Qobuz app ID and secret are "static" in that only one pair generated from bundle.js is valid. This is apparently by design, as the obfuscated functions in bundle.js used to extract the pair operate fundamentally the same as how I implemented it in Python. However, this behavior may change in the future, so the current dynamic implementation is likely best practice. Based on some quick testing, it looks like this extraction step takes around 3 seconds. If this is somehow a bottleneck for your uses, you should pass in the authentication token directly.
  3. "ReleaseName" should be used if you're querying for albums by name, and "MainArtist" if you're searching for artists.
  4. The search endpoint in the Qobuz API is inherently flawed and will always return all results that match a query, including albums, tracks, artists, etc. However, getting to the desired items is only one dict index away (i.e., results = session.search("taylor swift"); albums = results["albums"];), so there really isn't a need for a specialized function for each return type.

from minim.

project-owner avatar project-owner commented on June 10, 2024

Thank you for detailed answers!

  1. Unfortunately in many cases people cannot easily switch to a newer Python version. Anyway, you have a valid point.
  2. pass token? I thought you use app_id and app_secret for unauthenticated session. I think time varies depending on your Internet connection. In most cases it takes longer than 3 seconds for me.
  3. OK, I searched for 'ABBA' and specified 'artist' parameter which you convert into 'MainArtist' and the search result didn't have any entries in the 'artists' section. Though it has 'albums'. Is it what I'm supposed to do - derive artists from albums? I tried 'performer' and 'composer' with the same result.
  4. I'm not sure that users of your library should know the structure of the search result and how many indexes away is the result which they are looking for. Anyway, it's your choice.

from minim.

project-owner avatar project-owner commented on June 10, 2024

Regarding the question #3, it looks like if I don't specify any 'type' for the 'search' it returns the 'artists' section.

from minim.

project-owner avatar project-owner commented on June 10, 2024

As I mentioned, unfortunately I cannot use the library directly because I need to support Python 3.7.4 for some time. More likely I'll just use some parts of the library and convert json into my own object structure. I'll probably create some kind of common top level "interface" on top of all services (Qobuz, Tidal, Deezer, Spotify etc) and have implementation specific for each service behind that common interface/API.

from minim.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.