Global Music Search v2.0.0 [2014-02-19] (1 Viewer)

Mr. V

Portal Pro
September 15, 2007
150
164
Brisbane
Home Country
Is it possible that the song, duration, genre act tags can be used on the main screen?

Last time i tried to implement this in the search xml they worked, but the values would not update when i scrolled to a different song.
 

Dadeo

Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    I know ysmp - and that made sense when Now Playing was not fully supported, but now that it is, it COULD be consistent with music. I am willing to admit it is a 'feature' request due to the evolution of this plugin.
     

    mysteryboard

    MP Donator
  • Premium Supporter
  • August 6, 2011
    34
    2
    Aachen
    Home Country
    Germany Germany
    Global Music Search (version 1.7.5) - Problem with sorting

    Hello,

    many thanks for Global music search. But I have found a problem with sorting. When I search for an album, f. e. Back in Black, and I add the album to the playlist, the album isn't sorted by titlenumber. I haven't the possibility to sort the titles in the playlist.
    Is it possible to change this?

    Greetings
     

    IchBinsShort

    Portal Pro
    January 3, 2008
    683
    54
    Home Country
    Germany Germany
    AW: New Plugin: Global Music Search (version 1.7.0)

    I have a found a little bug, for the first Song in the Playlist the Contextmenu don't work. It works only after the second song.:oops:
     

    pedu

    Portal Member
    January 19, 2012
    17
    0
    Home Country
    Denmark Denmark
    First of all - i love this plugin. Not sure if it's being actively developed anymore, but I discovered a bug when two or more artists have released an album of the same name, like

    Artist: Real Life
    Album: Heartland

    Artist: Sko & Torp
    Album: Heartland

    The albums of course are completely different apart from sharing the album title. If I search for SomeTrackName which is included on the second album above the plugin finds the correct track and dispalys the result. Now if I select Enter on the track and choose to add the complete album to the playlist, the plugin adds the wrong album - in this case the album by Real Life, not the album by Sko & Torp. Hope this can be easily fixed?

    Cheers,
    Peter

    Just took a look at the source and I think it's obvious why the wrong album is added to the playlist

    ArrayList _album = new ArrayList();
    String sAlbum = song.Album;
    MusicDatabase _mdb = MusicDatabase.Instance;
    bool _songsFound = _mdb.GetSongsByAlbum(sAlbum, ref _album);

    The method call _mdb.GetSongsByAlbum(sAlbum, ref _album) takes a string parameter and natutally returns the songs from the first found album with sAlbum name. For this to work it should take an albumId in the form of an integer to return the correct result, something like

    ArrayList _album = new ArrayList();
    integer AlbumId = song.AlbumId;
    MusicDatabase _mdb = MusicDatabase.Instance;
    bool _songsFound = _mdb.GetSongsByAlbumId(AlbumId, ref _album);

    Since I don't know the MediaPortal API I don't know if this is even possible?
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Thanks pedu, sounds like your right. What would make sense is a overloaded method that takes a unique id (doesnt look like there is one).

    I changed it to use an alternative method GetSongsByAlbumArtistAlbum which takes both artist and album as parameters. Thats the best I can find in the API.

    Anyway, see if this test dll does the trick
     

    Attachments

    • GUIGlobalSearch.zip
      64.1 KB

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Re: Global Music Search (version 1.7.5) - Problem with sorting

    many thanks for Global music search. But I have found a problem with sorting. When I search for an album, f. e. Back in Black, and I add the album to the playlist, the album isn't sorted by titlenumber. I haven't the possibility to sort the titles in the playlist.
    mysteryboard, can you test the dll above...I haven't changed anything to do with sorting but the new method might already do this (atleast from my test it seems sorted by tracks). Anyway I want to know if it works for you so I dont need to explicitly sort by track.
     

    pedu

    Portal Member
    January 19, 2012
    17
    0
    Home Country
    Denmark Denmark
    Thanks pedu, sounds like your right. What would make sense is a overloaded method that takes a unique id (doesnt look like there is one).

    I changed it to use an alternative method GetSongsByAlbumArtistAlbum which takes both artist and album as parameters. Thats the best I can find in the API.

    Anyway, see if this test dll does the trick

    :DThanks mate:)
    I'll check it tonight after work and post my findings in this thread. However it would make sense to assume that GetSongsByAlbumArtistAlbum() would actually do the trick
     

    pedu

    Portal Member
    January 19, 2012
    17
    0
    Home Country
    Denmark Denmark
    Hi Damien
    The use of GetSongsByAlbumArtistAlbum() solved my problem - the correct album is added now - Thx alot mate:)

    BTW The problem regarding the sort order when adding an album to the playlist seems to be solved as well. At least tracks are added in the expected order- I guess that if tracknumber is missing from ID3 tag or the files are named in a way that doesn't make them sort correctly alphabetical they might be added in random order? Unfortunately I don't know how GetSongsByAlbumArtistAlbum() work/sort internally, so this is just a gues. All my files have track numbers in ID3 tags and are named in a way that make the sort correctly in alphabetically ascending order.

    Thanks alot for you help in sorting out this issue:)
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Yeah, I guess the issue is to do with missing tags in ID3 for track numbers or something to do with old method being used (perhaps it did not return a sorted array).
     

    Users who are viewing this thread

    Top Bottom