syncplay.lua: Don't give new title w/ old time
This commit is contained in:
parent
7910e7364e
commit
f2faeb72c8
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Author: Etoh
|
Author: Etoh
|
||||||
Project: http://syncplay.pl/
|
Project: http://syncplay.pl/
|
||||||
Version: 0.1.8
|
Version: 0.1.9
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
* This interface module is intended to be used in conjunction with Syncplay.
|
* This interface module is intended to be used in conjunction with Syncplay.
|
||||||
@ -85,8 +85,8 @@ else
|
|||||||
require "common"
|
require "common"
|
||||||
end
|
end
|
||||||
|
|
||||||
local connectorversion = "0.1.8"
|
local connectorversion = "0.1.9"
|
||||||
local durationdelay = 500000 -- Pause for get_duration command for increased reliability
|
local durationdelay = 500000 -- Pause for get_duration command etc for increased reliability
|
||||||
local host = "localhost"
|
local host = "localhost"
|
||||||
local port
|
local port
|
||||||
|
|
||||||
@ -109,6 +109,8 @@ local oldfilepath
|
|||||||
local oldinputstate
|
local oldinputstate
|
||||||
local newfilepath
|
local newfilepath
|
||||||
local newinputstate
|
local newinputstate
|
||||||
|
local oldtitle = 0
|
||||||
|
local newtitle = 0
|
||||||
|
|
||||||
local running = true
|
local running = true
|
||||||
|
|
||||||
@ -137,6 +139,11 @@ function detectchanges()
|
|||||||
notificationbuffer = notificationbuffer .. "filepath-change"..notificationmarker..msgterminator
|
notificationbuffer = notificationbuffer .. "filepath-change"..notificationmarker..msgterminator
|
||||||
end
|
end
|
||||||
|
|
||||||
|
newtitle = get_var("title")
|
||||||
|
if newtitle ~= oldtitle and get_var("time") > 1 then
|
||||||
|
vlc.misc.mwait(vlc.misc.mdate() + durationdelay) -- Don't give new title with old time
|
||||||
|
end
|
||||||
|
oldtitle = newtitle
|
||||||
notificationbuffer = notificationbuffer .. "playstate"..msgseperator..tostring(get_play_state())..msgterminator
|
notificationbuffer = notificationbuffer .. "playstate"..msgseperator..tostring(get_play_state())..msgterminator
|
||||||
notificationbuffer = notificationbuffer .. "position"..msgseperator..tostring(get_time())..msgterminator
|
notificationbuffer = notificationbuffer .. "position"..msgseperator..tostring(get_time())..msgterminator
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user