[mythtv-commits] Ticket #8634: tmdb.py metadata image download fails
MythTV
mythtv at cvs.mythtv.org
Sat Jul 3 04:10:32 UTC 2010
#8634: tmdb.py metadata image download fails
------------------------------------+---------------------------------------
Reporter: mcosta1quake@… | Owner: awithers
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: Plugin - MythVideo | Version: 0.23-fixes
Severity: medium | Mlocked: 0
------------------------------------+---------------------------------------
Comment(by anonymous):
The following diff fixes the issue. I don't know if the reformatting of
the http address to remove the :80 is correct. Subject to someone who is
better informed reviewing the changelist.
+++ mythvideo/mythvideo/videodlg.cpp (working copy)
@@ -137,10 +137,17 @@
public slots:
void InspectHeader(const QHttpResponseHeader &header)
{
- if (header.statusCode() == 302)
+ if (header.statusCode() == 302 || header.statusCode() == 301)
{
- QString m_redirectUrl = header.value("Location");
- m_redirectCount++;
+ QString redirectUrl = header.value("Location");
+ int iPos = redirectUrl.indexOf(":80");
+ if(iPos!=-1)
+ {
+ redirectUrl.remove(iPos,3);
+ }
+ m_redirectUrl = redirectUrl;
+ m_redirectCount++;
}
else if (header.statusCode() == 404)
{
@@ -186,6 +193,7 @@
if (!m_redirectUrl.isEmpty() && m_redirectCount <= 8)
{
m_url.setUrl(m_redirectUrl);
+ m_http.setHost(m_url.host());
m_data_buffer.reset();
StartCopy();
return;
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/8634#comment:3>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list