Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MythBrowser: Change the user-agent string reported by the browser wid…

…get.

This replaces the name 'Safari' with 'MythBrowser' in the default user-agent
string sent by MythBrowser. This fixes a problem with the BBC iPlayer thinking
we are running on an unsupported mobile phone and refusing to do anything!
  • Loading branch information...
commit f19c6108ad4b9b75fa25993a34cef1d0dbb1695d 1 parent 40c8de1
Paul Harrison authored
5 mythtv/libs/libmythui/mythuiwebbrowser.cpp
@@ -295,6 +295,11 @@ bool MythWebPage::extension(Extension extension, const ExtensionOption *option,
295 295 return false;
296 296 }
297 297
  298 +QString MythWebPage::userAgentForUrl(const QUrl &url) const
  299 +{
  300 + return QWebPage::userAgentForUrl(url).replace("Safari", "MythBrowser");
  301 +}
  302 +
298 303 /**
299 304 * @class MythWebView
300 305 * @brief Subclass of QWebView
1  mythtv/libs/libmythui/mythuiwebbrowser.h
@@ -65,6 +65,7 @@ class MythWebPage : public QWebPage
65 65 virtual bool supportsExtension (Extension extension) const;
66 66
67 67 protected:
  68 + virtual QString userAgentForUrl(const QUrl &url) const;
68 69
69 70 private:
70 71 friend class MythWebView;

0 comments on commit f19c610

Please sign in to comment.
Something went wrong with that request. Please try again.