Skip to content

Commit

Permalink
Merge pull request xbmc#1722 from jmarshallnz/upnp_no_set_content
Browse files Browse the repository at this point in the history
[upnp] don't show 'set content' options on upnp sources
  • Loading branch information
jmarshallnz committed Nov 2, 2012
2 parents 0f6fb94 + 2acb9c1 commit 3dfa6ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion xbmc/dialogs/GUIDialogMediaSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ void CGUIDialogMediaSource::OnOK()
m_confirmed = true;
Close();
if (m_type == "video" && !URIUtils::IsLiveTV(share.strPath) &&
!share.strPath.Left(6).Equals("rss://"))
!share.strPath.Left(6).Equals("rss://") &&
!share.strPath.Left(7).Equals("upnp://"))
{
CGUIWindowVideoBase::OnAssignContent(share.strPath);
}
Expand Down
6 changes: 3 additions & 3 deletions xbmc/video/windows/GUIWindowVideoNav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ void CGUIWindowVideoNav::GetContextButtons(int itemNumber, CContextButtons &butt

if (!g_application.IsVideoScanning())
{
if (!item->IsLiveTV() && !item->IsPlugin() && !item->IsAddonsPath())
if (!item->IsLiveTV() && !item->IsPlugin() && !item->IsAddonsPath() && !URIUtils::IsUPnP(item->GetPath()))
{
if (info && info->Content() != CONTENT_NONE)
buttons.Add(CONTEXT_BUTTON_SET_CONTENT, 20442);
Expand Down Expand Up @@ -1056,7 +1056,7 @@ void CGUIWindowVideoNav::GetContextButtons(int itemNumber, CContextButtons &butt
buttons.Add(CONTEXT_BUTTON_RENAME, 118);
}
// add "Set/Change content" to folders
if (item->m_bIsFolder && !item->IsPlayList() && !item->IsSmartPlayList() && !item->IsLiveTV() && !item->IsPlugin() && !item->IsAddonsPath())
if (item->m_bIsFolder && !item->IsPlayList() && !item->IsSmartPlayList() && !item->IsLiveTV() && !item->IsPlugin() && !item->IsAddonsPath() && !URIUtils::IsUPnP(item->GetPath()))
{
if (!g_application.IsVideoScanning())
{
Expand Down Expand Up @@ -1087,7 +1087,7 @@ bool CGUIWindowVideoNav::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
{
//TODO should we search DB for entries from plugins?
if (button == CONTEXT_BUTTON_REMOVE_SOURCE && !item->IsPlugin()
&& !item->IsLiveTV() &&!item->IsRSS())
&& !item->IsLiveTV() &&!item->IsRSS() && !URIUtils::IsUPnP(item->GetPath()))
{
OnUnAssignContent(item->GetPath(),20375,20340,20341);
}
Expand Down

0 comments on commit 3dfa6ae

Please sign in to comment.