Blue Vision (4 Viewers)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I will check the questions soon, but now dinner :)
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    The LatestMediaModel was not intended to be used as background model from any screen, but for usage inside MediaNavigation as WorkflowModel.

    So I decided to create an own LatestMediaModel for BlueVision skin which directly exposes the matching ItemLists (Videos, Series, Movies, Images, Audio, Recordings). The changes for model are commited.

    Next step for screen:
    XML:
            <Grid
             xmlns="www.team-mediaportal.com/2008/mpf/directx"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:collections="clr-namespace:MediaPortal.UI.Presentation.DataObjects;assembly=MediaPortal.UI"
             >
              <Grid.Resources>
                <Model x:Key="CurrentWeatherModel" Id="FC57FF5C-F72F-47E9-B973-338E31FF7FF1"/>
                <Model x:Key="LatestMediaModel" Id="19FBB179-51FB-4DB6-B19C-D5C765E9B870"/>
              </Grid.Resources>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
    
              <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" DataContext="{Binding Source={StaticResource LatestMediaModel}}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <ListView x:Name="MasterList" ItemsSource="{Binding Videos}" Style="{ThemeResource MediaItemsListListViewStyle}">
                </ListView>
              </Grid>
    
              <StackPanel Grid.Row="1" Grid.Column="1" >
                <Image  x:Name="SmallIcon" Source="{Binding Source={StaticResource CurrentWeatherModel}, Path=CurrentLocation.Condition.BigIconProperty}"
                  IsVisible="{Binding UseInHome}" HorizontalAlignment="Center" Margin="0,0,0,0"/>
    
                <Label  x:Name="Temp" Content="{Binding Source={StaticResource CurrentWeatherModel}, Path=CurrentLocation.Condition.Temperature}"
                   FontFamily="TitanBold" Color="{ThemeResource TextColor}" IsVisible="{Binding UseInHome}"
                   VerticalAlignment="Center" HorizontalAlignment="Center"/>
    
                <Label  x:Name="Place" Content="{Binding Source={StaticResource CurrentWeatherModel}, Path=CurrentLocation.Name}"
                   FontFamily="TitanBold" Color="{ThemeResource TextColor}" IsVisible="{Binding UseInHome}"
                   VerticalAlignment="Center" HorizontalAlignment="Center"/>
              </StackPanel>
            </Grid>
    Watch out for:
    • New ModelId (LatestMedia)
    • New Source for ListView (Videos here)
    • You copied FontNames from Titanium (TitanBold) which do not match to ApolloOne skin. Maybe remove them at all (fallback to default) or specify a valid one
    • You need to create matching ListView Styles for Videos, Series, etc. because the default styles depend on Media plugin for view mode selection (which we don't need here but use one style)
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,736
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Watch out for:
    • New ModelId (LatestMedia)
    • New Source for ListView (Videos here)
    • You copied FontNames from Titanium (TitanBold) which do not match to ApolloOne skin. Maybe remove them at all (fallback to default) or specify a valid one
    • You need to create matching ListView Styles for Videos, Series, etc. because the default styles depend on Media plugin for view mode selection (which we don't need here but use one style)

    Thanks a lot, that was really fast :)
    I'll try to adapt it during the weekend. If everything goes well the home screen can be ready for next weekly.
    I modified the styles for the Listview of latest MediaItems. It can be simplified later, but want to try it at first with minimum changes. I'll add below code to mediastyles.xaml.
    • New Model-ID used
    • Renaming of styles to allow coexistance with LAtestMediaPlugin
    • Columns="{x:confused:tatic latestmedia:LatestMediaModel.QUERY_LIMIT}" exchanged with Columns="2" (according to mock-up)
    • Removal of unncessary ListView Styles, only "GridItemsHost" remaining
    HTML:
    <Style x:Key="MediaItemsListListViewStyle_BV" BasedOn="{ThemeResource ContentsMenuListViewStyle}">
    <Setter Property="ItemTemplate"/> <!-- Don't inherit the ItemTemplate from ContentsMenuListViewStyle - It should remain null to make the SkinEngine choose an appropriate template -->
    <Setter Property="DataStringProvider" Value="{ThemeResource MediaItemDataStringProvider}"/>
    <Setter Property="ItemContainerStyle" Value="{ThemeResource MediaItemWithContextMenuContainerStyle}"/>
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type ListView}">
        <ScrollViewer CanContentScroll="True" Margin="5"
            HorizontalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <ItemsPresenter VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
        </ScrollViewer>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    <BindingSetter Property="ItemsPanel">
      <BindingSetter.BindingWrapper>
         <BindingWrapper>
        <BindingWrapper.Binding>
    
          <Binding.Source>
            <ItemsPanelTemplate>
              <VirtualizingWrapPanel x:Name="GridItemsHost" IsItemsHost="True"/>
                </ItemsPanelTemplate>
          </Binding.Source>
    
        </BindingWrapper.Binding>
         </BindingWrapper>
      </BindingSetter.BindingWrapper>
    </BindingSetter>
    </Style>
    
    <!-- Latest media styles -->
    <Model x:Key="MediaModel" Id="19FBB179-51FB-4DB6-B19C-D5C765E9B870"/>
    <Style x:Key="LatestMediaListViewStyle_BV" BasedOn="{ThemeResource MediaItemsListListViewStyle_BV}">
        <Setter Property="ItemsPanel">
        <Setter.Value>
            <ItemsPanelTemplate>
            <UniformGrid x:Name="ListItemsHost" Columns="2" IsItemsHost="True" />
            </ItemsPanelTemplate>
        </Setter.Value>
        </Setter>
    </Style>
    
    <DataTemplate x:Key="NestedMediaListDataTemplate_BV" DataType="{x:Type collections:ListItem}">
      <StackPanel>
         <Label Content="{Binding [Name]}" Color="{ThemeResource TextColor}" />
        <ListView x:Name="MediaItemsList" Style="{ThemeResource LatestMediaListViewStyle_BV}" ItemsSource="{Binding Items}"
            HorizontalAlignment="Stretch">
        <ListView.Resources>
            <Command x:Key="Menu_Command" Source="{StaticResource MediaModel}"
                Path="Select" Parameters="{LateBoundValue BindingValue={Binding}}"/>
        </ListView.Resources>
         </ListView>
      </StackPanel>
    </DataTemplate>
    
    <Style x:Key="NestedMediaListViewStyle_BV" BasedOn="{ThemeResource DefaultListViewStyle}">
    <Setter Property="ItemTemplate" Value="{ThemeResource NestedMediaListDataTemplate_BV}"/>
    </Style>
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,736
    3,501
    Stuttgart
    Home Country
    Germany Germany
    @morpheus_xx

    • The audio part from the LatestMediaModel seems to take also series, only the style is correct.
    • I think it would be better to switch off the refreshing every 10 seconds. The items are flickering. It would be enough, if the items are only loaded when the home screen is activated
    Unbenannt.jpg
     
    Last edited:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    The audio part from the LatestMediaModel seems to take also series, only the style is correct.
    Sorry. Typical copy & paste error due to less time. It's fixed now.
    I think it would be better to switch off the refreshing every 10 seconds. The items are flickering. It would be enough, if the items are only loaded when the home screen is activated
    I decreased the update interval to 30sec. The problem with your idea is, that the (actual) home screen is always activated. The HomeMenuModel could post update request messages to LatestMediaModel if the "home tab" (not the whole screen) get's selected. This can be done later if really required, but for now I'd go the simpler route.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Just throwing in that OnlineVideos can also provide latest videos, e.g. from your YouTube subscriptions ;)
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Good idea. In this case we would need a more universal architecture to allow plugins to register themself as a source for latest media. Not sure how we should then expose the ItemsLists then (probably back to the nested lists like done in Media plugin).
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,736
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Thanks Morpheus, now everything looks better. Regarding update interval it should be possible to use the event manager. Means whenever the group menu switches to HOME this event is used for refreshing.I think this is also what you proposed.
    So we have already Movies, Series, Audio, Recordings, Images, Online Movies, ... and the list could be longer. For future best would be, if the user can select what to show in the home screen, because there is not space for everything. But I'd say, we better start with a easy base layout and extend it step by step.

    The size I realize by ScaleTransform to the complete Listview, so previous styles can be still used.
    In case is brings performance issues please let me know :)
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,736
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Here the first screenshot of the new home screen :) Thanks to the changes in LatestMediaModel by morpheus it could be implemented faster than expected.
    Unbenannt.jpg

    Open points
    • Currently I use the MediaList in VideoHub as placeholder for the homescreen, because it can currently not be implemented directly instead of "sub-menu buttons" @morpheus_xx, I fear your idea is necessary. You mentioned, that other content could be set invisible and overlayed by home screen.
    • Though Morpheus increased the refresh rate to 30 seconds the flickering is annoying in these moments. There should be trigger from Eventhandler only when the "Home" symbol is selected in the group main menu
    • There is no focus frame for mediaitems. I could not find the reason yet ...DONE
    • Image grid style is generally not completed yet. Aspect ratio of posters will be different later ...DONE
    • News currently missing, I'll try to add in next step
    • (Only an idea: If weather or a news headline is focused, also details are shown in the bottom content area (currently it shows only infos for mediaitems)
    The homescreen is not ready for usage yet. For testing purposes you may download the zip-file and replace existing files in BlueVision plugin folder. Save the original ones, since you will be not able to see any normal mediainformation anymore! You can reach the dummy homescreen by selecting "movies". Restoring the original files will bring back normal functionality.
     

    Attachments

    • Desktop.7z
      9.4 KB
    Last edited:

    Users who are viewing this thread

    Top Bottom