Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Lyrics Support #1379

Merged
merged 6 commits into from Oct 19, 2021
Merged

Conversation

dheerajdlalwani
Copy link
Contributor

@dheerajdlalwani dheerajdlalwani commented Sep 29, 2021

Support for Lyrics - Subsonic API

  • Add function 'isSynced' that identifies if lyrics are synced or not and add tests for the same
  • Implement 'getLyrics' which returns lyrics if they exist
  • Remove timestamps from the the lyrics if they are synced, fix filters & clean up code
  • Add snapshot tests for the 'Lyrics' response & add some clean up
  • Add tests for 'GetLyrics' function

Closes #249

scanner/mapping.go Outdated Show resolved Hide resolved
scanner/mapping.go Outdated Show resolved Hide resolved
scanner/mapping_test.go Outdated Show resolved Hide resolved
scanner/mapping_test.go Outdated Show resolved Hide resolved
lyrics7 := "[]"
lyrics8 := ""
It("returns false if lyrics contain no timestamps", func() {
Expect(isSynced(lyrics5)).To(Equal(false))

Choose a reason for hiding this comment

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

Expect(isSynced("[02.50]")).To(Equal(false))

I don't see the point of rejecting timestamps that use . instead of :.
Is there an official format specification for subtitles?

scanner/mapping_test.go Outdated Show resolved Hide resolved
scanner/mapping_test.go Outdated Show resolved Hide resolved
scanner/mapping.go Outdated Show resolved Hide resolved
@dheerajdlalwani dheerajdlalwani force-pushed the GSoC_Lyrics_Support branch 3 times, most recently from b890d27 to a668f30 Compare October 13, 2021 20:07
server/subsonic/media_retrieval.go Outdated Show resolved Hide resolved
server/subsonic/media_retrieval.go Outdated Show resolved Hide resolved
server/subsonic/filter/filters.go Outdated Show resolved Hide resolved
server/subsonic/api.go Outdated Show resolved Hide resolved
server/subsonic/responses/responses.go Outdated Show resolved Hide resolved
scanner/mapping_test.go Outdated Show resolved Hide resolved
server/subsonic/responses/responses.go Show resolved Hide resolved
Copy link
Member

@deluan deluan left a comment

Choose a reason for hiding this comment

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

Just two small nitpick, but looks good otherwise. Thanks!

server/subsonic/media_retrieval.go Show resolved Hide resolved
server/subsonic/media_retrieval.go Show resolved Hide resolved
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
…rs & clean up code

Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
@dheerajdlalwani dheerajdlalwani marked this pull request as ready for review October 17, 2021 22:22
Copy link
Member

@deluan deluan left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of comments

server/subsonic/responses/responses_test.go Outdated Show resolved Hide resolved
server/subsonic/media_retrieval_test.go Outdated Show resolved Hide resolved
server/subsonic/media_retrieval_test.go Outdated Show resolved Hide resolved
server/subsonic/media_retrieval_test.go Outdated Show resolved Hide resolved
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
@deluan deluan merged commit 5621551 into navidrome:master Oct 19, 2021
@deluan
Copy link
Member

deluan commented Oct 19, 2021

Thanks!

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Lyrics - Subsonic API
3 participants