Dispatcharr/apps
FiveBoroughs bbe1f6364b Fix: Preserve stream order in ChannelSerializer PATCH/PUT responses
The ChannelSerializer.to_representation() method was not respecting the
ChannelStream.order field when serializing PATCH/PUT responses. This
caused streams to be returned in an arbitrary order rather than the
order specified in the request.

The update() method correctly saves the stream order to the database
using the ChannelStream.order field, and GET requests (with
include_streams=True) correctly return ordered streams via
get_streams(). However, standard PATCH/PUT responses were using
PrimaryKeyRelatedField which doesn't respect the ordering.

This fix ensures that all representations (GET, PATCH, PUT) return
streams ordered by the channelstream__order field.

Impact:
- PATCH/PUT responses now correctly reflect the stream order saved
- Clients can trust the response data without needing a follow-up GET
- No breaking changes - only fixes inconsistent behavior

Tested with:
- PATCH request with ordered stream IDs
- Verified response matches request order
- Verified GET request confirms order persisted to database
2025-11-16 23:29:17 +01:00
..
accounts Enhance UserViewSet queryset to prefetch related channel_profiles for improved performance 2025-09-14 19:47:40 -05:00
api Init Plugins 2025-09-05 17:10:11 -05:00
channels Fix: Preserve stream order in ChannelSerializer PATCH/PUT responses 2025-11-16 23:29:17 +01:00
dashboard modified database fields for consistency, removed custom_url from streams (no longer needed) 2025-03-16 09:07:10 -04:00
epg Enhancement: Add {endtime} as an available output for custom dummy epg. Convert {time} to {starttime} 2025-10-29 17:10:35 -05:00
hdhr Move tuner calculation to central location and use it to dynamically calculate tuner counts for XC api user_info 2025-08-28 15:26:51 -05:00
m3u Merge pull request #594 from 0x53c65c0a8bd30fff/truncated-channel-titles-fix 2025-10-30 16:53:30 -05:00
output Enhancement: For custom dummy epg's, use correct date for placeholders if provided. 2025-11-01 13:39:55 -05:00
plugins Fix incorrect paths for DVR and Plugins. 2025-09-13 11:49:04 -05:00
proxy Enhancement: Update TTL settings for client records and implement periodic refresh during active streaming 2025-10-31 11:53:16 -05:00
vod Enhancement: Add auto-enable settings for new groups and categories in M3U and VOD components 2025-10-09 15:28:37 -05:00