Blue Vision (3 Viewers)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    We have a global "Rating" filed which is used for all kinds of media. But this isn't filled when it comes to Audio, only on movies and series... So you're right, I fear.

    BTW all the Exif data for pictures are also not stored. But this probably a bug in the image metadata extractor not an issue of the MIA structure...
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,736
    3,501
    Stuttgart
    Home Country
    Germany Germany
    I made some preparations for the series view style and I stuck at two points:
    • Is it possible to get by code the number of saisons of one series? (not from metadata, only the available ones)
    • To implement the un-/watched symbol for a series, I have to count the number of un-/watched episodes per series. Any idea how to do that? :unsure:
    Currently the main view is like this:
    series_view.jpg
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Is it possible to get by code the number of saisons of one series?

    I have to count the number of un-/watched episodes per series. Any idea how to do that?
    I've easily done both in MP2-Edit with a SQL Query, but I'm not sure if this is possible in a MP2 Skin...

    Here is the query I'm using for Seasons:
    'SELECT SEASON FROM M_SERIESITEM WHERE SERIESNAME = "SeriesName" ;' (You can also use TVDB-ID instead of SeriesName, but at the Time I do this query it's possible that some episodes did not have propper filled TVDB-ID filed. DId not know if this is fixed by the patch Realkane has done to the series MDE lately, as I didn't noticed this issue after applying the fix.
    Then you need to make the result unique as it will deliver an season entry for every episode in the DB.

    Playcount is a bit more tricky as you need to "INNER JOIN" tables for this 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 = "SeriesName" ;'

    Did not know if this helps.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,736
    3,501
    Stuttgart
    Home Country
    Germany Germany
    I've easily done both in MP2-Edit with a SQL Query, but I'm not sure if this is possible in a MP2 Skin...
    Here is the query I'm using for Seasons:
    'SELECT SEASON FROM M_SERIESITEM WHERE SERIESNAME = "SeriesName" ;' (You can also use TVDB-ID instead of SeriesName, but at the Time I do this query it's possible that some episodes did not have propper filled TVDB-ID filed. DId not know if this is fixed by the patch Realkane has done to the series MDE lately, as I didn't noticed this issue after applying the fix.
    Then you need to make the result unique as it will deliver an season entry for every episode in the DB.
    Playcount is a bit more tricky as you need to "INNER JOIN" tables for this 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 = "SeriesName" ;'
    Did not know if this helps.
    Thanks. Unfortunately something like this is not possible in xaml :(
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Isn't this a job for the data.binding layer? But I don't understand those things. I can imagine this is something that has to be done nevertheless in future...
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,736
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Isn't this a job for the data.binding layer? But I don't understand those things. I can imagine this is something that has to be done nevertheless in future...
    Yes, it's like that. But if you don't know what to bind it doesn't help ;)

    E.g. I do also not know how to bind the AlbumArtist. Changing "binding Artists" to "binding AlbumArtists" does not work ... Same for bitrate etc.

    Code:
                <Label x:Name="Artists" Grid.Row="0" Grid.Column="1"
                    Content="{Binding Artists}" Color="{ThemeResource TextColor}"/>

    Anyway currently it looks like this, better than nothing :
    Audio.jpg
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    E.g. I do also not know how to bind the AlbumArtist. Changing "binding Artists" to "binding AlbumArtists" does not work ... Same for bitrate etc.
    You need to use the https://github.com/MediaPortal/Medi...els/AspectWrappers/AudioAspectWrapper.cs#L248, bind the selected MediaItem to it. Inside the control you then can use {Binding Artists} as quoted above.

    Generally spoken: each MediaAspect has a WrapperClass (created by a tool when aspects are modified or created). The Name is always [Aspectxxx]Wrapper.
     

    Users who are viewing this thread

    Top Bottom