]> git.sesse.net Git - vlc/commitdiff
LUA SD: Fix Librivox duration parser.
authorKonstantin Pavlov <thresh@videolan.org>
Tue, 26 Jul 2011 09:04:08 +0000 (13:04 +0400)
committerKonstantin Pavlov <thresh@videolan.org>
Tue, 26 Jul 2011 09:04:08 +0000 (13:04 +0400)
share/lua/sd/librivox.lua

index 138ca4c42e6f7f009c2f2161b1c3a1610111346b..9aa34a1ce1d19b2227770d3c333f50ec2351e799 100644 (file)
@@ -31,6 +31,9 @@ function string_2_duration(str)
     local index = string.find( str, ':' )
     if( index == nil ) then return str
     else
+        if( index == 1 ) then
+            return string.sub( str, 2 )
+        end
         local index2 = string.find( str, ':', index + 1 )
         if( index2 == nil ) then
             return string.sub( str, 0, index - 1 ) * 60 + string.sub( str, index + 1 )