[vlc-commits] LUA SD: Fix Librivox duration parser.

Konstantin Pavlov git at videolan.org
Tue Jul 26 11:09:27 CEST 2011


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Tue Jul 26 13:04:08 2011 +0400| [9d00cb585ee2dc606909d7c33ce6815761b796a3] | committer: Konstantin Pavlov

LUA SD: Fix Librivox duration parser.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d00cb585ee2dc606909d7c33ce6815761b796a3
---

 share/lua/sd/librivox.lua |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/share/lua/sd/librivox.lua b/share/lua/sd/librivox.lua
index 138ca4c..9aa34a1 100644
--- a/share/lua/sd/librivox.lua
+++ b/share/lua/sd/librivox.lua
@@ -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 )



More information about the vlc-commits mailing list