Skip to content

Conversation

@vaosilva
Copy link
Contributor

@vaosilva vaosilva commented Aug 4, 2023

Hello again,

I had some problems with karaoke versions of tracks showing up in my playlists, so I thought of applying this small refactoring. Moved the exclusion rules to the yaml config file and introduced a ConfigHolder class for easier access of configs.

Like in my previous pull request, if you have any comment regarding improvements or whatnot please be free to reach back, I will try to comply promptly.

@timrae timrae closed this May 7, 2024
@timrae timrae reopened this May 7, 2024
return [(item['spotify_id'], item['tidal_id']) for item in config['sync_playlists']]
return [(item['spotify_id'], item['tidal_id']) for item in ConfigHolder.get_config()['sync_playlists']]

class ConfigHolder:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think a class that is never instantiated like this is a bit weird and not very pythonic. Probably better to use a config module with an importable config variable like this:

https://codereview.stackexchange.com/a/269570

Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably better to sync with @joshrmcdaniel and wait for his changes to merge before doing this however:
#29 (review)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants