From c921eac7a8659c4994abb0f7b6cb07a0ae168139 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Revol?= Date: Mon, 23 Mar 2020 19:17:40 +0100 Subject: [PATCH] Don't skip printing EXTINF for unknown durations It is perfectly valid to use -1 when duration isn't known. --- fapg.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fapg.c b/fapg.c index 0c72af8..745e6ae 100644 --- a/fapg.c +++ b/fapg.c @@ -1335,12 +1335,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; -- 2.20.1