Added Lyrics w. Timestamps
Added get_lyrics_with_timestamps to get lyrics with timestamps. The Method doesn't try to parse the response as normal lyrics, if no lyrics with timestamps are returned. (could be changed to do so tho, the format is the same)
Codecov Report
Attention: Patch coverage is 97.59036% with 2 lines in your changes missing coverage. Please review.
Project coverage is 95.01%. Comparing base (
db732f2) to head (2e1e89f).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ytmusicapi/mixins/browsing.py | 92.59% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #662 +/- ##
==========================================
+ Coverage 94.88% 95.01% +0.12%
==========================================
Files 38 40 +2
Lines 2289 2348 +59
==========================================
+ Hits 2172 2231 +59
Misses 117 117
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 95.01% <97.59%> (+0.12%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Yea, calling the API "as a different frontend" gives you different results. I temporarily changed the client because I thought unforeseen side-effects aren't desirable.As per the implementation of a multipurpose get_lyrics(), I would add an argument like timestamps=True/False, to keep it backwards compatible and allow the user to always get the same (old) format – with my approach, you'll end up with 2 possible formats.Furthermore, would you keep the original format with the nested CueRange or would you rather have a flat dict? I think that nesting is kinda useless.
finally used pre-commit to fix those formatting complaints 🤷♂️
Hi @heinrich26 , I am moving this over to #693 as merging is somehow blocked here