[Approved] Start Music with parameter (1 Viewer)

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    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,751
    7,196
    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,600
    950
    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,258
    2,528
    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,600
    950
    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,258
    2,528
    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,600
    950
    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,583
    10,403
    France
    Home Country
    France France
    thanks :) should be needed on latest SVN ?
     

    Users who are viewing this thread

    Similar threads

    MP1 MP2 1.32 Start MP with e.g. Music DE
    Yes! That was what I was looking for! Thanks @Lichloathe ! And it's still working :) https://forum.team-mediaportal.com/threads/mpstartit-start-mediaportal-with-specific-plugin.84578/post-928783
    Yes! That was what I was looking for! Thanks @Lichloathe ! And it's still working :)...
    I am wondering... didn't we have a Plugin wich made it possible to start MP with certain Module - e.g. directly start with Tv or...
    Replies
    4
    Views
    891
    MP1 MP2 1.32 StreamedMP Latest Music DE
    No one can help me here?
    No one can help me here?
    In StreamedMP I have the most recently added films (Moving Pictures) and also TV recordings on the home screen. But I made the...
    Replies
    5
    Views
    735
    Prerequisites A Spotify account (free or premium) I've not tested with a free account, but according to spotify it should work. Spotify desktop app installed on same computer as you are going to use with MediaPortal Getting ready Create an app at spotify, use this link: Dashboard | Spotify for Developers, you have to login. Click...
    Prerequisites A Spotify account (free or premium) I've not tested with a free account, but according to spotify it should work...
    Prerequisites A Spotify account (free or premium) I've not tested with a free account, but according to spotify it should work...
    Replies
    0
    Views
    1K
    I avoid touching that system as long as it runs. Now that 2.4.1 seems to run again, I probably wait for the next issue.
    I avoid touching that system as long as it runs. Now that 2.4.1 seems to run again, I probably wait for the next issue.
    Hi, I have just upgraded from MP 2.2.2 to MP 2.4.1, and now the client won't start. I see the splash screen, and then it just...
    Replies
    3
    Views
    922
    I know I made some more advanced rules for my own setup, but without access to the SQLite db3 file that is difficult to remember from. As per: mptvseries/ViewTemplates.cs at master · damienhaynes/mptvseries I'm not seeing much in the other default templates either, but I do recall that both table values are available to use. It is...
    I know I made some more advanced rules for my own setup, but without access to the SQLite db3 file that is difficult to remember...
    Hi, I use mediaportal and MPTVseries for quite a long time, thank you for this plugin. Recently, due to lists becoming too long...
    Replies
    4
    Views
    1K
    Top Bottom