From b0ec569a00e86d8e4d41961a470eab5ccaaeb872 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 24 Nov 2025 20:24:44 +0100 Subject: [PATCH] fixed meal master importer --- cookbook/integration/mealmaster.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cookbook/integration/mealmaster.py b/cookbook/integration/mealmaster.py index 786103b48..41e306b99 100644 --- a/cookbook/integration/mealmaster.py +++ b/cookbook/integration/mealmaster.py @@ -63,7 +63,15 @@ class MealMaster(Integration): current_recipe = '' for fl in file.readlines(): - line = fl.decode("windows-1250") + line = "" + try: + line = fl.decode("UTF-8") + except UnicodeDecodeError: + try: + line = fl.decode("windows-1250") + except Exception as e: + line = "ERROR DECODING LINE" + if (line.startswith('MMMMM') or line.startswith('-----')) and 'meal-master' in line.lower(): if current_recipe != '': recipe_list.append(current_recipe)