Last.FM Rework and Auto DJ mode (4 Viewers)

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    The authentification part (for me) looks strange.
    I mean i add user but it stay blank : (so i don't know if it's added, i suppose yes because i didn't get false message) :p
    View attachment 123573
    Ummmmm :confused: if you close and reopen does your user show? Can you check inside the music database (there should now be a last.fm user table)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi,

    If i close and reopen it, no user was shown. I will look into db just need to find my tool and where to look lol
     
    Last edited:

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    OK new version posted. This needs people to test (particularly the radio element) if this is to make it into a future MP release.
    Is no-one interested at all in last.fm radio ??

    I saw a lot of people are interested in this plugin so thank you very much for the work! I will post a link in the german forum so maybe this got more attention. :)
     

    IchBinsShort

    Portal Pro
    January 3, 2008
    683
    54
    Home Country
    Germany Germany
    For me the last.fm radio part is not very important. I need only the other features. I can"t help because i don't have a subscription, sorry !
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    The authentification part (for me) looks strange.
    I mean i add user but it stay blank : (so i don't know if it's added, i suppose yes because i didn't get false message) :p
    View attachment 123573
    Ummmmm :confused: if you close and reopen does your user show? Can you check inside the music database (there should now be a last.fm user table)

    Db seems filled :) but user stay empty in config :p
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Db seems filled :) but user stay empty in config :p
    Ahhh yes it is working but looking at the code I see I need to improve this bit (will sort it out when I add multi-user)
    If you get no error then user has been added. If you have a picture on last.fm then if you close form and re-open the picture should appear but there is no other feedback.

    This will get improved
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    @jameson_uk somehow the Auto DJ Mode isn't working anymore :(
    With previous version it showed the SQL query of potential songs in the logs, but looks like you removed that. Somehow it always says:
    Code:
    2013-03-10 19:56:06.986225 [Info.][(22)]: Auto DJ: Matched 250 local songs.  Attempting to add 5 tracks
    but that's all. Nothing gets added.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    @jameson_uk somehow the Auto DJ Mode isn't working anymore :(
    With previous version it showed the SQL query of potential songs in the logs, but looks like you removed that. Somehow it always says:
    Code:
    2013-03-10 19:56:06.986225 [Info.][(22)]: Auto DJ: Matched 250 local songs.  Attempting to add 5 tracks
    but that's all. Nothing gets added.
    I removed the logging yes but this should not make any difference to adding tracks. Odd thing is that log message shows that it is attempting to add five tracks and that means there are five to add I am struggling to see why nothing gets added :confused:
    Code:
    	  Log.Info("Auto DJ: Matched {0} local songs.  Attempting to add {1} tracks", dbTracks.Count, numTracksToAdd);
     
    	  for (var i = 0; i < numTracksToAdd; i++)
    	  {
    		var maxSize = Math.Min(dbTracks.Count, _randomness);
    		var trackNo = Randomizer.Next(0, maxSize);
    		pl.Add(dbTracks[trackNo].ToPlayListItem());
    		Log.Info("Auto DJ: Added to playlist: {0} - {1}", dbTracks[trackNo].Artist, dbTracks[trackNo].Title);
    		dbTracks.RemoveAt(trackNo);  // remove song after adding to playlist to prevent the same sone being added twice
    	  }

    Will do some more digging...
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    OK found it. Was a misplaced bracket. See earlier post with downloads there is a new databases binary. Please replace with that one.

    The code is up to date in GIT if you are building from there.
     

    Users who are viewing this thread

    Top Bottom