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

lyrics: Add TIDAL backend #4641

Closed
wants to merge 5 commits into from
Closed

Conversation

jcjordyn130
Copy link
Contributor

@jcjordyn130 jcjordyn130 commented Jan 20, 2023

Description

This adds a TIDAL backend to the lyrics plugin. It requires a paid TIDAL account as the free account returns 404 upon lyrics query. This feature adds a new (optional) dependency on tidalapi though. The lyrics tests completed successfully both in my personal usage and when running the test_lyrics.py file. The reasoning behind this new feature is that TIDAL lyrics have time codes (important for my usage, lyrics in the Navidrome web player require them).

To Do

  • Documentation. (If you've add a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • Changelog. (Add an entry to docs/changelog.rst near the top of the document.)
  • Tests. (Encouraged but not strictly required.)

@jcjordyn130 jcjordyn130 marked this pull request as draft January 23, 2023 01:00
@jcjordyn130 jcjordyn130 marked this pull request as ready for review January 23, 2023 01:17
@sampsyo sampsyo added needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." review-needed and removed needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." labels May 21, 2023

while True:
try:
lyrics = top_hit.lyrics()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this indentation correct?

break
except requests.exceptions.HTTPError as e:
if e.response.status_code == 404:
return None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be a debug log here

@arsaboo
Copy link
Contributor

arsaboo commented May 25, 2023

I don't have a paid Tidal account to test this, but the code looks fine to me (some minor comments).

I just checked and the free version works for albums/tracks search. It may be a good idea to also create an auto-tag plugin for Tidal (which can work with a free account). Lyrics can then be easily added.

super().__init__(config, log)
self._log = log

sessionfile = self.config["tidal_session_file"].get(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The session file doesn't have to be user-configurable. We can just save something like tidal.json in the config folder.


self.session = self.load_session(sessionfile)

self.attempts = self.config["tidal_attempts"].get(int)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add default values so that these fields can be made optional in the config.

@arsaboo
Copy link
Contributor

arsaboo commented May 25, 2023

To future-proof this, we should have a separate tidal config. In the lyrics config, users can then enable tidal by adding it as an additional source.

@stale
Copy link

stale bot commented Oct 15, 2023

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 15, 2023
@jcjordyn130
Copy link
Contributor Author

I don't have a paid Tidal account to test this, but the code looks fine to me (some minor comments).

I just checked and the free version works for albums/tracks search. It may be a good idea to also create an auto-tag plugin for Tidal (which can work with a free account). Lyrics can then be easily added.

So what you're saying is, instead of writing a Lyrics backend, write a metadata source instead?

Would that handle its own lyrics as an import stage hook or would it require modification to the Lyrics plugin to integrate into the new metadata source?

@jcjordyn130 jcjordyn130 mentioned this pull request Feb 18, 2025
3 tasks
@jcjordyn130
Copy link
Contributor Author

This PR is based off of a 3 year old commit and requires a lot of work to rebase, additionally, it has also been superseded by #5637.

Closing.

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

Successfully merging this pull request may close these issues.

3 participants