source_utils_conditional.bs
' @fileoverview Conditional functions that depend on 'bs_const' values specified in the manifest file
' Print out all of the registry contents to the debug log
sub printRegistry()
#if debug
' get a list of every registry section
regSections = getRegistrySections()
for each section in regSections
' read all the data from the section
sectionData = RegistryReadAll(section)
' print the assocArray with all the data
print "Registry section: " + section
print sectionData
end for
#end if
end sub
' Print the DeviceProfile we advertise to Jellyfin.
'
' The profile is otherwise INVISIBLE at runtime — it is built, POSTed and
' forgotten — so "why did this transcode?" begins with a value nobody can read
' back. Three video-level bugs lived in it for months, and confirming the fix
' still required writing a test to recover the emitted numbers, because no code
' path surfaced them.
'
' Takes the already-built profile rather than calling getDeviceCapabilities():
' building one runs dozens of CanDecodeVideo probes, and this must stay free in
' the builds where the body compiles away.
sub printDeviceProfile(deviceProfile as object)
#if debug
print "DeviceProfile advertised to Jellyfin:"; FormatJson(deviceProfile)
#end if
end sub