Skip to content

Import additional fields from Deezer and add function to update rank - #4842

Merged
sampsyo merged 14 commits into
beetbox:masterfrom
arsaboo:deezer
Jul 14, 2023
Merged

Import additional fields from Deezer and add function to update rank#4842
sampsyo merged 14 commits into
beetbox:masterfrom
arsaboo:deezer

Conversation

@arsaboo

@arsaboo arsaboo commented Jul 9, 2023

Copy link
Copy Markdown
Contributor

Description

Fixes #4841
Imports few other fields provided by Deezer.

In addition, I added a function deezerupdate that updates the rank information without going through the import process. The rank information is updated daily and users may want to refresh the rank information periodically.

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.)

@arsaboo arsaboo changed the title Added additional fields to be imported from Deezer Import additional fields from Deezer and add function to update rank Jul 9, 2023

@sampsyo sampsyo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks pretty good overall! I just had a couple of minor questions based on a review.

Comment thread beetsplug/deezer.py
Comment on lines +79 to +82
if 'error' in album_data:
self._log.debug(f"Error fetching album {album_id}: "
f"{album_data['error']['message']}")
return None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cool; this seems like an important addition! Maybe it deserves its own changelog bullet point?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this is required, but added it anyways :)

Comment thread beetsplug/deezer.py
medium_index=track_data.get('track_position'),
data_source=self.data_source,
data_url=track_data['link'],
deezer_updated=time.time(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't 100% see yet the need for this field… we only seem to be writing to it, never reading from it. Is it useful for some future functionality?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is useful to only update based on time elapsed. For example, update the tracks that have not been updated in the last 2 months. In the absence of this information, we will have to update all the tracks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Got it; that makes sense!

Comment thread docs/changelog.rst Outdated

@sampsyo sampsyo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All looks good; thanks!!

@sampsyo
sampsyo merged commit b19b961 into beetbox:master Jul 14, 2023
@arsaboo
arsaboo deleted the deezer branch July 15, 2023 12:19
@snejus snejus added the deezer deezer plugin label Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deezer deezer plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import rank from Deezer

3 participants