[Approved] Start Music with parameter (1 Viewer)

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,760
    7,224
    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,760
    7,224
    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 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
    652
    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
    3K
    TV Server plugins are listed on this page, and "EPG Cleaner" can be downloaded from this page. Note: I don't know what bitness the plugin has. It might be 32-bit, or it might be "any cpu". The plugin is not listed by the "MP Extensions" tool, so I don't know whether it has been tested with the most-recent MP releases. -- from...
    TV Server plugins are listed on this page, and "EPG Cleaner" can be downloaded from this page. Note: I don't know what bitness the...
    I'm looking for a better recording scheduler. Many recording titles (at least in the UK) change between episodes, sometimes being...
    Replies
    4
    Views
    1K
    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
    1K
    4.5 is really old. I'm not sure 4.5.5 even is a version that actually existed. You should be able to install .NET Framework 4.8.0 on Windows 7 SP1
    4.5 is really old. I'm not sure 4.5.5 even is a version that actually existed. You should be able to install .NET Framework 4.8.0...
    My TV PC is more a cast-off on older hardware (a 'Quiet PC' i5 4690, 16GB ram, 2xSSD 1xHDD, system graphics), mainly as a cheap way...
    Replies
    5
    Views
    2K
    Top Bottom