Code Monkey home page Code Monkey logo

minim's People

Contributors

bbye98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

acmosa emilot

minim's Issues

NameError: name 'Session' is not defined

Hello bbye98
Thanks for Your great job.
Which API are you using?
I've just contacted the qobuz team today for another issue and they told me there is no open API for security reasons.
That said. I am trying your module.
It does not load, with the following traceback:

File "", line 1, in
File "/archivi/Downloads/minim/src/minim/qobuz.py", line 1635, in
class Album:
File "/archivi/Downloads/minim/src/minim/qobuz.py", line 1776, in Album
session: Session = None, **kwargs):
^^^^^^^
NameError: name 'Session' is not defined

Having a quick look, I can't find any

class Session

defined in qobuz.py.

Regards, and thank You

Qobuz: "album-of-the-week" is not supported

There is the following error if you use it:

{'status': 'error', 'code': 400, 'message': 'Invalid argument: type (accepted values are 
most-streamed, best-sellers, new-releases, press-awards, editor-picks, most-featured, 
harmonia-mundi, universal-classic, universal-jazz, universal-jeunesse, universal-chanson, 
new-releases-full, recent-releases, ideal-discography, qobuzissims)'}

Future Plans, Collaboration, and Integration Questions

Dear Benjamin,

I'm planning to develop a comprehensive music app.
I am happy to have discovered your library and am intending to incorporate it in my project.

The app would integrate several online sources and local files and it would include a local database of all account data (playlists, favourites, etc) and have several unique features.

I have some questions about minim so I can plan my development better.

  1. Is there a plan to integrate YouTube as well? And if not, would you help me extend your library with that capability?
  2. What's the general plan with minim? Will it be maintained actively indefinitely? What are your plans with it?
  3. Would you like to have a say in the design of my app? Since minim will be the backbone of it, I figure it'd make sense to include you, if that'd be of your interest, of course.

Thank you and kind regards,
Klemen

Some questions

Hi,

Thanks a lot for this library!
Here are some questions and proposals.

  • The library doesn't work with Python 3.7.4 which I'm currently using. I think if you remove type declarations from functions' input and output parameters it will work with any Python version. This is what I did to make it working.
  • When you create a Qobuz session without user credentials you get some app_id and app_secret from the downloaded JavaScript. The process takes some time because the script is pretty large - several MBs. To avoid that delay I'm thinking to hard code the current values and wondering for how long they will be valid/working?
  • How can I search Qobuz service by Album name? How can I find info about Artists? Which 'type' should be specified in this case?
  • IMHO the Qobuz search function should be smart enough to know which result to return. If you search for tracks it should return tracks, if you search for albums it should return albums etc. Or maybe create alternative search functions like smart_search to avoid processing/filtering search results.

Best regards

Minim 1.0.0 release

There are a few ambitious overhauls I'd like to do before the 1.0.0 release of Minim:

General

  • Update documentation to have consistency between the different submodules, with the Spotify one being used as a baseline.
  • Shorten repository README by moving most of the usage and installation instructions to the documentation and adding simple examples of the existing APIs.
  • Enable continuous integration via GitHub Actions.
  • Add user guides to showcase how Minim can be used: editing audio metadata, getting recommendations, and transferring music libraries.
  • Add the Gestalt or Ratcliff–Obershelp ratio from difflib.

Audio

  • Rewrite the from_<service> methods for the updated Spotify, TIDAL, and Qobuz APIs.

Discogs

  • Finish implementation.

iTunes

  • Wrap endpoints in the minim.itunes.SearchAPI class.
  • Add response status code checking.
  • Add sample responses from endpoints.

Qobuz

  • Add sample responses from endpoints.
  • Implement client credential storage.
  • Gracefully deprecate/remove Qobuz objects. (Ultimately, this doesn't fall in line with what I envision Minim to be--a simple interface to interact with music service APIs.)
  • Write unit tests for endpoints that do not require authentication.

Spotify

  • Refactor Spotify Web API OAuth 2.0 authorization flows.
  • Add Playwright authentication route for minim.spotify.PrivateLyricsService.
  • Implement client credential storage.
  • Fix/enhance logic for storing/updating Spotify client credentials.
  • Write unit tests for endpoints that do not require authentication.

TIDAL

  • Add support for the new open TIDAL API.
  • Add sample responses from endpoints for the new open TIDAL API.
  • Implement client credential storage for the new open TIDAL API.
  • Refactor the existing private TIDAL API.
  • Add sample responses from endpoints for the existing private TIDAL API.
  • Implement client credential storage for the existing private TIDAL API.
  • Figure out which clients can use which authorization flows.
  • Figure out which endpoints are enabled by the three possible authorization scopes.
  • Write unit tests for endpoints that do not require authentication.

Planned for future release(s)

  • Add support for more APIs, like the Amazon Music, Beatport, Deezer, Discogs, Last.fm, MusicBrainz, SoundCloud, and YouTube Music APIs.
  • Maybe add asynchronous I/O for certain endpoints using asyncio?

Spotify Access token expired

i'm trying to use Minim on a headless server, running a cron job for updating my dynamic Spotify playlists to Qobuz.
The authentication for Qobuz is working, but i'm experiencing issues with the Spotify Auth.

how can i use the refresh token to generate a new access token when the old one expires?

code i have so far, which allows me to update spotify to qobuz (but where the access token expires after 1 hour )

SPOTIFY_CLIENT_ID = "<spotify_clientid>"
SPOTIFY_CLIENT_SECRET = "<spotify_client_secret>"
SPOTIFY_ACCESS_TOKEN = "<spotify_access_token>"
SPOTIFY_REFRESH_TOKEN = "<spotify_refresh_token>"
SPOTIFY_REDIRECT_URL = "http://localhost:8888/callback"

scopes = spotify.WebAPI.get_scopes("all")
client_spotify = spotify.WebAPI(client_id=SPOTIFY_CLIENT_ID, client_secret=SPOTIFY_CLIENT_SECRET, flow="pkce",
                                scopes=scopes, web_framework="http.server")

using the access_token and refresh token in unfortunately does not work

client_spotify = spotify.WebAPI(client_id=SPOTIFY_CLIENT_ID, client_secret=SPOTIFY_CLIENT_SECRET, flow="pkce",
                                scopes=scopes, web_framework="http.server", access_token=SPOTIFY_ACCESS_TOKEN, 
                                refresh_token=SPOTIFY_REFRESH_TOKEN, redirect_uri=SPOTIFY_REDIRECT_URL)

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.