[mythtv-commits] Ticket #11218: streaming radio does not follow redirects
MythTV
noreply at mythtv.org
Sat Nov 3 16:14:15 UTC 2012
#11218: streaming radio does not follow redirects
----------------------------------+-----------------------------
Reporter: dekarl@… | Owner:
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: Plugin - MythMusic | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
----------------------------------+-----------------------------
Comment (by paulh <mythtv@…>):
Actually this is a problem with the DownloadManager not with MythMusic.
What happens is the downloaded file ends up containing both the text from
the redirect message and the text from the final redirected file like
this:-
{{{
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a
HREF="http://play.radioseven.se/128.pls">here</a></body>[playlist]
File1=http://sc1.radioseven.se:80
Title1=Radioseven - www.radioseven.se
Length1=-1
File2=http://sc1.radioseven.se:8500
Title2=Radioseven - www.radioseven.se
Length2=-1
File3=http://sc9.radioseven.se:8500
Title3=Radioseven - www.radioseven.se
Length3=-1
File4=http://sc2.radioseven.se:8500
Title4=Radioseven - www.radioseven.se
Length4=-1
File5=http://sc8.radioseven.se:8500
Title5=Radioseven - www.radioseven.se
Length5=-1
File6=http://sc3.radioseven.se:8500
Title6=Radioseven - www.radioseven.se
Length6=-1
NumberOfEntries=6
Version=2
}}}
This patch fixes the problem but there is probably a better way to do it.
Hopefully it will give whoever reviews this something to work with.
{{{
diff --git a/mythtv/libs/libmythbase/mythdownloadmanager.cpp
b/mythtv/libs/libmythbase/mythdownloadmanager.cpp
index cc1721b..68aa0c2 100644
--- a/mythtv/libs/libmythbase/mythdownloadmanager.cpp
+++ b/mythtv/libs/libmythbase/mythdownloadmanager.cpp
@@ -1032,6 +1032,8 @@ void
MythDownloadManager::downloadFinished(MythDownloadInfo *dlInfo)
request.setRawHeader("User-Agent",
"MythDownloadManager v"
MYTH_BINARY_VERSION);
+ dlInfo->m_bytesReceived = 0;
+
switch (dlInfo->m_requestType)
{
case kRequestPost :
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11218#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list