Skip to content
Browse files

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


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...
1 parent 40c8de1 commit f19c6108ad4b9b75fa25993a34cef1d0dbb1695d Paul Harrison committed Aug 10, 2011
Showing with 6 additions and 0 deletions.
  1. +5 −0 mythtv/libs/libmythui/mythuiwebbrowser.cpp
  2. +1 −0 mythtv/libs/libmythui/mythuiwebbrowser.h
5 mythtv/libs/libmythui/mythuiwebbrowser.cpp
@@ -295,6 +295,11 @@ bool MythWebPage::extension(Extension extension, const ExtensionOption *option,
return false;
+QString MythWebPage::userAgentForUrl(const QUrl &url) const
+ return QWebPage::userAgentForUrl(url).replace("Safari", "MythBrowser");
* @class MythWebView
* @brief Subclass of QWebView
1 mythtv/libs/libmythui/mythuiwebbrowser.h
@@ -65,6 +65,7 @@ class MythWebPage : public QWebPage
virtual bool supportsExtension (Extension extension) const;
+ virtual QString userAgentForUrl(const QUrl &url) const;
friend class MythWebView;

0 comments on commit f19c610

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