diff options
-rw-r--r-- | addons/resource.language.en_gb/resources/strings.po | 1 | ||||
-rw-r--r-- | addons/skin.estouchy/xml/DialogVideoInfo.xml | 2 | ||||
-rw-r--r-- | addons/skin.estuary/xml/DialogVideoInfo.xml | 103 | ||||
-rw-r--r-- | addons/skin.estuary/xml/Font.xml | 13 | ||||
-rw-r--r-- | addons/skin.estuary/xml/Variables.xml | 3 | ||||
-rw-r--r-- | xbmc/video/dialogs/GUIDialogVideoInfo.cpp | 42 | ||||
-rw-r--r-- | xbmc/video/windows/GUIWindowVideoBase.cpp | 4 |
7 files changed, 156 insertions, 12 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index da6b599f13..c7365ab87c 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -12819,6 +12819,7 @@ msgstr "" #: xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp #: xbmc/media/MediaTypes.cpp #: addons/skin.estuary/xml/Variables.xml +#: xbmc/video/dialogs/GUIDialogVideoInfo.cpp #: xbmc/view/GUIViewState.cpp #: system/settings/settings.xml msgctxt "#20342" diff --git a/addons/skin.estouchy/xml/DialogVideoInfo.xml b/addons/skin.estouchy/xml/DialogVideoInfo.xml index b1f326be4e..e53200b4b1 100644 --- a/addons/skin.estouchy/xml/DialogVideoInfo.xml +++ b/addons/skin.estouchy/xml/DialogVideoInfo.xml @@ -681,7 +681,7 @@ <alttexturefocus>list_focus.png</alttexturefocus> <alttexturenofocus>button_nofocus.png</alttexturenofocus> <altlabel>1024</altlabel> - <usealttexture>Container.Content(TVShows)</usealttexture> + <usealttexture>Container.Content(TVShows) | Container.Content(Sets)</usealttexture> </control> <control type="button" id="5"> <description>Cast/Review</description> diff --git a/addons/skin.estuary/xml/DialogVideoInfo.xml b/addons/skin.estuary/xml/DialogVideoInfo.xml index fc1af3fc53..63afdec878 100644 --- a/addons/skin.estuary/xml/DialogVideoInfo.xml +++ b/addons/skin.estuary/xml/DialogVideoInfo.xml @@ -262,12 +262,12 @@ <height>370</height> <onleft>50</onleft> <onright>50</onright> - <onup condition="System.hasAddon(script.extendedinfo) + Control.HasFocus(50)">RunScript(script.extendedinfo,info=extendedactorinfo,name=$INFO[Container(50).ListItem.Label])</onup> - <onup condition="!System.hasAddon(script.extendedinfo)">InstallAddon(script.extendedinfo)</onup> + <onup condition="System.hasAddon(script.extendedinfo) + Control.HasFocus(50) + !String.IsEqual(ListItem.DBType,set)">RunScript(script.extendedinfo,info=extendedactorinfo,name=$INFO[Container(50).ListItem.Label])</onup> + <onup condition="!System.hasAddon(script.extendedinfo) + !String.IsEqual(ListItem.DBType,set)">InstallAddon(script.extendedinfo)</onup> <ondown>140</ondown> <scrolltime>200</scrolltime> <orientation>horizontal</orientation> - <itemlayout height="317" width="245"> + <itemlayout height="317" width="245" condition="!Container.Content(Sets)"> <control type="group"> <top>10</top> <control type="image"> @@ -318,7 +318,7 @@ </control> </control> </itemlayout> - <focusedlayout height="317" width="245"> + <focusedlayout height="317" width="245" condition="!Container.Content(Sets)"> <control type="group"> <left>0</left> <top>10</top> @@ -379,6 +379,95 @@ </control> </control> </focusedlayout> + <itemlayout height="317" width="245" condition="Container.Content(Sets)"> + <control type="group"> + <top>10</top> + <control type="image"> + <top>0</top> + <width>264</width> + <height>317</height> + <texture>DefaultActorSolid.png</texture> + <aspectratio aligny="center">scale</aspectratio> + <bordertexture border="21">overlays/shadow.png</bordertexture> + <bordersize>20</bordersize> + </control> + <control type="image"> + <top>20</top> + <left>20</left> + <width>224</width> + <height>277</height> + <texture background="true">$INFO[ListItem.Thumb]</texture> + <aspectratio aligny="center">scale</aspectratio> + </control> + <control type="image"> + <left>20</left> + <width>224</width> + <height>180</height> + <bottom>10</bottom> + <texture>overlays/overlayfade.png</texture> + <animation effect="fade" start="100" end="80" time="0" condition="true">Conditional</animation> + </control> + <control type="textbox"> + <left>25</left> + <width>214</width> + <height>84</height> + <top>210</top> + <align>center</align> + <aligny>center</aligny> + <font>font23_narrow</font> + <label>$INFO[ListItem.Label]</label> + </control> + </control> + </itemlayout> + <focusedlayout height="317" width="245" condition="Container.Content(Sets)"> + <control type="group"> + <left>0</left> + <top>10</top> + <control type="image"> + <top>0</top> + <width>264</width> + <height>317</height> + <texture>DefaultActorSolid.png</texture> + <aspectratio aligny="center">scale</aspectratio> + <bordertexture border="21">overlays/shadow.png</bordertexture> + <bordersize>20</bordersize> + </control> + <control type="image"> + <top>20</top> + <left>20</left> + <width>224</width> + <height>277</height> + <texture background="true">$INFO[ListItem.Thumb]</texture> + <aspectratio aligny="center">scale</aspectratio> + </control> + <control type="image"> + <left>20</left> + <width>224</width> + <height>180</height> + <bottom>10</bottom> + <texture>overlays/overlayfade.png</texture> + <animation effect="fade" start="100" end="80" time="0" condition="true">Conditional</animation> + </control> + <control type="textbox"> + <left>25</left> + <width>214</width> + <height>84</height> + <top>210</top> + <align>center</align> + <aligny>center</aligny> + <font>font23_narrow</font> + <scroll>true</scroll> + <label>$INFO[ListItem.Label]</label> + </control> + <control type="image"> + <left>16</left> + <top>16</top> + <width>232</width> + <height>285</height> + <texture border="8" colordiffuse="button_focus">buttons/thumbnail_focused.png</texture> + </control> + </control> + </focusedlayout> </control> <control type="grouplist" id="5000"> <left>0</left> @@ -398,7 +487,7 @@ <param name="id" value="8" /> <param name="icon_on" value="icons/filemanager.png" /> <param name="icon_off" value="icons/infodialogs/play.png" /> - <param name="selected" value="String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)" /> + <param name="selected" value="String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season) | String.IsEqual(ListItem.DBType,set)" /> <param name="label" value="$VAR[VideoInfoPlayButtonLabelVar]" /> </include> <include content="InfoDialogButton"> @@ -434,7 +523,7 @@ <onleft>441</onleft> <onright>101</onright> <onup>140</onup> - <enable>String.IsEmpty(Container.PluginName)</enable> + <enable>String.IsEmpty(Container.PluginName) + !Container.Content(Sets)</enable> <ondown condition="Integer.IsEqual(Container(5000).CurrentItem,1)">SetFocus(50,0)</ondown> <ondown condition="Integer.IsEqual(Container(5000).CurrentItem,2)">SetFocus(50,1)</ondown> <ondown condition="Integer.IsEqual(Container(5000).CurrentItem,3)">SetFocus(50,2)</ondown> @@ -547,7 +636,7 @@ <height>70</height> <include>MediaFlags</include> <control type="group"> - <visible>Control.HasFocus(50)</visible> + <visible>Control.HasFocus(50) + !String.IsEqual(ListItem.DBType,set)</visible> <animation effect="fade" time="200">VisibleChange</animation> <top>10</top> <left>0</left> diff --git a/addons/skin.estuary/xml/Font.xml b/addons/skin.estuary/xml/Font.xml index f03832195f..c40eb380f9 100644 --- a/addons/skin.estuary/xml/Font.xml +++ b/addons/skin.estuary/xml/Font.xml @@ -27,6 +27,13 @@ <style>lighten</style> </font> <font> + <name>font23_narrow</name> + <filename>NotoSans-Regular.ttf</filename> + <size>23</size> + <style>lighten</style> + <linespacing>0.8</linespacing> + </font> + <font> <name>font25_narrow</name> <filename>NotoSans-Regular.ttf</filename> <size>25</size> @@ -150,6 +157,12 @@ <size>30</size> </font> <font> + <name>font23_narrow</name> + <filename>arial.ttf</filename> + <size>23</size> + <linespacing>0.8</linespacing> + </font> + <font> <name>font25_narrow</name> <filename>arial.ttf</filename> <size>25</size> diff --git a/addons/skin.estuary/xml/Variables.xml b/addons/skin.estuary/xml/Variables.xml index 30910fb630..3bcb9945f8 100644 --- a/addons/skin.estuary/xml/Variables.xml +++ b/addons/skin.estuary/xml/Variables.xml @@ -257,11 +257,12 @@ <value>[COLOR grey]$INFO[ListItem.Year, (,)][/COLOR]</value> </variable> <variable name="VideoInfoMainLabelVar"> + <value condition="String.IsEqual(ListItem.DBType,set)">$INFO[ListItem.Title]</value> <value condition="!String.IsEmpty(ListItem.Title)">$INFO[ListItem.Title]$INFO[ListItem.Year, ([COLOR grey],[/COLOR])]</value> <value>$INFO[ListItem.Label]$INFO[ListItem.Year, ([COLOR grey],[/COLOR])]</value> </variable> <variable name="VideoInfoPlayButtonLabelVar"> - <value condition="String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)">$LOCALIZE[1024]</value> + <value condition="String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season) | String.IsEqual(ListItem.DBType,set)">$LOCALIZE[1024]</value> <value>$LOCALIZE[208]</value> </variable> <variable name="VideoInfoSubLabelVar"> diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp index 14935c1283..2ed2b5c7f3 100644 --- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp @@ -205,7 +205,14 @@ bool CGUIDialogVideoInfo::OnMessage(CGUIMessage& message) if (iItem < 0 || iItem >= m_castList->Size()) break; std::string strItem = m_castList->Get(iItem)->GetLabel(); - OnSearch(strItem); + if (m_movieItem->GetVideoInfoTag()->m_type == MediaTypeVideoCollection) + { + SetMovie(m_castList->Get(iItem).get()); + Close(); + Open(); + } + else + OnSearch(strItem); } } } @@ -241,8 +248,8 @@ void CGUIDialogVideoInfo::OnInitWindow() CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_REFRESH, (profileManager->GetCurrentProfile().canWriteDatabases() || g_passwordManager.bMasterUser) && !StringUtils::StartsWithNoCase(m_movieItem->GetVideoInfoTag()->GetUniqueID(), "xx")); CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_GET_THUMB, (profileManager->GetCurrentProfile().canWriteDatabases() || g_passwordManager.bMasterUser) && !StringUtils::StartsWithNoCase(m_movieItem->GetVideoInfoTag()->GetUniqueID().c_str() + 2, "plugin")); - // Disable video user rating button for plugins as they don't have tables to save this - CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_USERRATING, !m_movieItem->IsPlugin()); + // Disable video user rating button for plugins and sets as they don't have tables to save this + CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_USERRATING, !m_movieItem->IsPlugin() && m_movieItem->GetVideoInfoTag()->m_type != MediaTypeVideoCollection); VIDEODB_CONTENT_TYPE type = static_cast<VIDEODB_CONTENT_TYPE>(m_movieItem->GetVideoContentType()); if (type == VIDEODB_CONTENT_TVSHOWS || type == VIDEODB_CONTENT_MOVIES) @@ -321,6 +328,18 @@ void CGUIDialogVideoInfo::SetMovie(const CFileItem *item) m_castList->Add(item); } } + else if (type == MediaTypeVideoCollection) + { + CVideoDatabase database; + database.Open(); + database.GetMoviesNav(m_movieItem->GetPath(), *m_castList, -1, -1, -1, -1, -1, -1, + m_movieItem->GetVideoInfoTag()->m_set.id, -1, + SortDescription(), VideoDbDetailsAll); + m_castList->Sort(SortBySortTitle, SortOrderDescending); + CVideoThumbLoader loader; + for (auto& item : *m_castList) + loader.LoadItem(item.get()); + } else { // movie/show/episode for (CVideoInfoTag::iCast it = m_movieItem->GetVideoInfoTag()->m_cast.begin(); it != m_movieItem->GetVideoInfoTag()->m_cast.end(); ++it) @@ -404,6 +423,10 @@ void CGUIDialogVideoInfo::Update() { SET_CONTROL_LABEL(CONTROL_BTN_TRACKS, 133); } + else if (m_movieItem->GetVideoInfoTag()->m_type == MediaTypeVideoCollection) + { + SET_CONTROL_LABEL(CONTROL_BTN_TRACKS, 20342); + } else { SET_CONTROL_LABEL(CONTROL_BTN_TRACKS, 206); @@ -600,6 +623,14 @@ void CGUIDialogVideoInfo::Play(bool resume) return; } + if (m_movieItem->GetVideoInfoTag()->m_type == MediaTypeVideoCollection) + { + std::string strPath = StringUtils::Format("videodb://movies/sets/%i/?setid=%i",m_movieItem->GetVideoInfoTag()->m_iDbId,m_movieItem->GetVideoInfoTag()->m_iDbId); + Close(); + CServiceBroker::GetGUI()->GetWindowManager().ActivateWindow(WINDOW_VIDEO_NAV,strPath); + return; + } + CFileItem movie(*m_movieItem->GetVideoInfoTag()); if (m_movieItem->GetVideoInfoTag()->m_strFileNameAndPath.empty()) movie.SetPath(m_movieItem->GetPath()); @@ -739,6 +770,11 @@ std::string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem) void CGUIDialogVideoInfo::OnGetArt() { + if (m_movieItem->GetVideoInfoTag()->m_type == MediaTypeVideoCollection) + { + ManageVideoItemArtwork(m_movieItem, m_movieItem->GetVideoInfoTag()->m_type); + return; + } std::string type = ChooseArtType(*m_movieItem); if (type.empty()) return; // cancelled diff --git a/xbmc/video/windows/GUIWindowVideoBase.cpp b/xbmc/video/windows/GUIWindowVideoBase.cpp index 06b7fe3c00..09ab680d2c 100644 --- a/xbmc/video/windows/GUIWindowVideoBase.cpp +++ b/xbmc/video/windows/GUIWindowVideoBase.cpp @@ -703,6 +703,10 @@ bool CGUIWindowVideoBase::OnItemInfo(int iItem) if (!m_vecItems->IsPlugin() && (item->IsPlugin() || item->IsScript())) return CGUIDialogAddonInfo::ShowForItem(item); + if (item->IsVideoDb() && + StringUtils::StartsWith(item->GetPath(), "videodb://movies/sets/")) + return ShowIMDB(item, nullptr, true); + ADDON::ScraperPtr scraper; if (!m_vecItems->IsPlugin() && !m_vecItems->IsRSS() && !m_vecItems->IsLiveTV()) { |