Show taglib and ffmpeg versions in the log
This commit is contained in:
@@ -34,6 +34,10 @@ func (e *Extractor) CustomMappings() metadata.ParsedTags {
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Extractor) Version() string {
|
||||
return Version()
|
||||
}
|
||||
|
||||
func (e *Extractor) extractMetadata(filePath string) (metadata.ParsedTags, error) {
|
||||
tags, err := Read(filePath)
|
||||
if err != nil {
|
||||
|
||||
@@ -21,6 +21,13 @@
|
||||
|
||||
char has_cover(const TagLib::FileRef f);
|
||||
|
||||
static char TAGLIB_VERSION[16];
|
||||
|
||||
char* taglib_version() {
|
||||
snprintf((char *)TAGLIB_VERSION, 16, "%d.%d.%d", TAGLIB_MAJOR_VERSION, TAGLIB_MINOR_VERSION, TAGLIB_PATCH_VERSION);
|
||||
return (char *)TAGLIB_VERSION;
|
||||
}
|
||||
|
||||
int taglib_read(const FILENAME_CHAR_T *filename, unsigned long id) {
|
||||
TagLib::FileRef f(filename, true, TagLib::AudioProperties::Fast);
|
||||
|
||||
|
||||
@@ -25,6 +25,10 @@ import (
|
||||
|
||||
const iTunesKeyPrefix = "----:com.apple.itunes:"
|
||||
|
||||
func Version() string {
|
||||
return C.GoString(C.taglib_version())
|
||||
}
|
||||
|
||||
func Read(filename string) (tags map[string][]string, err error) {
|
||||
// Do not crash on failures in the C code/library
|
||||
debug.SetPanicOnFault(true)
|
||||
|
||||
@@ -17,6 +17,7 @@ extern void go_map_put_int(unsigned long id, char *key, int val);
|
||||
extern void go_map_put_lyrics(unsigned long id, char *lang, char *val);
|
||||
extern void go_map_put_lyric_line(unsigned long id, char *lang, char *text, int time);
|
||||
int taglib_read(const FILENAME_CHAR_T *filename, unsigned long id);
|
||||
char* taglib_version();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user