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

Add Synchronised Lyrics SYLT support #64

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

tramhao
Copy link

@tramhao tramhao commented Mar 17, 2021

According to id3v2 sylt specification, add the sylt support.

Copy link
Contributor

@tillt tillt left a comment

Choose a reason for hiding this comment

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

Great idea adding support for these. Am of no authority but I would definitely try to add some tests and maybe even more validation of this doing its job nicely.

@@ -1,4 +1,4 @@
module github.com/bogem/id3v2
module github.com/tramhao/id3v2
Copy link
Contributor

Choose a reason for hiding this comment

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

This by mistake?

import (
// "bytes"
"encoding/binary"
// "fmt"
Copy link
Contributor

Choose a reason for hiding this comment

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

These shouldn't be left in here.

Copy link
Owner

@n10v n10v left a comment

Choose a reason for hiding this comment

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

Thanks a lot for adding this PR and super sorry for taking so much time to submit my review. I added comments a year ago, but forgot to submit the review 🤦🤦🤦🤦🤦🤦

package id3v2

import (
// "bytes"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
// "bytes"

import (
// "bytes"
"encoding/binary"
// "fmt"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
// "fmt"

@@ -1,4 +1,4 @@
module github.com/bogem/id3v2
module github.com/tramhao/id3v2
Copy link
Owner

Choose a reason for hiding this comment

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

It need to be reverted 🤔

type SynchronisedLyricsFrame struct {
Encoding Encoding
Language string
TimestampFormat byte
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
TimestampFormat byte
TimestampFormat TimestampFormat

type TimestampFormat int

const (
Unknown TimestampFormat = iota
Copy link
Owner

Choose a reason for hiding this comment

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

IMO TimestampFormat is redundant here. Just use byte

Suggested change
Unknown TimestampFormat = iota
Unknown byte = iota

Copy link
Owner

Choose a reason for hiding this comment

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

Please also prefix timestamp formats. Please also get rid of Unknown, I can't find such TimestampFormat in spec

const (
	SYLTAbsoluteMpegFramesTimestampFormat = iota + 1
	SYLTAbsoluteMillisecondsTimestampFormat
)

7: "WebpageUrls",
8: "ImageUrls",
}
)
Copy link
Owner

Choose a reason for hiding this comment

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

Please also use iota here:

const (
	SYLTOtherContentType = iota
	SYLTLyricsContentType
	SYLTTextTranscriptionContentType
	SYLTMovementContentType
	SYLTEventsContentType
	SYLTChordContentType
	SYLTTriviaContentType
	SYLTWebpageURLsContentType
	SYLTImageURLsContentType
)

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.

None yet

3 participants