[Approved] Start Music with parameter (1 Viewer)

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    yep, and just another note for out wiki guys is you need an additional namespace MediaPortal.GUI.Views for ViewDefinition class.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    I did a quick test from an external plugin and was able to get the list of music/video views sucessfully ;)

    [COLLAPSE]
    Code:
    11/11/2010 11:12:49 AM [Info] 133, Artists
    11/11/2010 11:12:49 AM [Info] 528, Album Artists
    11/11/2010 11:12:49 AM [Info] 132, Albums
    11/11/2010 11:12:49 AM [Info] 135, Genres
    11/11/2010 11:12:49 AM [Info] 987, Years
    11/11/2010 11:12:49 AM [Info] 1052, Songs
    11/11/2010 11:12:49 AM [Info] 271, Top 100
    11/11/2010 11:12:49 AM [Info] 932, Favourites
    11/11/2010 11:12:49 AM [Info] 4558, Recently added
    11/11/2010 11:12:49 AM [Info] TEST, TEST
    11/11/2010 11:12:49 AM [Info] 135, Genres
    11/11/2010 11:12:49 AM [Info] 344, Actors
    11/11/2010 11:12:49 AM [Info] 369, Title
    11/11/2010 11:12:49 AM [Info] 987, Years
    [/COLLAPSE]
     

    trevor

    Portal Pro
    October 17, 2006
    1,601
    952
    Chelmsford
    Home Country
    United Kingdom United Kingdom
    Hi,


    Just been testing this and found that only works if hyperlink to 504 (mymusicgenres), is this intentional or should hyperlinking to 501 (mymusicsongs) also support this?


    edit: just looked at the patch, should have done that first - so the question is more should this also be supported when hyperlinking to 501?

    thx
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Just been testing this and found that only works if hyperlink to 504 (mymusicgenres), is this intentional or should hyperlinking to 501 (mymusicsongs) also support this?
    Yep this was intentional, in fact I don't understand when 501 should be loaded directly....

    when it loads you get
    Code:
          if (MusicState.StartWindow != GetID)
          {
            GUIWindowManager.ReplaceWindow((int) Window.WINDOW_MUSIC_GENRE);
            return;
          }
    so if you open up 501 you generally just get sent to 504 anyway...


    hwahrmann will probably know but my understanding is that 501 is for shares view. If you try and open it up you will be sent to 504. if you select shares view from 504 (or were browsing shares view from 504) then you will be sent from 504 to 501 or will stay in 501 if you go there directly. So I think we should always be using 504 anyway? (I don't think a parameter would really help with shares view; yes you might have multiple shares but I am trying to move people away from shares view and onto the database views....)
     

    trevor

    Portal Pro
    October 17, 2006
    1,601
    952
    Chelmsford
    Home Country
    United Kingdom United Kingdom
    Just been testing this and found that only works if hyperlink to 504 (mymusicgenres), is this intentional or should hyperlinking to 501 (mymusicsongs) also support this?
    Yep this was intentional, in fact I don't understand when 501 should be loaded directly....

    when it loads you get
    Code:
          if (MusicState.StartWindow != GetID)
          {
            GUIWindowManager.ReplaceWindow((int) Window.WINDOW_MUSIC_GENRE);
            return;
          }
    so if you open up 501 you generally just get sent to 504 anyway...


    hwahrmann will probably know but my understanding is that 501 is for shares view. If you try and open it up you will be sent to 504. if you select shares view from 504 (or were browsing shares view from 504) then you will be sent from 504 to 501 or will stay in 501 if you go there directly. So I think we should always be using 504 anyway? (I don't think a parameter would really help with shares view; yes you might have multiple shares but I am trying to move people away from shares view and onto the database views....)

    Makes sense as 504 is the DB view I believe, I know the StreamedMP skin calls 501 and this may be safer option as the user may not have populated the DB.

    Will have to do some testing.

    Thx
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Makes sense as 504 is the DB view I believe, I know the StreamedMP skin calls 501 and this may be safer option as the user may not have populated the DB.
    There is some code in 504 to do the same so if you open up 504 and are wanting shares view you actually get sent to 501.

    Normally this makes little difference until now when we want to open up with a parameter. I believe the only sensible parameter is a db view. I don't really want to hack this about so that the parameters received from 501 are then passed onto 504 as this could get quite messy and I am not sure the ReplaceWindow method copes with these parameters
     

    trevor

    Portal Pro
    October 17, 2006
    1,601
    952
    Chelmsford
    Home Country
    United Kingdom United Kingdom
    Makes sense as 504 is the DB view I believe, I know the StreamedMP skin calls 501 and this may be safer option as the user may not have populated the DB.
    There is some code in 504 to do the same so if you open up 504 and are wanting shares view you actually get sent to 501.

    Normally this makes little difference until now when we want to open up with a parameter. I believe the only sensible parameter is a db view. I don't really want to hack this about so that the parameters received from 501 are then passed onto 504 as this could get quite messy and I am not sure the ReplaceWindow method copes with these parameters

    True and not worth the risk for the minor gain, in my case I can easily handle the skinID part in the editor when configureing the hyperlink parameters.

    The documentation will just need to make it clear that these parameters for music only work when hyperlinking to 504.

    Thx
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Just to inform, it works with MyVideos also. Code is practically the same.

    Code for DB Video window and example parameter is:
    Code:
    ....
    <hyperlink>[B][COLOR=Red]25[/COLOR][/B]</hyperlink>
    <hyperlinkParameter>987</hyperlinkParameter>   -> will open Years view
    ...
     

    Attachments

    • MyVideos_DBView_With parameter.patch
      1.2 KB

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,523
    10,466
    France
    Home Country
    France France
    thanks :) should be needed on latest SVN ?
     

    Users who are viewing this thread

    Similar threads

    I do have most of my Music tagged with Lyrics and it works with My Lyrics. If I remember correctly, you have to set: <Don't search songs with Lyrics in Music tag>
    I do have most of my Music tagged with Lyrics and it works with My Lyrics. If I remember correctly, you have to set: <Don't search...
    Hi. Setting up MyLyrics now. I got version 2.2.2.295 from My Lyrics 2.2.0 for MP 1.10 Final, and above (31-12-2014) . I'm planning...
    Replies
    1
    Views
    2K
    I compliment you on the thoroughness of your investigations. (y) Unfortunately, I don't have any ideas what the problem might be. :( Perhaps someone else will post with some suggestions. :unsure: -- from CyberSimian in the UK
    I compliment you on the thoroughness of your investigations. (y) Unfortunately, I don't have any ideas what the problem might be...
    Would appreciate it if someone could solve (or point me in the right direction to resolve) this issue. I have “MultiSeat”...
    Replies
    4
    Views
    782
    So, you're power cycling the TV, but not putting the PC to sleep ? In General => Startup/Resume settings, try checking "Ignore Windows resolution/size changes" In Codecs and Render, try selecting the specific audio device rather than "Default DirectSound device" Just ideas, no guarantee this will do anything. If this doesn't work, I...
    So, you're power cycling the TV, but not putting the PC to sleep ? In General => Startup/Resume settings, try checking "Ignore...
    I'm running MP1 as a client only on this: https://www.amazon.com/dp/B0DZX5DWS5?ref_=pe_123509780_1038749300_t_fed_asin_title&th=1...
    Replies
    4
    Views
    599
    Sorry, it's my fault -- I did not notice that you are using MP2. :( MP1 has a separate configuration utility, similar to "TV Server Config". I have tried MP2 only a couple of times, and have never used it seriously. I don't know what MP2 supports with regard to adjusting audio delay, but I do know that all of the adjustments of...
    Sorry, it's my fault -- I did not notice that you are using MP2. :( MP1 has a separate configuration utility, similar to "TV...
    Hi. I recently upgraded my home cinema AVR which also meant changed from sending audio from my HTPC as 5.1 using optical to 7.1...
    Replies
    5
    Views
    1K
    Thank you for pointing out that my analysis may be less than accurate. :eek: :p Although the change to TV channel 71 may not also have been applied to the independent radio channels (different MUXes), the logs that I prepared for one of the development team does show a difference between channel 704 ("BBC Radio 4") and channel 731...
    Thank you for pointing out that my analysis may be less than accurate. :eek: :p Although the change to TV channel 71 may not also...
    I have just discovered that I can no longer receive any of the independent radio channels broadcast on DVB-T in the UK. In...
    Replies
    10
    Views
    2K
    Top Bottom