From 6c1f503cdaae802facfd5ea686f66b5c2a816658 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 27 Feb 2024 00:27:43 +0100 Subject: [PATCH] Vapor: check for master_info tool --- share/scripts/_adm_bwf.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/share/scripts/_adm_bwf.lua b/share/scripts/_adm_bwf.lua index 3b9c00c484..78d3cc2b07 100644 --- a/share/scripts/_adm_bwf.lua +++ b/share/scripts/_adm_bwf.lua @@ -28,6 +28,12 @@ function factory () return function () return 1 end + if 0 ~= os.execute ("master_info -h") then + local md = LuaDialog.Message ("Master Info Tool Missing", "The 'master_info' tool from Dolby_Atmos_Storage_SIDK_v2.3.2/Tools/ needs to be in $PATH for ADM/BWF meta-data import to work.", LuaDialog.MessageType.Error, LuaDialog.ButtonType.Close) + print (md:run()) + return 1 + end + local rv = LuaDialog.Dialog ("Load ADM/BWF File", { { type = "file", key = "file", title = "Choose ADM/BWF File", path = "" }, @@ -38,7 +44,11 @@ function factory () return function () end -- place `Dolby_Atmos_Storage_SIDK_v2.3.2/Tools/linux/lin64_fpic/master_info` in $PATH - os.execute ("master_info -printMetadata \"" .. rv['file'] .. "\" > /tmp/adm.info") + if 0 ~= os.execute ("master_info -printMetadata \"" .. rv['file'] .. "\" > /tmp/adm.info") then + local md = LuaDialog.Message ("Master Info Tool Error", "The 'master_info' tool failed to extract meta-data from\n'" .. rv['file'] .. "'.", LuaDialog.MessageType.Error, LuaDialog.ButtonType.Close) + print (md:run()) + return 1 + end if Session:get_tracks():size() == 0 then print ("Importing Files ...")