your-land/bugtracker#5259 Warning message when movie files have wrong type or are missing

This commit is contained in:
AliasAlreadyTaken 2023-09-21 07:18:57 +02:00
parent ce81790b57
commit 5cec38ef81

View File

@ -139,6 +139,9 @@ local function load_images_of_movie(movie_id)
local movie = get_movie(movie_id)
local loaded_count = 0
local movie_files = movie.files or {}
if type(movie_files) ~= "table" then return 0, "no files" end
for _, file in ipairs(movie_files) do
local path = path_of_image(movie_id, file)
local success = load_image(path)