Blue Vision (3 Viewers)

ge2301

Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Audio languages are list of strings:
    • public IEnumerable<string> AudioLanguages
    , so you should be able to use a ListView on that Property and define ContentTemplates for your needs (I've not tested it yet).

    Shouldn't it work like following. I tried it with a list of labels at first. However nothing is shown ...

    HTML:
        <media:VideoAspectWrapper MediaItem="{Binding MediaItem}" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Margin="20,5,20,5">
          <media:VideoAspectWrapper.Template>
            <ControlTemplate>
              <Grid Grid.Row="0" Grid.Column="0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
    
                <ListView Grid.Row="0" Grid.Column="0" x:Name="AudioLanguageList" ItemsSource="{Binding AudioLanguages}"
                          HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                  <ListView.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Label Content="{Binding}" />
                      </StackPanel>
                    </DataTemplate>
                  </ListView.ItemTemplate>
                </ListView>
               
              </Grid>
            </ControlTemplate>
          </media:VideoAspectWrapper.Template>
        </media:VideoAspectWrapper>
     

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    873
    62
    NRW
    Home Country
    Germany Germany
    Hi @ge2301
    I've noticed, that latest media items in music part are titles. Is it possible to change them to albums?
    Best regards
    Helios
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Current LatestMediaModel can only handle single MediaItems, because it is done based on the added date and there is currently no connection between Tracks and Album or between episodes, season and series. Theoretically you could add the tracks of an album step by step and then the question is, how to handle the complete album from date point of view.

    Maybe after MIA rework it's an option, because then we have the necessary connections.
    But it's more a question to @morpheus_xx , since the model needs to be updated.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.
    As it's "freaking cold" ;) today I tried to localize "my" BlueVision. First thing I recognise is, the "news" and "weather" in home screen are not shown localized also the "rest" is in German...
    Zwischenablage-1.jpg


    and second. the font used for headlines did not have capital letters. Personally I don't like this that much so I want to change this font. Where can I find the definition which font to use?

    I've attached the strings_de.xml (also it probably would be better to do this on transiflex... :oops: )
     

    Attachments

    • strings_de.7z
      708 bytes

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Hi.
    As it's "freaking cold" ;) today I tried to localize "my" BlueVision. First thing I recognise is, the "news" and "weather" in home screen are not shown localized also the "rest" is in German...
    View attachment 166384

    and second. the font used for headlines did not have capital letters. Personally I don't like this that much so I want to change this font. Where can I find the definition which font to use?

    I've attached the strings_de.xml (also it probably would be better to do this on transiflex... :oops: )

    Weather and news were not localized strings. I have corrected this and I included your german localisation file.
    Everything is with capital letters in the beginning now.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Here how the MediaInfo part of CP screen will look like, after the code is 100% working (Subtitles must follow later, currently not part of MediaAspect. My opinion is, that at least embedded Subtitles should be shown.)
    Unbenannt.jpg
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    @ge2301 you just have replaced two images (WebRadio/Tools). Both came from grey theme, I moved them to common images so both themes can use them. So please
    Audio languages are list of strings:
    • public IEnumerable<string> AudioLanguages
    , so you should be able to use a ListView on that Property and define ContentTemplates for your needs (I've not tested it yet).

    Shouldn't it work like following. I tried it with a list of labels at first. However nothing is shown ...

    HTML:
        <media:VideoAspectWrapper MediaItem="{Binding MediaItem}" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Margin="20,5,20,5">
          <media:VideoAspectWrapper.Template>
            <ControlTemplate>
              <Grid Grid.Row="0" Grid.Column="0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
    
                <ListView Grid.Row="0" Grid.Column="0" x:Name="AudioLanguageList" ItemsSource="{Binding AudioLanguages}"
                          HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                  <ListView.ItemTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <Label Content="{Binding}" />
                      </StackPanel>
                    </DataTemplate>
                  </ListView.ItemTemplate>
                </ListView>
             
              </Grid>
            </ControlTemplate>
          </media:VideoAspectWrapper.Template>
        </media:VideoAspectWrapper>

    I could fix this issue by using a special ListView style. Problem is most probably caused by the DataStringProvider, which uses "[Name]" as default, which doesn't exist for strings.

    First add this style to OtherControls.xaml:
    XML:
     <DataTemplate x:Key="AudioLanguageItemDataTemplate" DataType="{x:Type collections:ListItem}">
      <DockPanel x:Name="ItemControl" LastChildFill="False">
      <Label x:Name="ItemLabel" DockPanel.Dock="Center" Content="{Binding}"
      HorizontalAlignment="Left" VerticalAlignment="Center"
      FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/>
      </DockPanel>
      </DataTemplate>
    
      <Style x:Key="AudioLanguageListViewStyle" TargetType="{x:Type ListView}" BasedOn="{ThemeResource DefaultListViewStyle}">
      <Setter Property="ItemTemplate" Value="{ThemeResource AudioLanguageItemDataTemplate}"/>
      <Setter Property="DataStringProvider" Value=""/>
      </Style>
    And then you can use:
    XML:
      <ListView Grid.Row="0" Grid.Column="0" x:Name="AudioLanguageList" ItemsSource="{Binding AudioLanguages}"
      HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
      Style="{ThemeResource AudioLanguageListViewStyle}" />
    If you like to put flags into list view, you need to extend AudioLanguageItemDataTemplate.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    @ge2301 I fixed some invalid RowSpan inside dialog_bare screen to avoid warnings to be logged.

    Additionally there is a minor problem remaining:
    [2015-07-05 15:29:05,295] [44014 ] [Thread52 ] [DEBUG] - WorkflowManager: Reactivating model context with workflow state 'ed255a07-4bb7-4fb8-9ebe-45cccdce1b5a' (old state was '04138763-42e6-49f1-ba51-ee3a9baa835d') in temporary deactivated workflow model '4cdd601f-e280-43b9-ad0a-6d7b2403c856'
    [2015-07-05 15:29:05,296] [44015 ] [Thread52 ] [DEBUG] - WorkflowManager: Tidying up...
    [2015-07-05 15:29:05,296] [44015 ] [Thread52 ] [INFO ] - WorkflowManager: Trying to show screen 'SeriesShowItems'...
    [2015-07-05 15:29:05,296] [44015 ] [Thread52 ] [INFO ] - WorkflowManager: Screen 'SeriesShowItems' successfully shown
    [2015-07-05 15:29:05,327] [44046 ] [DX Render] [WARN ] - Cannot open texture: MediaItem_OpacityMask.png

    --> this happens when you start playback and the player control shows the MI cover. The OpacityMask image was removed before, should we either restore it or remove the mask reference from XAML?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    I could fix this issue by using a special ListView style. Problem is most probably caused by the DataStringProvider, which uses "[Name]" as default, which doesn't exist for strings.

    First add this style to OtherControls.xaml:
    XML:
     <DataTemplate x:Key="AudioLanguageItemDataTemplate" DataType="{x:Type collections:ListItem}">
      <DockPanel x:Name="ItemControl" LastChildFill="False">
      <Label x:Name="ItemLabel" DockPanel.Dock="Center" Content="{Binding}"
      HorizontalAlignment="Left" VerticalAlignment="Center"
      FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/>
      </DockPanel>
      </DataTemplate>
    
      <Style x:Key="AudioLanguageListViewStyle" TargetType="{x:Type ListView}" BasedOn="{ThemeResource DefaultListViewStyle}">
      <Setter Property="ItemTemplate" Value="{ThemeResource AudioLanguageItemDataTemplate}"/>
      <Setter Property="DataStringProvider" Value=""/>
      </Style>
    And then you can use:
    XML:
      <ListView Grid.Row="0" Grid.Column="0" x:Name="AudioLanguageList" ItemsSource="{Binding AudioLanguages}"
      HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
      Style="{ThemeResource AudioLanguageListViewStyle}" />
    If you like to put flags into list view, you need to extend AudioLanguageItemDataTemplate.

    Great! Thats working (y)(y)
    I pushes the changes of MediaInfo screen in CP. It looks like this:
    upload_2015-7-5_23-8-41.png


    Missing:
    • Subtitles (can be added hopefully later)
    • Audio track infos of >1st track (Can be partly added later)
    • Aspect Ratio and Resolution (will follow after reason for incorrect output "NaN" is clarified)
    Everything is localized in English and German (TabButton headlines, ...).
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    @ge2301 I fixed some invalid RowSpan inside dialog_bare screen to avoid warnings to be logged.

    Additionally there is a minor problem remaining:
    [2015-07-05 15:29:05,295] [44014 ] [Thread52 ] [DEBUG] - WorkflowManager: Reactivating model context with workflow state 'ed255a07-4bb7-4fb8-9ebe-45cccdce1b5a' (old state was '04138763-42e6-49f1-ba51-ee3a9baa835d') in temporary deactivated workflow model '4cdd601f-e280-43b9-ad0a-6d7b2403c856'
    [2015-07-05 15:29:05,296] [44015 ] [Thread52 ] [DEBUG] - WorkflowManager: Tidying up...
    [2015-07-05 15:29:05,296] [44015 ] [Thread52 ] [INFO ] - WorkflowManager: Trying to show screen 'SeriesShowItems'...
    [2015-07-05 15:29:05,296] [44015 ] [Thread52 ] [INFO ] - WorkflowManager: Screen 'SeriesShowItems' successfully shown
    [2015-07-05 15:29:05,327] [44046 ] [DX Render] [WARN ] - Cannot open texture: MediaItem_OpacityMask.png

    --> this happens when you start playback and the player control shows the MI cover. The OpacityMask image was removed before, should we either restore it or remove the mask reference from XAML?
    Done. Applied correct OpacityMask and added the universal shadow from Widgets.xaml
    I had missed this one, because most Opacity masks are in MediaStyles.xmal ...
     

    Users who are viewing this thread

    Top Bottom