Commit graph

37 commits

Author SHA1 Message Date
SergeantPanda
46695588f7 fix(m3u): enhance custom properties handling and DB connection management
- Implemented `ensure_custom_properties_dict()` to normalize custom properties across various models and serializers, addressing issues with legacy JSON-encoded strings.
- Updated M3U account and channel group models to ensure custom properties are consistently stored as dictionaries during save operations.
- Enhanced Celery task management by ensuring old DB connections are closed before and after tasks, improving reliability and preventing errors during account refresh operations. (Fixes #1338)
2026-06-18 14:59:09 -05:00
SergeantPanda
bc046b3c92 refactor(m3u, channels): streamline stream assignment and server group management
- Renamed `_clear_stream_assignment_keys` to `_release_stale_stream_assignment` for clarity and updated its logic to release pool counters.
- Introduced new functions for managing credential slots during profile switches, enhancing the handling of shared connection limits across server groups.
- Removed the `max_streams` field from the `ServerGroup` model and updated related components to reflect this change, simplifying the server group management.
- Updated frontend components to integrate server group management, allowing for dynamic creation and editing of server groups.
- Enhanced error handling in stream URL generation to provide more informative feedback on connection issues.
- Added tests for stale assignment release and credential management during profile switches.
2026-06-09 13:40:16 -05:00
Goldenfreddy0703
abdf2d7864 Fix credential release on deleted profile and round 3 review items.
Store credential Redis keys at reserve so release works when the profile row is deleted. Return reserve failure reasons to avoid fingerprint DB queries on logging paths. Document unlimited profile bypass in pool logic and Server Group UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 19:51:20 -04:00
Goldenfreddy0703
bb9b95b4a4 Refactor connection pools to manual ServerGroups with profile rotation.
Drop auto-fingerprint migration and restore per-profile selection for live/VOD.
Enforce shared limits on reserve using login-scoped group counters, and add
Server Groups UI for manual account assignment per maintainer feedback (#1137).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 20:18:45 -04:00
Goldenfreddy0703
d89f634213 Enforce shared credential connection pools across M3U accounts (#1137)
Group M3U/XC accounts and profiles that share the same provider login into auto-assigned ServerGroups keyed by credential fingerprint. Enforce combined Redis limits for live TV and VOD via apps/m3u/connection_pool.py.

- Per-profile fingerprinting (XC transforms and STD stream URLs)

- VOD profile selection tries alternates when default credential pool is full (fixes live then VOD failure)

- Stats UI shows provider login from active stream URL

- Tests: apps/m3u/tests/test_connection_pool.py (11 tests, all passing)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 03:30:48 -04:00
None
0c0e802cf2 refactor(orphan-cleanup): store as custom_properties mode
Drop 3UAccount.auto_cleanup_unused_channels field and its migration (apps/m3u/0020). Replace with a 3-state string under M3UAccount.custom_properties.orphan_channel_cleanup: "always" (default), "preserve_customized", "never".

Move the UI from a checkbox on the M3U account form to a SegmentedControl at the top of LiveGroupFilter. Local state mirrors the prop for immediate click feedback; reverts on API error.

M3UAccountSerializer.update() now merges incoming custom_properties before layering the typed preference fields on top.

Add LiveGroupFilter.test.jsx (5 cases). Replace AutoCleanupToggleTests with OrphanCleanupModeTests (5 cases) for the new 3-state contract.
2026-05-01 23:24:40 -05:00
None
6fed444e43 feat: Auto-sync overhaul (FR #1196)
Per-field channel overrides for auto-synced channels, hide-from-output flag, range-bounded auto-numbering with re-pack, multi-stream channel safety, multi-provider shared-range merging, and an across-the-board move from per-row sync writes to bulk operations.

Migrations:

apps/channels:

0036_channeloverride_and_user_hidden,
0037_backfill_auto_created_by_null,
0038_channelgroupm3uaccount_auto_sync_channel_end,
0039_channel_channel_number_nullable

apps/m3u:
0020_m3uaccount_auto_cleanup_unused_channels

See CHANGELOG.md for the full commit log
2026-05-01 14:05:06 -05:00
SergeantPanda
2ef9ab0dcf Refactor: Remove unused stream deactivation and filtering methods from M3UAccount and M3UFilter classes 2026-04-30 16:01:55 -05:00
SergeantPanda
b22f9e8e07 Enhancement: Account expiration tracking and notifications for M3U profiles 2026-03-14 18:38:59 -05:00
SergeantPanda
c023cde8fe Add custom properties to M3UAccountProfile and implement account info retrieval 2025-09-09 16:05:58 -05:00
SergeantPanda
6c1bfaf052 Increase server url max length from 200 to 1000 characters to accomodate tokens in the url 2025-09-02 10:20:23 -05:00
SergeantPanda
6f6c28ca7c Convert custom_properties to jsonb in the backend. 2025-09-02 09:41:51 -05:00
SergeantPanda
24f876d09f Add priority for providers so VOD's can be auto selected based on the priority. 2025-08-20 17:38:21 -05:00
dekzter
f300da6eff case sensitive flag and other possible custom properties for filters 2025-08-03 08:40:00 -04:00
dekzter
ead76fe661 first run at m3u filtering 2025-08-01 15:02:43 -04:00
dekzter
eb1bbdd299 merged in dev 2025-05-24 07:19:43 -04:00
SergeantPanda
6de565857d Set default refresh interval for files added via mapping to 0 since they will auto-update when modified. 2025-05-21 14:59:24 -05:00
dekzter
74d58515d0 user management, user levels, user level channel access 2025-05-18 11:19:34 -04:00
SergeantPanda
e63a66bf57 Change status to disabled when epg or m3u disabled. Change to idle when enabled. 2025-05-07 13:50:10 -05:00
SergeantPanda
ae93bc2a1f Adds a "Pending Setup" status so the user knows they need to select groups before their streams are imported. 2025-05-05 19:50:20 -05:00
SergeantPanda
b713b516b4 Convert m3u accounts to a similar format to epg for status updates. Renamed DB field last_error to last_message so we can use it for more messaging. Migration to change updated_at field to not be updated everytime the m3u changes. It should only update the updated_at when we successfully update the m3u. 2025-05-04 17:51:57 -05:00
dekzter
06879ed8ef merged in dev 2025-05-02 09:33:09 -04:00
SergeantPanda
d26944a7a5 Add stale_stream_days field to M3UAccount model and update related logic
- Introduced stale_stream_days field to M3UAccount to specify the retention period for streams.
- Updated cleanup_streams task to remove streams not seen within the specified stale_stream_days.
- Enhanced M3U form to include stale_stream_days input for user configuration.
2025-05-01 16:01:08 -05:00
dekzter
3054cf2ae9 initial xtreamcodes support 2025-04-27 10:32:29 -04:00
dekzter
36b281697c fetch default user-agent if none is set on m3u 2025-04-12 07:13:28 -04:00
dekzter
354cd84c88 filesystem watch and process of m3u and epg 2025-04-06 15:58:55 -04:00
dekzter
17a8e94f64 django beat, refresh intervals for epg and m3u 2025-03-30 11:53:26 -04:00
dekzter
d418cd7c06 new custom properties fields for m3u and program data 2025-03-27 13:02:19 -04:00
dekzter
8cdf9a40cf m3u modifications so streams are identified by hash, configurable, also streams now have channel_groups instead of a string for groups 2025-03-19 16:35:49 -04:00
dekzter
45a9c3026a custom streams now work 2025-03-17 18:38:37 -04:00
dekzter
9711d7ab34 modified database fields for consistency, removed custom_url from streams (no longer needed) 2025-03-16 09:07:10 -04:00
Dispatcharr
ace441fb56 Pre-Alpha v?
Lost count:
Added/Fixed bulk adding from stream
Added/Fixed Auto assign channel numbers
Added command to kill processes
Changed to a persistant lock using redis
2025-03-01 08:52:32 -06:00
kappa118
57432748a4 added m3u profile support 2025-02-28 14:08:05 -05:00
kappa118
04080a5f2b attempting to get profiles to work properly 2025-02-28 09:47:40 -05:00
kappa118
53836fdac3 first run at m3u profiles 2025-02-27 22:05:41 -05:00
Dispatcharr
6b857d3931 Alpha v3 again
I'm stupid and forgot a file
2025-02-21 15:32:31 -06:00
Dispatcharr
8edb743ebd Initial commit 2025-02-18 11:14:09 -06:00