Fix: Empty lines in URL_config.ini cause top-most records to be silently deleted#1408
Open
HeatCrab wants to merge 1 commit into
Open
Fix: Empty lines in URL_config.ini cause top-most records to be silently deleted#1408HeatCrab wants to merge 1 commit into
URL_config.ini cause top-most records to be silently deleted#1408HeatCrab wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 标题(Title)
请提供这个Pull Request中提议的更改的简洁描述:
URL_config.inicause top-most records to be silently deleted🔍 描述(Description)
请描述这个PR做了什么/为什么这些更改是必要的:
URL_config.inicontains empty lines (e.g., used to visually separate platform categories), the program reads them as\n. Inmain.py, thedelete_line()method incorrectly uses substring matching (del_line in txt_line) to check for deletion.\nis present in every line, this logic evaluates to True for the very first line of the configuration file. As a result, every empty line causes the top-most valid URL configuration to be wrongly and silently deleted.del_line == txt_line), which perfectly resolves the data loss issue without any side effects.📝 类型(Type of Change)
这个PR引入了哪种类型的更改?(请勾选所有适用的选项)
🏗️ 测试(Testing)
请描述您已经进行的测试:
URL_config.ini. Verified that valid stream URLs are no longer deleted and duplicates are correctly removed.如果适用,请提供测试更改的说明:
config/URL_config.iniand run the script. The script should not delete the topmost valid configurations anymore.📋 检查清单(Checklist)
在您创建这个PR之前,请确保以下所有框都被勾选,方法是在每个框中放置一个
x:注意: 这个PR在所有复选框被勾选之前不会被合并。
感谢您的贡献!