X-Git-Url: http://royale.zerezo.com/git/?p=FAPG;a=blobdiff_plain;f=fapg.c;h=bd2b3f0ea2c1d79ee2c29ff3d177621c524e2de8;hp=0c72af8f2d1518b186b02a76084ce645f8846c01;hb=refs%2Ftags%2Fv0.43;hpb=7bc9401a06cc6d62d53ac50139743599530f2dd8 diff --git a/fapg.c b/fapg.c index 0c72af8..bd2b3f0 100644 --- a/fapg.c +++ b/fapg.c @@ -768,6 +768,9 @@ void parse_mp3(unsigned char *file) /* genre=atoi(&genrebuf[1]); */ genre = atoi(c + 12); } + if(strncmp(c, "TLEN", 4) == 0) { + duration = atoi(c + 11) / 1000; + } c += size + 10; } } @@ -1335,12 +1338,10 @@ void parse_file(unsigned char *newpath, unsigned char * original_path) counter++; switch (format) { case FORMAT_M3U: - if(duration != -1) { - printf("#EXTINF:%d,", duration); - if(strlen(artist) != 0) - printf("%s - ", artist); - printf("%s%s", title, eol); - } + printf("#EXTINF:%d,", duration); + if(strlen(artist) != 0) + printf("%s - ", artist); + printf("%s%s", title, eol); print_path(newpath); printf("%s", eol); break;