[Approved] Start Music with parameter (1 Viewer)

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,799
    7,331
    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,799
    7,331
    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,514
    10,467
    France
    Home Country
    France France
    thanks :) should be needed on latest SVN ?
     

    Users who are viewing this thread

    Similar threads

    I'm Sorry, I don't see it in the View list.
    I'm Sorry, I don't see it in the View list.
    I'd like to rename my BasicHome buttons (DefaultWideHD, MP 1.39.0) for Videos to be able to have 2 buttons for two separate views...
    Replies
    11
    Views
    332
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select "Internal DirectShow player" as music output, but then you lose gapless playback. If you you don't have multichannel music you can choose WASAPI as the output and set the number of speakers to stereo. I have...
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select...
    Not sure if this a a bug/config/settings problem. I am running a media portal 2.5 server with 2.41 client but it seems I get the...
    Replies
    1
    Views
    1K
    • Sticky
    Many many years ago, I opened a bug report after I got that same message but I never got a reply. The reason was I had unchecked the Windows Media Player item in Windows 10 Control Panel > Program and Features > Turn Windows features on or off as I didn't need it, without thinking that it was needed by MediaPortal. I kept the "Media...
    Many many years ago, I opened a bug report after I got that same message but I never got a reply. The reason was I had unchecked...
    We have just released MediaPortal 1.39 - Endurance x86 and x64 version. Highlights of this release Bugfixes: [MP1-5257] - Skin...
    Replies
    13
    Views
    1K
    MP1 MP2 1.39 x86 1.39 won't install DE
    That did it, thanks.
    That did it, thanks.
    Before you create this bug report: Make sure that your system (windows, codecs and drivers) is up to date, matching the...
    Replies
    2
    Views
    463
    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
    4K
    Top Bottom