partially watched video/song/recorded tv show file text color + remember cursor in folders (1 Viewer)

CyberSimian

Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    <playingColor min="5" max="90">ff000000</playingColor>
    How does this interact with the existing <playedColor> tag with the existing played-threshhold defined in "MP Config"? I am not against an enhancement in this area, provided that:

    (1) Existing skins that are not changed will continue to work as intended by the skin author.

    (2) We do not end up with two schemes that are disjoint (i.e. mutually exclusive). I would prefer to see a scheme where the enhancement is a superset of the existing support (i.e. the existing support is simply a subset of the new support). Does your scheme provide this?

    Please describe clearly how the existing and new schemes relate to each other.

    -- from CyberSimian in the UK
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,496
    10,377
    Kyiv
    Home Country
    Ukraine Ukraine
    How does this interact with the existing <playedColor> tag with the existing played-threshhold defined in "MP Config"? I am not against an enhancement in this area, provided that:
    If PlayingColor not defined then used PlayColor ... Those. Nothing should change ...
    Existing skins that are not changed will continue to work as intended by the skin author.
    Yes
    We do not end up with two schemes that are disjoint (i.e. mutually exclusive). I would prefer to see a scheme where the enhancement is a superset of the existing support (i.e. the existing support is simply a subset of the new support). Does your scheme provide this?
    I do not quite understand what it was about.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    I think that this proposed change is a worthwhile enhancement, and I would probably use it myself. However, I am not so happy with the proposed implementation.

    Suggested design
    In my view we should offer this enhancement in a manner that is as consistent as possible with the existing support. We currently have a setting in "MP Config" that allows the user to specify the threshhold that separates unwatched recordings and videos from watched recordings and videos. The consistent approach is to add another setting to "MP Config" to separate unwatched from partly-watched. So "MP Config" might have something like this:

    Played time percentage needed to mark the video as partly watched (0-100%)
    Played time percentage needed to mark the video as fully watched (0-100%)


    In the skin, we introduce the new tag suggested by @ajs , namely <playingColor>, but without any attributes (no "min" or "max"). Then the logic that the skin engine would use for selecting the colour would be:
    Code:
    if (played_percent >= fully_watched_threshhold)
      color = <playedColor>;
    else if (played_percent >= partly_watched_threshhold)
      color = <playingColor>;
    else
      color = <textcolor>;

    Note that if partly_watched_threshhold >= fully_watched_threshhold, <playingColor> is never used.

    Compatibility
    In previous releases, if the played percent was less than the fully-watched threshhold, the item was displayed with <textcolor>. Skins which are moribund (or not updated with this change) will lack the <playingColor> tag, so defaults need to be such that there is no change in the appearance of those skins.

    No change in the appearance of moribund skins can be achieved by setting partly-watched threshhold equal to fully-watched threshhold in "MediaPortal.xml" when the user installs the new version of MP (this should be done automatically as part of the install process).

    In the window xml file, a control can omit tags where the default value is wanted. If a tag is omitted, the value is taken from the value specified by the default style in "references.xml". If the tag is also omitted from the style in "references.xml", the value specified by the hard-coded built-in defaults in the skin engine is used. A suitable hard-coded default needs to be chosen for <playingColor> for the skin engine. This should probably follow the existing convention used for the other numerous <xxxColor> tags.

    Where do we go from here
    If the modified DLL that @ajs has provided to the original poster works as intended, there is no reason why the original poster shouldn't continue using it until the next release (MP 1.21). However, I think that the implementation should be reworked as outlined above, before being made available in an MP build.

    -- from CyberSimian in the UK
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,496
    10,377
    Kyiv
    Home Country
    Ukraine Ukraine
    settings are many, and can be located in different places. but. the facade is one and it's in the kernel and he does not know what module it called and what setting to read. I'm against setting up a lot of settings.

    --
    WBR, ajs :):whistle::coffee:
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,496
    10,377
    Kyiv
    Home Country
    Ukraine Ukraine
    Then the logic that the skin engine would use for selecting the colour would be:
    C#:
        [XMLSkinElement("playingColor")] protected long _playingColor = -1;
        [XMLSkin("playingColor", "min")] protected int _playingPercentageMin = 5;
        [XMLSkin("playingColor", "max")] protected int _playingPercentageMax = 95;
    C#:
          if (_playingColor == -1)
          {
            _playingColor = _playedColor;
          }
    C#:
              // override text color if item is currently playing
              if (item.HasProgressBar && item.ProgressBarPercentage >= _playingPercentageMin && item.ProgressBarPercentage <= _playingPercentageMax)
              {
                color = _playingColor;
              }
     

    mathem

    Portal Pro
    May 20, 2018
    55
    16
    Home Country
    Germany Germany
    So the news are that I dont know which file to change :)
    btw, refresh rate broken again :)

    thx for the work!
    @ajs
     
    Last edited:

    Users who are viewing this thread

    Top Bottom