scripts: only log session item Id when unhandling it

This is because the associated node does not exist anymore. This change also
logs the session item Id when handling it, so that it is easy to know if the
unhandled session item was handled or not.
This commit is contained in:
Julian Bouzas 2024-01-30 11:48:53 -05:00
parent 2fcd24b2d3
commit 5581a9c2b7
6 changed files with 6 additions and 7 deletions

View file

@ -31,7 +31,7 @@ SimpleEventHook {
return
end
log:info (si, string.format ("handling item: %s (%s)",
log:info (si, string.format ("handling item %d: %s (%s)", si.id,
tostring (si_props ["node.name"]), tostring (si_props ["node.id"])))
local metadata = settings.allow_moving_streams and cutils.get_default_metadata_object ()

View file

@ -52,7 +52,7 @@ SimpleEventHook {
local target_picked = false
local allow_fallback
log:info (si, string.format ("handling item: %s (%s)",
log:info (si, string.format ("handling item %d: %s (%s)", si.id,
tostring (si_props ["node.name"]), tostring (si_props ["node.id"])))
target, is_smart_filter = findFilterTarget (si, om)

View file

@ -77,7 +77,7 @@ SimpleEventHook {
return
end
log:info (si, string.format ("handling item: %s (%s)",
log:info (si, string.format ("handling item %d: %s (%s)", si.id,
tostring (si_props ["node.name"]), tostring (si_props ["node.id"])))
-- get target media class

View file

@ -38,7 +38,7 @@ AsyncEventHook {
local si_link = nil
local passthrough = si_flags.can_passthrough
log:info (si, string.format ("handling item: %s (%s)",
log:info (si, string.format ("handling item %d: %s (%s)", si.id,
tostring (si_props ["node.name"]), tostring (si_props ["node.id"])))
local exclusive = cutils.parseBool (si_props ["node.exclusive"])

View file

@ -30,7 +30,7 @@ SimpleEventHook {
local exclusive = cutils.parseBool (si_props ["node.exclusive"])
local si_must_passthrough = cutils.parseBool (si_props ["item.node.encoded-only"])
log:info (si, string.format ("handling item: %s (%s)",
log:info (si, string.format ("handling item %d: %s (%s)", si_id,
tostring (si_props ["node.name"]), tostring (si_props ["node.id"])))
-- Check if item is linked to proper target, otherwise re-link

View file

@ -70,8 +70,7 @@ function unhandleLinkable (si, om)
return
end
log.info (si, string.format ("unhandling item: %s (%s)",
tostring (si_props ["node.name"]), tostring (si_props ["node.id"])))
log.info (si, string.format ("unhandling item %d", si_id))
-- iterate over all the links in the graph and
-- remove any links associated with this item