diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e417897..e7f0d28f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- M3U stream name parsing now uses the comma text (the canonical display title per the base `#EXTINF` spec) as the primary stream name, falling back to `tvc-guide-title`, then `tvg-name`, rather than preferring `tvg-name` first. Providers that use `tvg-name` as an EPG key and put the human-readable title after the comma will now display the correct name. Providers that duplicate the same value in both fields are unaffected. (Fixes #1081) - FloatingVideo player: the native video controls (timeline, play/pause, volume) are now hidden by default when a live stream starts and only appear when the user hovers over the player. - Enhanced Swagger UI authorization dialog: registered a custom `OpenApiAuthenticationExtension` for `ApiKeyAuthentication` so drf-spectacular now generates an `ApiKeyAuth (apiKey)` entry alongside `jwtAuth`. Both entries include descriptive text linking to the relevant endpoints (`/api/accounts/token/`, `/api/accounts/api-keys/generate/`, `/api/accounts/api-keys/revoke/`). - Refactored frontend form components (`AccountInfoModal`, `AssignChannelNumbers`, `Channel`, `ChannelBatch`, `ChannelGroup`, `Connection`, `CronBuilder`, `DummyEPG`, and `EPG`) to extract business logic into dedicated utility modules under `src/utils/forms/`. Each extracted module is covered by unit tests. Mantine compound component references (`Table.Tbody`, `Popover.Target`, `Accordion.Item`, etc.) have been updated to use flat named imports. — Thanks [@nick4810](https://github.com/nick4810) diff --git a/apps/m3u/tasks.py b/apps/m3u/tasks.py index 354a2ef4..a2b21ee0 100644 --- a/apps/m3u/tasks.py +++ b/apps/m3u/tasks.py @@ -514,12 +514,10 @@ def parse_extinf_line(line: str) -> dict: else: display_name = content.strip() - # Use tvg-name attribute if available; otherwise try tvc-guide-title, then fall back to display name. - name = get_case_insensitive_attr(attrs, "tvg-name", None) - if not name: - name = get_case_insensitive_attr(attrs, "tvc-guide-title", None) - if not name: - name = display_name + # Per the base #EXTINF spec, the comma text is the canonical human-readable title. + # Fall back to tvc-guide-title, then tvg-name (which some providers use as an EPG key, + # not a display label), and finally the raw content if everything else is empty. + name = display_name or get_case_insensitive_attr(attrs, "tvc-guide-title", None) or get_case_insensitive_attr(attrs, "tvg-name", None) or content.strip() return {"attributes": attrs, "display_name": display_name, "name": name}