Media (Linux): detects song length & play position

This commit is contained in:
Carter Li
2026-05-11 23:25:52 +08:00
parent efca4f3597
commit 1942dce980
4 changed files with 18 additions and 2 deletions
+2
View File
@@ -158,6 +158,8 @@ bool ffGenerateMediaJsonResult(FF_A_UNUSED FFMediaOptions* options, yyjson_mut_d
yyjson_mut_obj_add_strbuf(doc, song, "artist", &media->artist);
yyjson_mut_obj_add_strbuf(doc, song, "album", &media->album);
yyjson_mut_obj_add_strbuf(doc, song, "status", &media->status);
yyjson_mut_obj_add_uint(doc, song, "length", media->length);
yyjson_mut_obj_add_uint(doc, song, "position", media->position);
if (media->cover.length > 0) {
yyjson_mut_obj_add_strbuf(doc, song, "cover", &media->cover);
} else {