cajax / yami

Mediainfo wrapper for Golang
MIT License
9 stars 4 forks source link

call yami.GetMediaInfo() got types error #3

Open zixizhan opened 4 years ago

zixizhan commented 4 years ago

I got an error when call yami.GetMediaInfo(): strconv.ParseFloat: parsing "UTC 2020-05-08 08:00:26": invalid syntax. followed the source code, I found in yami/types.go, "DurationStart" and "DurationEnd" are declared in wrong type, they are string instead of float64

cajax commented 4 years ago

Hi @zixizhan. Originally type mapping is generated based on official schema. So either it was changed since then either your particular binary outputs data in different format.

I will check with latest version of MediaInfo. What is the version of your MediaInfo?

zixizhan commented 4 years ago

64bit v20.03 for windows, It's the latest version on the official website so far

cajax commented 4 years ago

It looks like the problem was caused by localization in MediaInfo. I pushed a fix that forces raw types. Can you update the lib and test it again @zixizhan ?

zixizhan commented 4 years ago

I tested it, but it didn't work, the same error showed:(