Skip to content

Commit

Permalink
Added: MythTV to the list of protocols in the Browse Network Location…
Browse files Browse the repository at this point in the history
… dialog. Thanks to vdrfan for the pointers to existing code.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34611 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
dteirney committed Oct 10, 2010
1 parent a26ef29 commit f3121e9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions language/English/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,7 @@
<string id="20255">First logon, edit your profile</string>
<string id="20256">HTS Tvheadend client</string>
<string id="20257">VDR Streamdev client</string>
<string id="20258">MythTV client</string>

<string id="20300">Web server directory (HTTP)</string>
<string id="20301">Web server directory (HTTPS)</string>
Expand Down
13 changes: 12 additions & 1 deletion xbmc/GUIDialogNetworkSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ void CGUIDialogNetworkSetup::OnInitWindow()
pSpin->AddLabel(g_localizeStrings.Get(20171), NET_PROTOCOL_SMB);
pSpin->AddLabel(g_localizeStrings.Get(20256), NET_PROTOCOL_HTSP);
pSpin->AddLabel(g_localizeStrings.Get(20257), NET_PROTOCOL_VTP);
pSpin->AddLabel(g_localizeStrings.Get(20258), NET_PROTOCOL_MYTH);
pSpin->AddLabel(g_localizeStrings.Get(21331), NET_PROTOCOL_TUXBOX);
pSpin->AddLabel(g_localizeStrings.Get(20172), NET_PROTOCOL_XBMSP);
pSpin->AddLabel(g_localizeStrings.Get(20301), NET_PROTOCOL_HTTPS);
Expand Down Expand Up @@ -205,6 +206,8 @@ void CGUIDialogNetworkSetup::OnProtocolChange()
m_port = "9982";
else if (m_protocol == NET_PROTOCOL_VTP)
m_port = "2004";
else if (m_protocol == NET_PROTOCOL_MYTH)
m_port = "6543";

UpdateButtons();
}
Expand All @@ -231,7 +234,8 @@ void CGUIDialogNetworkSetup::UpdateButtons()
m_protocol != NET_PROTOCOL_UPNP &&
m_protocol != NET_PROTOCOL_TUXBOX &&
m_protocol != NET_PROTOCOL_HTSP &&
m_protocol != NET_PROTOCOL_VTP);
m_protocol != NET_PROTOCOL_VTP &&
m_protocol != NET_PROTOCOL_MYTH);
if (m_protocol == NET_PROTOCOL_FTP ||
m_protocol == NET_PROTOCOL_HTTP ||
m_protocol == NET_PROTOCOL_HTTPS ||
Expand Down Expand Up @@ -266,6 +270,7 @@ void CGUIDialogNetworkSetup::UpdateButtons()
m_protocol == NET_PROTOCOL_TUXBOX ||
m_protocol == NET_PROTOCOL_HTSP ||
m_protocol == NET_PROTOCOL_VTP ||
m_protocol == NET_PROTOCOL_MYTH ||
m_protocol == NET_PROTOCOL_RSS ||
m_protocol == NET_PROTOCOL_DAAP);

Expand All @@ -290,6 +295,7 @@ void CGUIDialogNetworkSetup::UpdateButtons()
m_protocol == NET_PROTOCOL_RSS ||
m_protocol == NET_PROTOCOL_HTSP ||
m_protocol == NET_PROTOCOL_VTP ||
m_protocol == NET_PROTOCOL_MYTH ||
m_protocol == NET_PROTOCOL_TUXBOX));
}

Expand Down Expand Up @@ -322,6 +328,8 @@ CStdString CGUIDialogNetworkSetup::ConstructPath() const
url.SetProtocol("htsp");
else if (m_protocol == NET_PROTOCOL_VTP)
url.SetProtocol("vtp");
else if (m_protocol == NET_PROTOCOL_MYTH)
url.SetProtocol("myth");
if (!m_username.IsEmpty())
{
url.SetUserName(m_username);
Expand All @@ -338,6 +346,7 @@ CStdString CGUIDialogNetworkSetup::ConstructPath() const
(m_protocol == NET_PROTOCOL_DAAP && !m_server.IsEmpty()) ||
(m_protocol == NET_PROTOCOL_HTSP) ||
(m_protocol == NET_PROTOCOL_VTP) ||
(m_protocol == NET_PROTOCOL_MYTH) ||
(m_protocol == NET_PROTOCOL_TUXBOX))
&& !m_port.IsEmpty() && atoi(m_port.c_str()) > 0)
{
Expand Down Expand Up @@ -376,6 +385,8 @@ void CGUIDialogNetworkSetup::SetPath(const CStdString &path)
m_protocol = NET_PROTOCOL_HTSP;
else if (protocol == "vtp")
m_protocol = NET_PROTOCOL_VTP;
else if (protocol == "myth")
m_protocol = NET_PROTOCOL_MYTH;
else if (protocol == "rss")
m_protocol = NET_PROTOCOL_RSS;
else
Expand Down
1 change: 1 addition & 0 deletions xbmc/GUIDialogNetworkSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class CGUIDialogNetworkSetup :
NET_PROTOCOL_RSS,
NET_PROTOCOL_HTSP,
NET_PROTOCOL_VTP,
NET_PROTOCOL_MYTH,
NET_PROTOCOL_TUXBOX};
CGUIDialogNetworkSetup(void);
virtual ~CGUIDialogNetworkSetup(void);
Expand Down
4 changes: 4 additions & 0 deletions xbmc/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ CStdString CUtil::GetTitleFromPath(const CStdString& strFileNameAndPath, bool bI
// VDR Streamdev client
else if (url.GetProtocol() == "vtp")
strFilename = g_localizeStrings.Get(20257);

// MythTV client
else if (url.GetProtocol() == "myth")
strFilename = g_localizeStrings.Get(20258);

// SAP Streams
else if (url.GetProtocol() == "sap" && strFilename.IsEmpty())
Expand Down

0 comments on commit f3121e9

Please sign in to comment.