Skip to content

Commit 48d6828

Browse files
authored
Merge pull request #115 from gsbabil/master
Check and fix if `video_duration` is `nil`
2 parents 5ad3701 + f4bcdf9 commit 48d6828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/SimpleHistory.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ function history_resume_option()
21152115
if video_time > 0 then return end
21162116
local logged_time = 0
21172117
local percentage = 0
2118-
local video_duration = mp.get_property_number('duration')
2118+
local video_duration = (mp.get_property_number('duration') or 0)
21192119
list_contents = read_log_table()
21202120
if not list_contents or not list_contents[1] then return end
21212121
for i = #list_contents, 1, -1 do

0 commit comments

Comments
 (0)