From 17e1d6f7c85f31b06a1dbca013fea2430a3354f0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 12 Apr 2025 23:20:56 +0000 Subject: [PATCH 1/7] Increment build number to 1 [skip ci] --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index b4b893b7..bc619a81 100644 --- a/version.py +++ b/version.py @@ -2,4 +2,4 @@ Dispatcharr version information. """ __version__ = '0.2.0' # Follow semantic versioning (MAJOR.MINOR.PATCH) -__build__ = '0' # Auto-incremented on builds +__build__ = '1' # Auto-incremented on builds From 06028334caa4c27f3b1b575c9cba1504b7e77353 Mon Sep 17 00:00:00 2001 From: dekzter Date: Sun, 13 Apr 2025 07:44:35 -0400 Subject: [PATCH 2/7] fixing reference to null user_agents --- apps/proxy/ts_proxy/url_utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/proxy/ts_proxy/url_utils.py b/apps/proxy/ts_proxy/url_utils.py index f80aae75..f68b9b6b 100644 --- a/apps/proxy/ts_proxy/url_utils.py +++ b/apps/proxy/ts_proxy/url_utils.py @@ -58,7 +58,7 @@ def generate_stream_url(channel_id: str) -> Tuple[str, str, bool, Optional[int]] # Get the appropriate user agent m3u_account = M3UAccount.objects.get(id=m3u_profile.m3u_account.id) - stream_user_agent = UserAgent.objects.get(id=m3u_account.user_agent.id).user_agent + stream_user_agent = m3u_account.get_user_agent().user_agent if stream_user_agent is None: stream_user_agent = UserAgent.objects.get(id=CoreSettings.get_default_user_agent_id()) @@ -163,9 +163,7 @@ def get_stream_info_for_switch(channel_id: str, target_stream_id: Optional[int] # Get the user agent from the M3U account m3u_account = M3UAccount.objects.get(id=profile.m3u_account.id) - user_agent = UserAgent.objects.get(id=m3u_account.user_agent.id).user_agent - if not user_agent: - user_agent = UserAgent.objects.get(id=CoreSettings.get_default_user_agent_id()).user_agent + user_agent = m3u_account.get_user_agent().user_agent # Generate URL using the transform function directly stream_url = transform_url(stream.url, profile.search_pattern, profile.replace_pattern) From 8a6ef9e7634f572fd6d801db4d877d295afb596d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 13 Apr 2025 11:44:53 +0000 Subject: [PATCH 3/7] Increment build number to 2 [skip ci] --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index bc619a81..d7f3b47c 100644 --- a/version.py +++ b/version.py @@ -2,4 +2,4 @@ Dispatcharr version information. """ __version__ = '0.2.0' # Follow semantic versioning (MAJOR.MINOR.PATCH) -__build__ = '1' # Auto-incremented on builds +__build__ = '2' # Auto-incremented on builds From 319af59415eefee9a596b8b7288dbf215be0a174 Mon Sep 17 00:00:00 2001 From: dekzter Date: Sun, 13 Apr 2025 09:54:58 -0400 Subject: [PATCH 4/7] fixed websocket and m3u profile form --- frontend/src/App.jsx | 115 +++++++++++++++++++------------------ frontend/src/WebSocket.jsx | 4 +- 2 files changed, 59 insertions(+), 60 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index a57cd1b0..5aa5df23 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -85,65 +85,66 @@ const App = () => { withGlobalStyles withNormalizeCSS > - - - + + + + - - - - - {isAuthenticated ? ( - <> - } /> - } /> - } /> - } /> - } /> - } /> - - ) : ( - } /> - )} - - } - /> - + + + + + {isAuthenticated ? ( + <> + } /> + } /> + } /> + } /> + } /> + } /> + + ) : ( + } /> + )} + + } + /> + + - - - - - - - + + + + + + diff --git a/frontend/src/WebSocket.jsx b/frontend/src/WebSocket.jsx index 72533910..1d33565f 100644 --- a/frontend/src/WebSocket.jsx +++ b/frontend/src/WebSocket.jsx @@ -14,19 +14,17 @@ import useEPGsStore from './store/epgs'; import { Box, Button, Stack } from '@mantine/core'; import API from './api'; -export const WebsocketContext = createContext(false, null, () => {}); +export const WebsocketContext = createContext([false, () => {}, null]); export const WebsocketProvider = ({ children }) => { const [isReady, setIsReady] = useState(false); const [val, setVal] = useState(null); - const { fetchStreams } = useStreamsStore(); const { fetchChannels, setChannelStats, fetchChannelGroups } = useChannelsStore(); const { fetchPlaylists, setRefreshProgress, setProfilePreview } = usePlaylistsStore(); const { fetchEPGData, fetchEPGs } = useEPGsStore(); - const { playlists } = usePlaylistsStore(); const ws = useRef(null); From c44c3bc25bb225b7e0b0399feceadb1f74ef3a0e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 13 Apr 2025 13:55:25 +0000 Subject: [PATCH 5/7] Increment build number to 3 [skip ci] --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index d7f3b47c..cc33e9e9 100644 --- a/version.py +++ b/version.py @@ -2,4 +2,4 @@ Dispatcharr version information. """ __version__ = '0.2.0' # Follow semantic versioning (MAJOR.MINOR.PATCH) -__build__ = '2' # Auto-incremented on builds +__build__ = '3' # Auto-incremented on builds From a463d06140dac01f1703c5849194bcae25259f12 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Sun, 13 Apr 2025 10:02:30 -0500 Subject: [PATCH 6/7] Fixes stream preview. --- apps/channels/models.py | 6 +++--- apps/proxy/ts_proxy/views.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/channels/models.py b/apps/channels/models.py index 60c35923..deb66ae1 100644 --- a/apps/channels/models.py +++ b/apps/channels/models.py @@ -147,7 +147,7 @@ class Stream(models.Model): profile_id = redis_client.get(f"stream_profile:{self.id}") if profile_id: profile_id = int(profile_id) - return self.id, profile_id + return self.id, profile_id, None # Retrieve the M3U account associated with the stream. m3u_account = self.m3u_account @@ -174,10 +174,10 @@ class Stream(models.Model): if profile.max_streams > 0: redis_client.incr(profile_connections_key) - return self.id, profile.id # Return newly assigned stream and matched profile + return self.id, profile.id, None # Return newly assigned stream and matched profile # 4. No available streams - return None, None + return None, None, None def release_stream(self): """ diff --git a/apps/proxy/ts_proxy/views.py b/apps/proxy/ts_proxy/views.py index 32d552da..232b3d28 100644 --- a/apps/proxy/ts_proxy/views.py +++ b/apps/proxy/ts_proxy/views.py @@ -44,7 +44,7 @@ def stream_ts(request, channel_id): # Extract client user agent early for header in ['HTTP_USER_AGENT', 'User-Agent', 'user-agent']: - if header in request.META: + if (header in request.META): client_user_agent = request.META[header] logger.debug(f"[{client_id}] Client connected with user agent: {client_user_agent}") break From 83e9d19099923b96d4dcee20793c810eecd7104a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 13 Apr 2025 15:03:04 +0000 Subject: [PATCH 7/7] Increment build number to 4 [skip ci] --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index cc33e9e9..03f5bc1f 100644 --- a/version.py +++ b/version.py @@ -2,4 +2,4 @@ Dispatcharr version information. """ __version__ = '0.2.0' # Follow semantic versioning (MAJOR.MINOR.PATCH) -__build__ = '3' # Auto-incremented on builds +__build__ = '4' # Auto-incremented on builds