Skip to content

Commit 9f1ba11

Browse files
committed
feat(Track.get_metadata): add lyrics tag support
also adds prelimitary support for subtitles tag to add better support for subtitles tagging beetbox/mediafile#48 will need to be resolved finishes metadata function and resolves #22
1 parent 77243e8 commit 9f1ba11

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

tidal_async/api.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,6 @@ async def subtitles(self) -> Optional[str]:
228228
return lyrics_dict["subtitles"]
229229

230230
async def get_metadata(self):
231-
# TODO [#22]: Rewrite Track.get_metadata
232-
# - [ ] lyrics
233-
# - [x] rewrite title parsing
234-
# - [x] replayGain
235-
# - [x] multiple artists
236-
# - [x] Tidal track URL
237231
album = self.album
238232
await album.reload_info()
239233

@@ -271,6 +265,17 @@ async def get_metadata(self):
271265
if "upc" in album and album.upc:
272266
tags["barcode"] = album.upc
273267

268+
lyrics = await self.lyrics()
269+
if lyrics:
270+
tags["lyrics"] = lyrics
271+
272+
subtitles = await self.subtitles()
273+
if subtitles:
274+
# TODO: Support for subtitles tag
275+
# prelimitary invalid support for subtitles tag
276+
# depends on beetbox/mediafile#48
277+
tags["subtitles"] = subtitles
278+
274279
return tags
275280

276281

0 commit comments

Comments
 (0)