Blue Vision (5 Viewers)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Two recommendations:
    1. Don't define the color as constant here, but take a ThemeResource from colors (like few lines below: Color="{ThemeResource ButtonGradient1Color}"). Please check the colors.xaml (if not in BlueVision, then also check Default skin!), I think there is a color defined already. If not, add one like "ButtonFillColor")
    2. If you don't use a blue tone, but a semi transparent white, the color should fit both themes (due to combination with background color)
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,708
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Two recommendations:
    1. Don't define the color as constant here, but take a ThemeResource from colors (like few lines below: Color="{ThemeResource ButtonGradient1Color}"). Please check the colors.xaml (if not in BlueVision, then also check Default skin!), I think there is a color defined already. If not, add one like "ButtonFillColor")
    2. If you don't use a blue tone, but a semi transparent white, the color should fit both themes (due to combination with background color)
    I will adjust those and there and a few more similar items that you didn't realize yet ;)
    Tomorrow I'll have some time and I plan to start the home screen integration. I'll start with the easier part, means adding an entry to the group main menu and creating a blank screen. @morpheus_xx do you have any hints or comments that might help to do this?
    For the implementation of the details of the home screen I could find somebody, who is most probably willing to support :D. Actually he is professional software developer, active in this forum, but only as user. Let's see :X3:
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    A new idea for you to test:
    Now that we have the great event triggers available (thanks @osre!), we can add a click event on the player control: if you modify the OtherControls.xaml this way:
    XML:
      <ControlTemplate x:Key="PlayerControlVideoPrimary">
        <Rectangle x:Name="Video"  Width="300" Height="170" Margin="0,-5,-25,-5"
                   RadiusX="{ThemeResource PlayerControlBorderRadius}" RadiusY="{ThemeResource PlayerControlBorderRadius}">
          <Rectangle.Triggers>
            <EventTrigger RoutedEvent="UIElement.MouseDown">
              <TriggerCommand Command="{Command Source={Service WorkflowManager},Path=NavigatePush,Parameters=882C1142-8028-4112-A67D-370E6E483A33}"/>
            </EventTrigger>
          </Rectangle.Triggers>
          <Rectangle.Fill>
            <VideoBrush Stream="0"/>
          </Rectangle.Fill>
        </Rectangle>
      </ControlTemplate>
    You should be able to switch to fullscreen playback by a click on video frame in player control (you can add the Rectangle.Triggers also to secondary style).
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    [2015-03-15 08:43:53,166] [589354 ] [AMQ 'ScreenManager'] [DEBUG] - ScreenManager: Showing screen 'AudioFilterByArtist'
    [2015-03-15 08:43:53,171] [589359 ] [AMQ 'HomeMenuModel'] [ERROR] - Unhandled exception in message handler of async message queue 'HomeMenuModel' when handling a message of type 'UpdateMenu'
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
    at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
    at System.Collections.Generic.List`1.Enumerator.MoveNext()
    at MediaPortal.UI.SkinEngine.MarkupExtensions.BindingExtension.ResetChangeHandlerAttachments()
    at MediaPortal.UI.SkinEngine.MarkupExtensions.BindingExtension.GetSourceDataDescriptor(IDataDescriptor& result)
    at MediaPortal.UI.SkinEngine.MarkupExtensions.BindingExtension.UpdateSourceValue()
    at MediaPortal.UI.SkinEngine.MarkupExtensions.BindingExtension.OnBindingSourceChange(IObservable observable)
    @ge2301 I have added a single change to the DX11 dev branch. Can you "cherry pick" this single commit? https://github.com/MediaPortal/MediaPortal-2/commit/485cb5ab03d3ebe784d7f0ee03d028f5c185aa19. (see also http://www.ralfebert.de/git/cherry-pick/)

    It only adds locking to list access, this should avoid changes of the list during enumeration.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,708
    3,491
    Stuttgart
    Home Country
    Germany Germany
    @morpheus_xx In order to add the new group menu entry "Home", I have done following (The entries with "HOME" are new):

    HomeMenuModel.cs
    CSS:
        private void ReadPositions()
        {
          var menuSettings = ServiceRegistration.Get<ISettingsManager>().Load<MenuSettings>();
          if (menuSettings.MenuItems.Count == 0)
          {
            menuSettings.MainMenuGroupNames = new List<GroupItemSetting>
            {
              new GroupItemSetting { Name = MenuSettings.MENU_NAME_HOME,        Id = new Guid(MenuSettings.MENU_ID_HOME)},
              new GroupItemSetting { Name = MenuSettings.MENU_NAME_IMAGE,       Id = new Guid(MenuSettings.MENU_ID_IMAGE)},
              new GroupItemSetting { Name = MenuSettings.MENU_NAME_AUDIO,       Id = new Guid(MenuSettings.MENU_ID_AUDIO)},
              new GroupItemSetting { Name = MenuSettings.MENU_NAME_MEDIAHUB,    Id = new Guid(MenuSettings.MENU_ID_MEDIAHUB)},
              new GroupItemSetting { Name = MenuSettings.MENU_NAME_TV,          Id = new Guid(MenuSettings.MENU_ID_TV)},
              new GroupItemSetting { Name = MenuSettings.MENU_NAME_NEWS,        Id = new Guid(MenuSettings.MENU_ID_NEWS)},
              new GroupItemSetting { Name = MenuSettings.MENU_NAME_SETTINGS,    Id = new Guid(MenuSettings.MENU_ID_SETTINGS)},
              new GroupItemSetting { Name = MenuSettings.MENU_NAME_OTHERS,      Id = new Guid(MenuSettings.MENU_ID_OTHERS)}
            };
            menuSettings.DefaultIndex = 2;

    MenuSettings.cs
    HTML:
    namespace MediaPortal.UiComponents.BlueVision.Settings
    {
      public class MenuSettings
      {
        public const string MENU_NAME_AUDIO = "[Menu.Audio]";
        public const string MENU_ID_AUDIO = "1190A648-90F3-413D-88AC-DA89684E9766";
        public const string MENU_NAME_IMAGE = "[Menu.Image]";
        public const string MENU_ID_IMAGE = "E1748A80-347C-4E1A-8A26-DABEC246A540";
        public const string MENU_NAME_MEDIAHUB = "[Menu.MediaHub]";
        public const string MENU_ID_MEDIAHUB = "D887C930-3CFB-4FC5-A559-FFF6C8E30B25";
        public const string MENU_NAME_TV = "[Menu.TV]";
        public const string MENU_ID_TV = "E32BBACF-56C6-406E-9576-EA68271F053C";
        public const string MENU_NAME_WEATHER = "[Menu.Weather]";
        public const string MENU_ID_WEATHER = "F0E6117B-CF56-41E0-8171-CAA3F3544CC1";
        public const string MENU_NAME_NEWS = "[Menu.News]";
        public const string MENU_ID_NEWS = "D675D9BA-A27B-44B9-BC6B-8CF2DC7D220F";
        public const string MENU_NAME_SETTINGS = "[Menu.Settings]";
        public const string MENU_ID_SETTINGS = "9AD4076C-8F1F-4353-AF60-4F6C4238DCB7";
        public const string MENU_NAME_OTHERS = "[Menu.Others]";
        public const string MENU_ID_OTHERS = "D805F21B-0A1F-4323-BEB5-B108778F89AA";
        public const string MENU_NAME_HOME = "[Menu.Home]";
        public const string MENU_ID_HOME = "DF153D5E-0CD9-416c-B18B-E09AD5A864D8";

    In /images I have added a png file with the name "DF153D5E-0CD9-416c-B18B-E09AD5A864D8.png" as also for all other menu symbols.
    However no home-symbol is showing up after build process. Did I miss something?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    However no home-symbol is showing up after build process. Did I miss something?
    The settings are persisted and no changes will be applied after first init. The reason is, I'd like to offer users the possibility to move items around and define sizes as they want. In this case it will be bad to overwrite user settings with defaults again.

    You should delete the settings related .xml config from ProgramData folder. After next start the new defaults should be written to settings again.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,708
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Hi,

    small preview of coming changes:
    • "Home" symbol in Group Menu implemented (Currently homescreen is empty)
    • Only "unwatched" icons shown, no icon means watched
    • "New" icons (star shape) for mediaitems added recently
      • Question here: What shall be the criteria? 1) E.g. last 20 additions 2) all items added within last 2 weeks; both criterias have pros and contras
      • @morpheus, is there already a "added date" tag or something that could be used in xaml to bind the icon to mediaitems?
    • In grid and poster view overworked "unwatched" and "new" icons
    Unbenannt.jpg
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Looks great.(y)
    Especially the new "watched" logo is something I like to see.

    Don't know if it can be done in xaml but I would love to have a "Traffic Light" system for series and seasons. Red means no episodes watched and yellow means some, but not all episodes watched. Green could be for all episodes watched, but it can be left out completely, to be consistent, no problem... This information definitely is available in the DB and it is usable with a DB query. I did this in MP2-Edit so I'm sure it's working 100% reliable. But I don't know if this can be shown that easy in skin here... I really need this as this is one of the things I'm missing from MP1 the most...

    If someone want to have a look, here is the code I use to achieve this in MP2-Edit:
    Code:
            $query = 'SELECT PLAYCOUNT FROM M_MEDIAITEM INNER JOIN M_SERIESITEM ON M_MEDIAITEM.MEDIA_ITEM_ID = M_SERIESITEM.MEDIA_ITEM_ID Where M_SERIESITEM.SERIESNAME = "' & $series & '" ;' 
    
    
            $iRval = _SQLite_GetTable(-1, $query, $aResult, $iRows, $iColumns)
    
            _SQLite_QueryFinalize($iRval)
    
    
            $play2 = StringFormat ( "%03s"  ,$aResult[0] - 1)
    
            $coutall = Int($aResult[0] - 1)
    
    
            $query = 'SELECT PLAYCOUNT FROM M_MEDIAITEM INNER JOIN M_SERIESITEM ON M_MEDIAITEM.MEDIA_ITEM_ID = M_SERIESITEM.MEDIA_ITEM_ID WHERE M_MEDIAITEM.PLAYCOUNT IS NULL AND M_SERIESITEM.SERIESNAME = "' & $series & '" ;'
    
    
                $iRval = _SQLite_GetTable(-1, $query, $aResult, $iRows, $iColumns)
    
            _SQLite_QueryFinalize($iRval)
    
            $play = StringFormat ( "%03s"  ,$aResult[0] - 1) & "/" & $play2
    
            $coutsee = Int($aResult[0] - 1)
    
    
            ;Set Watchd Status Logo
    
            If $coutsee = 0 then
    
                GUICtrlSetImage($Picb3, @ScriptDir & "\Images\eye-green.gif")
    
            ElseIf $coutsee = $coutall Then
    
                GUICtrlSetImage($Picb3, @ScriptDir & "\Images\eye-red.gif")
    
            Else
    
                GUICtrlSetImage($Picb3, @ScriptDir & "\Images\eye-yellow.gif")
    
            EndIf
     

    Users who are viewing this thread

    Top Bottom