]> git.sesse.net Git - vlc/blobdiff - share/lua/http/requests/playlist.xml
lua_http: fix duration printing.
[vlc] / share / lua / http / requests / playlist.xml
index 922e1492ad0942cf5d298511922c566bb85d99b0..619fd04cfff688c2e68bdbfe85eebeb879f579ae 100644 (file)
@@ -57,7 +57,7 @@ function print_playlist(item)
                 current = 'current="current"'
             end
         end
-        print('<leaf id="' ..tostring(item.id).. '" uri="' ..tostring(path).. '" name="' ..name.. '" ro="' ..(item.flags.ro and "ro" or "rw").. '" duration ="' ..tostring(item.duration).. '" ' ..current.. ' />')
+        print('<leaf id="' ..tostring(item.id).. '" uri="' ..tostring(path).. '" name="' ..name.. '" ro="' ..(item.flags.ro and "ro" or "rw").. '" duration ="' ..math.floor(item.duration).. '" ' ..current.. ' />')
     end
 end