From 253ed5f5db2271d0e4e0763130bc896da118bac9 Mon Sep 17 00:00:00 2001 From: stoney420 Date: Fri, 27 Jun 2025 16:35:28 +0200 Subject: [PATCH] Upload files to "/" --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..79e6cc8 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +How it Works / How to Use +This system automates the creation of M3U playlists for IPTV directly within your Forgejo repository. You manage your channels in a simple text file, and Forgejo handles the rest. + +How it Works +channels.txt: This is your main list of channels. You define each channel's name, URL, group, and optional logo/EPG ID here. +bulk_import.m3u (Optional): If you upload an M3U file named bulk_import.m3u to your repository, the system will automatically process it, add those channels to channels.txt, and then delete bulk_import.m3u (needs fixed). +generate_playlist.py: This Python script reads channels.txt after any imports, converts the data into the standard M3U playlist format, and creates playlist.m3u. +Forgejo Actions: An automated workflow in your Forgejo repository detects changes to channels.txt or the upload of bulk_import.m3u. It then runs generate_playlist.py and commits the updated channels.txt, playlist.m3u, and a log file back to your repository. This keeps your playlist always up-to-date and publicly accessible. +playlist.m3u: This is your final, generated M3U playlist file, which you can use in any IPTV player. +How to Use +You primarily interact with this system by editing files directly in your Forgejo repository. + +1. Editing Channels Manually (channels.txt) +Go to your repository on Forgejo. +Click on channels.txt. +Click the "Edit this file" (pencil) icon. +Add, modify, or remove channel entries. +Format: Each channel is a block of Key = Value pairs (e.g., Stream name = My Channel, Stream URL = http://example.com/stream). +Separation: Ensure at least two blank lines separate each channel block. +Commit your changes with a descriptive message. +This action will automatically trigger the M3U generation. +2. Importing Channels (Using bulk_import.m3u) +Get an M3U file you want to import. +Go to your repository on Forgejo. +Click "Add file" and then "Upload file". +Upload your M3U file, but rename it to bulk_import.m3u during the upload process. +Commit your changes. +The system will process this file, add its channels to channels.txt, delete bulk_import.m3u, and regenerate playlist.m3u. +3. Accessing Your Playlist +After any changes and the Forgejo Action completes (check the "Actions" tab in your repository), your playlist.m3u will be updated. +You can access your playlist using a direct URL, typically: https://[your-forgejo-instance]/[your-username]/[your-repo-name]/raw/branch/main/playlist.m3u (Replace the bracketed parts with your actual Forgejo details) +Use this URL in your preferred IPTV player. +Tip: Always check the "Actions" tab in your Forgejo repository for logs if you encounter any issues. \ No newline at end of file