From deb35066adee96c164ad9d09477cfad2a0747d1a Mon Sep 17 00:00:00 2001 From: pQu4k3r Date: Thu, 10 Sep 2026 15:21:47 +0000 Subject: [PATCH 1/2] Fix autotag workflow: GitHub Release step never actually ran The "Create GitHub Release" step's condition checked steps.check_tag.outputs.exists, but the "Check if tag already exists" step never sets an output named exists - it only ever sets skip (and only when the tag already existed). So steps.check_tag.outputs.exists was always empty, the condition always evaluated false, and the release-creation step was silently skipped on every run. Confirmed via the Actions run history: tags v1.2.9 through v1.3.2 were all created successfully, but no GitHub Release was published for any of them - the repo's Releases page has been stuck showing v1.2.8 since April even though the plugin itself moved well past it. Tag creation (which correctly checks the skip output) was never affected. Fixed the condition to check the same skip output the rest of the workflow already uses. This only fixes releases going forward; the four already-missing releases (v1.2.9, v1.3.0, v1.3.1, v1.3.2) need to be created manually since their tags already exist (an automatic re-run would skip them for the same "already tagged" reason it always has). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01UPpumFb2PP21ATpDwJBYBB --- .github/workflows/autotag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autotag.yml b/.github/workflows/autotag.yml index 8d933ff7..8e991aea 100644 --- a/.github/workflows/autotag.yml +++ b/.github/workflows/autotag.yml @@ -65,7 +65,7 @@ jobs: echo "EOF" >> $GITHUB_OUTPUT - name: Create GitHub Release - if: steps.check_tag.outputs.exists == 'false' + if: steps.check_tag.outputs.skip != 'true' run: | gh release create "v${{ steps.get_version.outputs.version }}" \ --title "Release v${{ steps.get_version.outputs.version }}" \ From b91e67c0338e0129a49f15fce25c7114f3a9c36c Mon Sep 17 00:00:00 2001 From: pQu4k3r Date: Thu, 10 Sep 2026 15:43:38 +0000 Subject: [PATCH 2/2] Only save the selected city to new_city.cfg, not every search result Reported: searching "Lourdes" added all 17 online search results to new_city.cfg, not just the one city actually chosen. #6 appended every result from search_online to the offline list as soon as the search ran, before the user picked anything. Moved the write to the four places a city is actually selected instead (ok/save_favorite1/save_favorite2/save_home), keyed off the exact same get_selected_city() string already used to save favorites - same format as the offline file, so no extra parsing/round-tripping. Still deduped by id so repeated selections don't grow the file. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01UPpumFb2PP21ATpDwJBYBB --- .../Plugins/Extensions/Foreca1/city_panel.py | 40 ++++++++----------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/usr/lib/enigma2/python/Plugins/Extensions/Foreca1/city_panel.py b/usr/lib/enigma2/python/Plugins/Extensions/Foreca1/city_panel.py index b7dbcc11..6639b7c0 100644 --- a/usr/lib/enigma2/python/Plugins/Extensions/Foreca1/city_panel.py +++ b/usr/lib/enigma2/python/Plugins/Extensions/Foreca1/city_panel.py @@ -320,7 +320,6 @@ def search_online(self, search_term): # Build new list with online results new_entries = [] new_city_list = [] - offline_entries = [] for res in results: city_id = res.get("id") name = res.get("name", "") @@ -330,8 +329,6 @@ def search_online(self, search_term): display_name, city_id=city_id, is_header=False) new_entries.append(entry) new_city_list.append((display_name, city_id)) - if city_id and name: - offline_entries.append((city_id, name)) # Replace the filtered list with the online one self.filtered_list = new_entries @@ -343,20 +340,20 @@ def search_online(self, search_term): self["description"].setText( _("Found %d cities online for '%s'") % (count, search_term)) - - self._append_to_offline_city_list(offline_entries) return True - def _append_to_offline_city_list(self, entries): - """Append newly found cities to new_city.cfg so the offline list - builds up automatically over time (README-documented behavior). - Skips ids already present in the file. + def _remember_city_offline(self, formatted_entry): + """Append a single "id/Name_With_Underscores" entry (the same + format get_selected_city() returns, matching the offline file's + own format) to new_city.cfg, so the offline list builds up over + time with only the cities the user actually picks - not every + search result. Skips it if that id is already present. """ - if not entries: + if not formatted_entry or "/" not in formatted_entry: return + city_id = formatted_entry.split("/", 1)[0] city_cfg_path = join(SYSTEM_DIR, "new_city.cfg") - existing_ids = set() if exists(city_cfg_path): try: with open(city_cfg_path, "r", encoding="utf-8") as f: @@ -364,29 +361,20 @@ def _append_to_offline_city_list(self, entries): line = line.strip() if not line or line.startswith("#") or "/" not in line: continue - existing_ids.add(line.split("/", 1)[0]) + if line.split("/", 1)[0] == city_id: + return # already known except Exception as e: print( f"[CityPanel4] Error reading offline list for dedup: {e}") return - new_lines = [ - f"{city_id}/{name.replace(' ', '_')}" - for city_id, name in entries - if str(city_id) not in existing_ids - ] - if not new_lines: - return - try: if not exists(SYSTEM_DIR): makedirs(SYSTEM_DIR, exist_ok=True) with open(city_cfg_path, "a", encoding="utf-8") as f: - for line in new_lines: - f.write(line + "\n") + f.write(formatted_entry + "\n") if DEBUG: - print( - f"[CityPanel4] Appended {len(new_lines)} cities to offline list") + print(f"[CityPanel4] Remembered city offline: {formatted_entry}") except Exception as e: print(f"[CityPanel4] Error appending to offline list: {e}") @@ -500,6 +488,7 @@ def _get_favorite_name(self, fav_type): def save_favorite1(self): selected = self.get_selected_city() if selected: + self._remember_city_offline(selected) self.save_favorite("fav1", selected) self._update_fav_buttons() self.close((selected, 'assign', 1)) @@ -507,6 +496,7 @@ def save_favorite1(self): def save_favorite2(self): selected = self.get_selected_city() if selected: + self._remember_city_offline(selected) self.save_favorite("fav2", selected) self._update_fav_buttons() self.close((selected, 'assign', 1)) @@ -514,6 +504,7 @@ def save_favorite2(self): def save_home(self): selected = self.get_selected_city() if selected: + self._remember_city_offline(selected) self.save_favorite("home", selected) self._update_fav_buttons() self.close((selected, 'assign', 1)) @@ -521,6 +512,7 @@ def save_home(self): def ok(self): selected = self.get_selected_city() if selected: + self._remember_city_offline(selected) if '/' in selected: city_id, display_name = selected.split('/', 1) display_name = display_name.replace('_', ' ')