-
Notifications
You must be signed in to change notification settings - Fork 52
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this 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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// "bytes" |
import ( | ||
// "bytes" | ||
"encoding/binary" | ||
// "fmt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// "fmt" |
@@ -1,4 +1,4 @@ | |||
module github.com/bogem/id3v2 | |||
module github.com/tramhao/id3v2 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TimestampFormat byte | |
TimestampFormat TimestampFormat |
type TimestampFormat int | ||
|
||
const ( | ||
Unknown TimestampFormat = iota |
There was a problem hiding this comment.
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
Unknown TimestampFormat = iota | |
Unknown byte = iota |
There was a problem hiding this comment.
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", | ||
} | ||
) |
There was a problem hiding this comment.
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
)
According to id3v2 sylt specification, add the sylt support.