Skip to content

Commit

Permalink
Use @staticmethod decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
amogus07 committed Oct 10, 2024
1 parent f0be503 commit 42954de
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions beetsplug/vocadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,12 @@ def get_album_track_infos(self, tracks, discs, ignored_discs, search_lang):
track.language = language
return track_infos, script, language

def get_song_fields(self):
@staticmethod
def get_song_fields():
return "Artists,Tags,Bpm,Lyrics"

def get_artists(self, artists, album=False, comp=False):
@staticmethod
def get_artists(artists, album=False, comp=False):
out = {
"producers": {},
"circles": {},
Expand Down Expand Up @@ -558,7 +560,8 @@ def get_artists(self, artists, album=False, comp=False):
artistString += " feat. " + ", ".join(featuring)
return out, artistString

def get_genres(self, info):
@staticmethod
def get_genres(info):
genres = []
for tag in sorted(info.get("tags", {}), reverse=True, key=lambda x: x["count"]):
if tag["tag"]["categoryName"] == "Genres":
Expand Down Expand Up @@ -603,7 +606,8 @@ def get_lyrics(self, lyrics, language):
out_lyrics = self.get_fallback_lyrics(lyrics, language)
return out_script, out_language, out_lyrics

def get_fallback_lyrics(self, lyrics, language):
@staticmethod
def get_fallback_lyrics(lyrics, language):
if language == "English":
for x in lyrics:
if "en" in x["cultureCodes"]:
Expand Down

0 comments on commit 42954de

Please sign in to comment.