Dispatcharr/apps/channels
SergeantPanda b671a72707 fix: resolve decode_responses migration bugs and user-limit regressions
Fix a wave of bugs introduced by the user-priority branch's migration
from manual .decode('utf-8') calls to decode_responses=True on the
metadata Redis client:

core/utils.py
- Rewrite _init_client: fix SyntaxError at line 138, missing
  redis_password/redis_user params, cls._client corruption when
  decode_responses=False was requested, and dead retry backoff logic

apps/proxy/utils.py
- Fix get_user_limit_settings() → get_user_limits_settings() (2 sites)
- Fix VOD scan key vod_persistent_connections:* → vod_persistent_connection:*
- Fix undefined channel_id in VOD loop (use content_uuid from Redis hash)
- Remove leftover print(active_connections) debug statement
- Refactor manual cursor SCAN while-loops to scan_iter()

apps/channels/tasks.py
- Fix closure bug in _d(): md.get(key) → md.get(bkey) (was reading
  the outer loop variable instead of the local bytes key)

apps/proxy/ts_proxy/server.py
- Replace stale b'init_time', b'total_bytes', b'state' byte-string
  key lookups and .decode() calls with plain string equivalents

apps/proxy/ts_proxy/services/channel_service.py
- Fix ChannelMetadataField.STATE.encode() / .OWNER.encode() →
  .STATE / .OWNER (pre-existing, broke under decoded client)

apps/proxy/ts_proxy/views.py
- Fix ChannelMetadataField.OWNER.encode("utf-8") → .OWNER

apps/proxy/ts_proxy/client_manager.py
- Fix cid.decode('utf-8') in remove_ghost_clients(): smembers()
  already returns str with decode_responses=True
2026-03-26 18:41:42 -05:00
..
migrations Bug Fix: Stream.last_seen and ChannelGroupM3UAccount.last_seen model defaults now use django.utils.timezone.now instead of datetime.datetime.now, eliminating spurious RuntimeWarning: DateTimeField received a naive datetime warnings emitted during test database creation and on new record creation when USE_TZ=True. 2026-03-15 16:59:51 -05:00
tests fix(dvr): prevent duplicate recordings after EPG refresh 2026-03-20 11:48:06 -05:00
__init__.py Initial commit 2025-02-18 11:14:09 -06:00
admin.py epg refactor, new relations and matching 2025-03-26 13:28:03 -04:00
api_urls.py Updated url path 2025-12-16 23:06:49 -06:00
api_views.py merged in dev 2026-03-26 12:17:43 -04:00
apps.py Refactor stats and vod proxy 2025-09-05 19:30:13 -05:00
forms.py Forms support floats now. 2025-05-15 15:32:21 -05:00
models.py merged in dev 2026-03-26 12:17:43 -04:00
serializers.py Enhancement: Added stream_id (provider stream identifier) and stream_chno (provider channel number) fields to Stream model. For XC accounts, the stream hash now uses the stable stream_id instead of the URL when hashing, ensuring XC streams maintain their identity and channel associations even when account credentials or server URLs change. Supports both XC num and M3U tvg-chno/channel-number attributes. 2026-01-31 17:47:46 -06:00
signals.py fix(dvr): add DVR search/filters, fix in-progress scheduling, prevent duplicate recordings 2026-03-04 10:21:03 -06:00
tasks.py fix: resolve decode_responses migration bugs and user-limit regressions 2026-03-26 18:41:42 -05:00
urls.py Initial commit 2025-02-18 11:14:09 -06:00
utils.py Initial commit 2025-02-18 11:14:09 -06:00
views.py 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