[PR #989] [MERGED] Improve make_playlist.py code quality and fix bugs #1767

Closed
opened 2026-03-15 17:45:33 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Free-TV/IPTV/pull/989
Author: @KAMI911
Created: 3/8/2026
Status: Merged
Merged: 3/8/2026
Merged by: @KAMI911

Base: masterHead: improve-m3u8-generation


📝 Commits (3)

  • ff99c72 Improve make_playlist.py code quality and fix bugs
  • e10f625 Skip commit and push when playlist has no changes
  • dfbfeb5 Use current branch instead of hardcoded master for push

📊 Changes

2 files changed (+27 additions, -21 deletions)

View changed files

📝 .github/workflows/update_playlist.yml (+2 -2)
📝 make_playlist.py (+25 -19)

📄 Description

  • Fix group name bug: replace underscores with spaces before title() so filenames like north_korea.md produce "North Korea" not "North_Korea"
  • Fix resource leaks: use context managers for all file handles including EPG list and per-country playlist files
  • Remove os.chdir() global side effect: use absolute paths derived from the script location instead
  • Avoid calling to_m3u_line() twice per channel by caching the result
  • Fix redundant trailing colon in filename[:-3:] slice
  • Consistent use of write() for headers instead of mixing print/write
  • Strip blank lines from EPG URL list when reading

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Free-TV/IPTV/pull/989 **Author:** [@KAMI911](https://github.com/KAMI911) **Created:** 3/8/2026 **Status:** ✅ Merged **Merged:** 3/8/2026 **Merged by:** [@KAMI911](https://github.com/KAMI911) **Base:** `master` ← **Head:** `improve-m3u8-generation` --- ### 📝 Commits (3) - [`ff99c72`](https://github.com/Free-TV/IPTV/commit/ff99c72b0441b3538b825fc589e3d7f8c94f6c39) Improve make_playlist.py code quality and fix bugs - [`e10f625`](https://github.com/Free-TV/IPTV/commit/e10f6258156601b34aca26892b62ffefc8e1fed5) Skip commit and push when playlist has no changes - [`dfbfeb5`](https://github.com/Free-TV/IPTV/commit/dfbfeb57d1d34310fd1d05ef166c48d05e82ab13) Use current branch instead of hardcoded master for push ### 📊 Changes **2 files changed** (+27 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/update_playlist.yml` (+2 -2) 📝 `make_playlist.py` (+25 -19) </details> ### 📄 Description - Fix group name bug: replace underscores with spaces before title() so filenames like north_korea.md produce "North Korea" not "North_Korea" - Fix resource leaks: use context managers for all file handles including EPG list and per-country playlist files - Remove os.chdir() global side effect: use absolute paths derived from the script location instead - Avoid calling to_m3u_line() twice per channel by caching the result - Fix redundant trailing colon in filename[:-3:] slice - Consistent use of write() for headers instead of mixing print/write - Strip blank lines from EPG URL list when reading --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 17:45:33 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/IPTV#1767
No description provided.