Plugin support (1 Viewer)

ge2301

MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,710
    2,416
    Stuttgart
    Germany Germany
    Country flag
    I think this is the reason why skin files needs to be placed inside the plugin which has the code:
    If you put in an assembly reference this way, the lookup considers all loaded assemblies. Of course BlueVision doesn't have (and must not have) any direct depency to another plugin.
    Could you try to place your modified skin files under OV2 plugin first to see if they are working from this location?
    If I understood you correctly I did so. I'm only working in the Bluevision skin folder of OV2 plugin.

    In ovsSiteMangement.xaml there is this code (and I see the logo in the options view):
    HTML:
                        <Image DockPanel.Dock="Right" Stretch="Uniform" VerticalAlignment="Top"
                               Source="{Binding ElementName=siteslist, Path=CurrentItem, Converter={ThemeResource ovsSiteUtilIconConverter}}"/>
    I tried to copy exactly the same code to sites.xaml and it does not show a logo. I considered the resources as you see below in the complete code of sites.xaml:
    HTML:
    <?xml version="1.0" encoding="utf-8"?>
    <Include
        xmlns="www.team-mediaportal.com/2008/mpf/directx"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ovs="clr-namespace:OnlineVideos.MediaPortal2;assembly=OnlineVideos.MediaPortal2"
        Source="screens\master_bare.xaml">
      <Include.Resources>
    
        <Model x:Key="OnlineVideosModel" Id="C418243F-5BD3-4637-8871-DA6545387929"/>
        <ovs:SiteUtilIconConverter x:Key="ovsSiteUtilIconConverter"/>
    
        <!-- Contents -->
        <ControlTemplate x:Key="Client_Template">
          <DockPanel DataContext="{Binding Source={StaticResource OnlineVideosModel}}" LastChildFill="true">
    
            <ListView x:Name="siteslist" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DockPanel.Dock="Center"
                      Style="{ThemeResource ovsSitesListViewStyle}" Margin="-30, 0,-45,-5"
                      CurrentItem="{Binding Path=FocusedSite, Mode=OneWayToSource}"
                      ItemsSource="{Binding Path=SitesList}" SetFocusPrio="RestoreState"/>
    
            <StackPanel Orientation="Vertical" DockPanel.Dock="Center" VerticalAlignment="Bottom" Margin="0,625,0,-625" >
    
              <Image  Stretch="Uniform" VerticalAlignment="Top"
                     Source="{Binding ElementName=siteslist, Path=CurrentItem, Converter={ThemeResource ovsSiteUtilIconConverter}}"/>
    
              <Label Color="{ThemeResource TextColor}"
                       HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                       DataContext="{Binding ElementName=siteslist,Path=CurrentItem}" Content="{Binding Path=Name}" />
              <Label Color="{ThemeResource TextColor}" Opacity="0.6"
                       HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Wrap="True" Scroll="Auto"
                       DataContext="{Binding ElementName=siteslist,Path=CurrentItem}"
                       Content="{Binding Description}" />
            
            </StackPanel>
    
          </DockPanel>
        </ControlTemplate>
      </Include.Resources>
    </Include>
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,487
    7,020
    Germany Germany
    Country flag
    Ah ok. Then we need to check OV2 itself.

    same code to sites.xaml
    In ovsSiteMangement.xaml
    From your both quotes (without checking xaml) I guess the two screens are using different backing models, so properties might be different. Are the Model-ID and the DataContext of the controls the same in both screens?
     

    ge2301

    MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,710
    2,416
    Stuttgart
    Germany Germany
    Country flag
    From your both quotes (without checking xaml) I guess the two screens are using different backing models, so properties might be different. Are the Model-ID and the DataContext of the controls the same in both screens?
    The datacontext is different.
    The ovsSiteManagement.xaml uses DataContext="{Binding Source={StaticResource ovsSiteManagerModel}}"
    The Sites.xaml uses DataContext="{Binding Source={StaticResource OnlineVideosModel}}"

    EDIT:
    Also OnlineVideosStyle.xaml uses the same code to show the image and there its starting with: <DataTemplate x:Key="ovsOnlineSiteItemDataTemplate" DataType="{x:Type ovs:OnlineSiteViewModel}">
     
    Last edited:

    ge2301

    MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,710
    2,416
    Stuttgart
    Germany Germany
    Country flag
    In OV it was quite easy to change the button style, because it can be defined in ovsSiteItemContainerStyle.
    HTML:
        <Style x:Key="ovsSitesListViewStyle" TargetType="{x:Type ListView}">
            <Setter Property="Template" Value="{ThemeResource ovsListViewTemplate}"/>
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <WrapPanel IsItemsHost="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="{ResolutionResource ovsSitesPanelMargin}"/>
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="ItemTemplate" Value="{ThemeResource ovsSiteItemDataTemplate}"/>
            <Setter Property="ItemContainerStyle" Value="{ThemeResource ovsSiteItemContainerStyle}"/>
            <Setter Property="DataStringProvider" Value="{ThemeResource DefaultItemDataStringProvider}"/>
        </Style>
    For news there is no style setter. Changing the "BasedOn" does not work.
    HTML:
      <Style x:Key="NewsFeedsContainerStyle" BasedOn="{ThemeResource MenuListViewStyle}">
        <Setter Property="ItemTemplate" Value="{ThemeResource NewsFeedDataTemplate}" />
      </Style>
    How can I switch to the framed focus button? :unsure: Added a second setter "ItemContainerStyle" and adding a to OV comparable code behind made MP2 fall back to standard skin.
     

    ge2301

    MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,710
    2,416
    Stuttgart
    Germany Germany
    Country flag
    @morpheus_xx
    I installed the latest version of WebRadio for MP2. With Titanum skin it seems to work well. With BlueVision it is veeery slow and generating lot's of failures :( A few times I had to close MP2 by task manager.
    I was going to create a BV specific skin, since I like this plugin. But at first it should be clarified why it's causing trouble with BV. I checked also ApolloOne, it's the same problem. Do you have an idea from the logs. I thought it's better to ask you first instead of contacting BigGranu, who can most probably not say too much about BV.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,930
    2,234
    Ba-Wü
    Germany Germany
    Country flag

    ge2301

    MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,710
    2,416
    Stuttgart
    Germany Germany
    Country flag

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,487
    7,020
    Germany Germany
    Country flag
    I installed the latest version of WebRadio for MP2. With Titanum skin it seems to work well. With BlueVision it is veeery slow and generating lot's of failures :( A few times I had to close MP2 by task manager.
    I fixed the issue. Reason was an empty ListView style, which lead to using a non-virtualization StackPanel. For the huge list of >10.000 web radio stations it causes a big performance issue.

    I've added missing styles to BlueVision, same changes still must be done for ApolloOne!
     
    Last edited:

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,487
    7,020
    Germany Germany
    Country flag
    @ge2301 I think it's mandatory to move the plugin-dependent styles out of BlueVision plugin folder.

    Once you have styles for OnlineVideos included, but don't have the plugin installed (like I have here), you cannot use BlueVision anymore, because of missing dependencies in styles. A fallback to "Default" then happens.

    This means, at least for all plugins which are not part of core installation, the styles must be placed in the plugin which needs them. Exceptions could be allowed for the inbuilt and used plugins like Weather and News (because we use them directly in HomeModel and should have clear references to them inside plugin.xml). But the real clean way would be to place all styles in their respective plugin.
     

    ge2301

    MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,710
    2,416
    Stuttgart
    Germany Germany
    Country flag
    @ge2301 I think it's mandatory to move the plugin-dependent styles out of BlueVision plugin folder.

    Once you have styles for OnlineVideos included, but don't have the plugin installed (like I have here), you cannot use BlueVision anymore, because of missing dependencies in styles. A fallback to "Default" then happens.

    This means, at least for all plugins which are not part of core installation, the styles must be placed in the plugin which needs them. Exceptions could be allowed for the inbuilt and used plugins like Weather and News (because we use them directly in HomeModel and should have clear references to them inside plugin.xml). But the real clean way would be to place all styles in their respective plugin.
    Oh, I'll move them out. The question is only where in GitHub I push them. I guess just to offer them seperately from the plugin for download is also not the ideal way.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    morpheus_xx [WiP] "What's New" plugin for MP2 upgrades MediaPortal 2 20
    da3dsoul [Request] An MVP Plugin example for custom settings in MP2 Plugin Development 2
    da3dsoul MP2 Plugin - Getting Started (Directory Tree and Player) Plugin Development 27
    M Installing Plugins Newcomers Forum 2
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 10
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 4
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    Similar threads

























    Top Bottom