[Approved] Add Love/Ban option in Music Now Playing (1 Viewer)

SilentException

Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    GUIDialogNotify can do that.. It has timeout.. Just set timeout to 1 second or something...

    You could also use a new property or a label that you will show and then hide on timer...
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    GUIDialogNotify can do that.. It has timeout.. Just set timeout to 1 second or something...

    You could also use a new property or a label that you will show and then hide on timer...
    Might have a look at that later today then thanks
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    41
    Austria
    Home Country
    Austria Austria
    Is this as simple as adding an entry to the ActionType enum in Action class then adding that to OnAction ??
    Apparently it is...
    New patch attached. Have added new action types and also default keyboard shortcuts to now playing screen
    (L = love / K = Ban) which again only fire if audioscrobbler plugin is enabled

    Did think about adding buttons but not sure there is a demand for this? Context menu and actions should be sufficient?

    Only thing which would be the icing on the cake is if a popup could appear for a couple of seconds saying track loved / banned and then it fades but I don't see any way of doing this in MP?

    I would definately add buttons as well since it would allow skins to add neat love/ban icons to the screen. ;)

    Will try out the new patch later today.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    GUIDialogNotify can do that.. It has timeout.. Just set timeout to 1 second or something...

    You could also use a new property or a label that you will show and then hide on timer...
    OK the notify dialog works great. Only issue is where is appears. I was testing with Maya skin and it appears at the bottom on top of the other info. Is there any way for the skin to influence where the dialog appears?
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Ofcourse, skin dictates position of the dialog. Nothing you can do, except introduce new dialog.

    Can the location of dialogs be controlled on a page by page basis or is there one location for the whole skin?

    Either way new patch attached which has buttons (ID 30 = love, 31 = ban)
    as well as a dialog notification
     

    Attachments

    • music_now_playing_love_ban_v3.patch
      5.9 KB

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    41
    Austria
    Home Country
    Austria Austria
    Tested with current svn, all 3 ways to love/ban (button, context menu, key) work fine.

    One thing though: There is no information for the user that the love/ban couldn't be done when you don't have an internet connection available. Not sure that's a big issue though.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    One thing though: There is no information for the user that the love/ban couldn't be done when you don't have an internet connection available. Not sure that's a big issue though.

    The actual submission is all done asynchronously and gets quite complicated to monitor the reply. It is no different to normal track submission which sometimes does not work and you do not get any indication except in the logs.

    Also thought about unlove and unban but this gets very messy and I think these sorts of things should be done via last.fm interface.

    Perhaps one day I might get around to adding in a check on track change to see if a particular track is loved so perhaps skinners could add a heart icon somewhere but that is for another day.

    Only real thing I am contemplating here is to create a new dialog just for this which would give skinners control over where it appears
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,257
    2,533
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Only real thing I am contemplating here is to create a new dialog just for this which would give skinners control over where it appears
    OK this is the final version of this patch. I have given in and added a new dialog just for this (music now playing tends to be laid out differently to other screens so I think it is important to allow skinners to place the dialog where they want).

    the new dialog is exactly the same as the normal notify dialog except that the window ID is 512 and skin file is DialogNotifyLastFM.xml (file for B3W attached)

    Can't figure out how to add a brand new file into patch so file for Last FM dialog attached too
     

    Attachments

    • DialogNotifyLastFM.xml
      2.5 KB
    • music_now_playing_love_ban_v4.patch
      7.6 KB
    • GUIDialogNotifyLastFM.zip
      1.6 KB

    Users who are viewing this thread

    Top Bottom