INTERACT FORUM

Windows => Third Party Plug-ins, Programs, and Skins => Topic started by: davjand on July 29, 2008, 11:11:05 am

Title: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on July 29, 2008, 11:11:05 am
Hi all
v1.2 released. Only a few new features - improved keeping of files and a few bug fixes. I haven't had time to implement the other things - I've only just had time to compile and upload etc. I wouldn't hold out for any new releases anytime soon as I'm very busy at the moment. However don't stop adding feature requests as I will look into them when time presents its self.

I've also added the source code if anyone wants to have a play etc

Anyway have fun with it, please read the readme and take note of the following:
You must uninstall the previous version before installing this
You must enter the correct login data on the radio tab for any kind of streaming to work.

NEW in 1.1

   Volume levelling
   
   Overview - you can enable this on the radio tab and set the volume percentages in the numeric boxes.
   The normal volume is the volume you want normal tracks to be played at.
   The stream volume is the volume you want streamed tracks to be played at.
   If you change the volume from MC when tracks are playing then this will update values - if you are streaming then this
   value will update and vice verca. Note that this won't happen within the first 3 seconds of playback.
   
   Also if the volume is set to increase then change will be delayed on track change by 1 second to allow MC's buffer to clear
   This prevents sudden loud bursts of songs if you try and skip a track etc.

NEW in 1.0:

Stream music from Last.Fm's radio. YOU MUST ENTER THE CORRECT LOGIN DETAILS FOR THIS TO WORK.
Note that your passoword is saved even though it isn't displayed in the password box once MC has been restarted.
Also, saved passwords are hashed (encrypted) so there is no chance of someone stealing it!

Two stream modes:

AutoDJ   this integrates with the standard AutoDj from previous versions allowing the current playing track to be looked up and similar tracks selected.
      The key difference is that similar tracks that aren't in your library can be streamed so you can discover new music.

Radio   Here you select a radio type (user, similar artist or tag) and click Run Radio. The plugin will connect to the Last.FM radio station and
      stream tracks from that. This will continue until you either cancel the operation or click 'stop radio'
      
Track Skipping

If you don't like the currently selected song the you can skip it, either the dj or radio will remove that song from the now playing list and
attempt to get another song from last.fm, either streamed or normal. Note there is currently no code to prevent the same song being selected so
if you are using the library dj with low variety then the chance of getting the same song is high.

Other features
Looks up the currently now playing track on lastFm and searches for similar tracks that are in the music library.
Based on the track list returned, this is cross referenced with the MC database and then recently played tracks are removed.
The tracks are weighted according to the match given to them by Last.Fm and track is selected. Tracks by artists who have recently been played
can be weighted negatively, preventing them being selected unless there are no other tracks.
A track will be added to the Now Playing list that is hopefully similar to the last track played.
This operates on the last track on the now playing list, hence instead of looping or stopping, a new track will be added.

The plugin comes with it's own interface pane.

The file downloads from Last.Fm occur asynchronously so there is minimal freezing for MC. The operation can also be cancelled at any time.
If no similar tracks are found then a MC query can be executed, the default one is "[Number Plays]=0 ~n=200" which gets
un-played tracks for the user. If this query returns no tracks then a random track is added.

The slider control gives simplified control over the advanced settings. I'm not completely happy with how I implemented it but it may be enough, the most
important thing is feedback with regards to it!

Install

Please uninstall any previous versions

If you encounter errors/bugs, please post here and let me know

I currently have some more features planned that I will work on when I get chance (see readme)!
Also if you have any feature requests or suggestions then please let me know.

YOU MUST UNINSTALL THE PREVIOUS VERSION BEFORE INSTALLING 1.0

1.2 Installer (http://www.oughtibridgegala.co.uk/downloads/JRMC_LastFmDJSetup_120.exe)
v1.1 beta (http://www.oughtibridgegala.co.uk/downloads/JRMC_LastFmDJSetup_1.1_BETA.exe)
Here is a link to the installer v0.51 (http://www.oughtibridgegala.co.uk/downloads/MC%20LastFmRecommendSetup%20051.exe) - thanks to

v1.2 Source code (http://www.oughtibridgegala.co.uk/downloads/LastFm%20120.zip)

PaulSinnema for the template by the way  ;)

Thanks


Change Log:

1.2 (05/10/2008)
   
   ?      May be other things but it is a while since i did any coding and my memory is a bit vague

   Added: Support for Media jukebox and hopefully mc13 if j river can sort the problems out   
   
   Fix:   Various fixes that should improve stability and reduce .NET errors
   
   Added:   New method of keeping files. Files to be kept are copied to a /keep directory. They are then imported into
         Media center so that they can be played. (You could run 'move and rename' within media center to copy them to
         your music directory
1.1 BETA (07/09/2008)

   Fix:   File Error when displaying the number of temp files if no temp file directory existed
   
   Added:   Volume levelling, since Last.Fm streams can often be quiet, you can set a volume for streams to be played at.
   
   Change:   If there is a download error when you are running a radio, the radio will attempt to restart
         This will be indefinately until you stop the radio (either stop button or cancel task)

1.0 BETA (05/09/2008) - Major release
      
   Added:   Streaming from Last.Fm Radio stations (users/tags/similar artists). YOU NEED TO BE REGISTERED WITH LAST.FM FOR THIS TO WORK
   
   Added:   AutoDj streaming, autodj can stream songs similar to the current playing song. YOU NEED TO BE REGISTERED WITH LAST.FM FOR THIS TO WORK
   
   Added:   Option to enable streaming DJ.
   
   Added:    Slider to vary how often the auto dj will get a track from the libary as opposed to streaming from Last.Fm
   
   Change:   Many interface changes to accomodate new streaming features.
   
   Added:   Specific radio interface tab. Here you can alter radio options and see the status of current streaming track.
   
   Added:   Option to skip a track, this applies to any mode, whether it be streaming or radio dj
   
   Change:   Renamed to LastFmDj!!
   
   Change:   Timeout code added. Will prevent the DJ running forever when trying to download a file.
   
   Change:   Downloader will attempt multiple times if a download fails.

0.51 (25/08/08)
   Fix:   Bug When there was an error downloading data which resulted in the Dj being run repeatedly

0.5 (24/08/2008)
   Added:   Interface slider control
   
   Change:   Interface redesign, seperating into more specific tabs.
   
   Added:   Run the DJ when a track has played a certain percentage instead of at the start.
   
   Added:   Placeholder support for the alternative query. The only placeholders available are via the interface.
         They insert the placeholder at the current cursor position.
   
   Added:   New algorithm mode to search for similar artists and use any tracks from these.
         Code rewrite to support this and also make it more extensable should other modes be added.
   
   Added:   Button to clear the debug file.
   
   Fix:   To the "Only select songs from a playlist" dropbox now saves its value correctly.
   
   Fix:   Various bugfixes within the code
   
   Added:   Option to switch algorithm modes (advanced settings)
   
   Added:   Option to allow different modes to be executed if no tracks are found (advanced settings)
         Operates in the following order so will have no effect for 'similar artists, all tracks'
         track -> similar artists, top tracks -> similar artists, all tracks

0.4 (18/08/2008)
   Added:   Asynchronous Downloads (when downloading mediacenter won't freeze!)
         Large code rewrite for this
   
   Change:   New tabbed interface, thanks to neFAST for design work and input into this.
   
   Added:   Interface now autosaves, except for entering the query to use if no tracks are found.
   
   Added:   Option to only use the similar artist method, more info in the options section
   
   Added:   Option to hide the progress bar
   
   Fix:   Uses correct search syntax for querying the MC database, should reduce errors
   
   Added:   Option to only select songs from a certain playlist
   
   Added:   Option to input an alternate query to execute if no tracks are found.
   
   Change:   Altered the sorting algorithm so tracks have a higher match/reach from last.Fm are more likely to be played.
   Added:   Tying in with the above, recently played artists will now be played but will be significantly negatively weighted in the selection
         algorithm so are 'unlikely' to appear unless no other songs can be found.
   
   Added:   Cancel button to progress window.
   
   Added:   Cancel Button to Interface pane.
   
   Added/Change/Fix:
         Many other little things/tweaks that I may have forgotton to record

0.3
   Added:    Now uses Last.Fm's similar track function, this should decrease the time it takes to run significantly
         If no tracks are found with this method then it will look up similarArtists and topTracks which takes longer
         but will also yield more results.
   
   Added:   Track processing functions.
         If no tracks are returned from last.fm then attempts are made to clean the song title and artist name
         by removing anything in and after brackets()[]{} and slashes \/, anything after and including featuring, ft, feat.
         The plugin will then look up the songs with cleaned data.
         This applies to both similar track and similar artist methods, so the order of processing is:
            unclean similar track
            clean similar track
            unclean similar artist
            clean similar artist.         
         
   Change:   Many code tweaks for efficiency and debug ease
   
   Change:   A few interface changes, thanks to neFAST for the input.

0.2
   Fix:    Globalization fix, should fix problems encountered mainly by French people or any other language
         where a comma(,) instead of a period(.) to represent a decimal point.

0.1
   Change:   Second Release, not enough to warrent a new release
         Stopped the progress window from always being at the front
         
   Fix:   Removed a small amount of unneeded debug code

0.1
   Initial Release

More Info
For more info, please see the readme in the installation package
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend)
Post by: JONCAT on July 29, 2008, 07:42:52 pm
Thanks, downloading now.

DC ;D
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend)
Post by: neFAST on July 30, 2008, 12:54:10 pm
Great !!!!
That's something I had in mind for a long time. Do you plan to share the sources?
Downloding it right now.

EDIT:
Quote
Planned Features:
This is no way a guarantee for features but here are a few that I had in mind:
#   Make use of Last.Fm's similar track service which will get tracks based on the current track explicitly
Wait how are you doing if you're not using the "similar track" service from Audioscrobbler API ?
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend)
Post by: neFAST on July 30, 2008, 01:16:22 pm
I don't know if it's because my OS is in french but this is what I got:
Code: [Select]
30/07/2008 07:56:09.234: Initialising LastFm Recommend - 0.0.0.1
30/07/2008 07:56:09.625: XML Error in settings file
30/07/2008 07:56:09.625: Default Settings will be used

30/07/2008 08:04:07.750: Executing DJ

30/07/2008 08:06:28.671: Executing DJ

30/07/2008 08:07:06.062: Executing DJ

30/07/2008 08:07:06.625: Searching for similar Artists to Air on Last.Fm
30/07/2008 08:07:07.296: Error Parsing Xml DataLe format de la chaîne d'entrée est incorrect.
30/07/2008 08:07:07.328: No Similar Artists were found
30/07/2008 08:07:07.375: Getting random track

30/07/2008 08:07:07.390: Adding 'The Bravery Of Being Out Of Range' to Now Playing

30/07/2008 08:12:03.671: Executing DJ

30/07/2008 08:12:03.687: Searching for similar Artists to Roger Waters on Last.Fm
30/07/2008 08:12:04.125: Error Parsing Xml DataLe format de la chaîne d'entrée est incorrect.
30/07/2008 08:12:04.125: No Similar Artists were found
30/07/2008 08:12:04.156: Getting random track

30/07/2008 08:12:04.156: Adding 'Dalston' to Now Playing
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend)
Post by: davjand on July 30, 2008, 03:18:23 pm
Hi neFAST
Could you stick the Log Level to 4 and tick the enable Write Debug file and then email it to me at davjand@yahoo.co.uk?

It currently looks up the similar artists and then looks up the top tracks per artist. I only discovered the other part of the API after I had got a fair way into coding it so put it on the todo list.

I hadn't really thought about the source but there is no reason really not to share it. I'll have a look at getting it hosted on sourceforge anyway.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend)
Post by: neFAST on July 30, 2008, 03:27:17 pm
What I pasted was the content of the level 4 logs! Anyway I'll send you an email.

BTW "similar tracks" was already in v1.0 of last.fm API


EDIT: you're right, I forgot to save settings  ;D
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend)
Post by: davjand on July 30, 2008, 03:31:44 pm
Just to check you did click save settings after selecting level four logs? It's slightly counter intuitive so I probably should change it

I based my plugin on another which does it in the way that I've done it, hence i saw that method first.

Thanks
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.2
Post by: davjand on July 31, 2008, 05:26:10 pm
Version 0.0.0.2 is out, this fixes the French language problem and a few minor tweaks
The installer link has been updated
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.2
Post by: yooz on August 02, 2008, 02:02:43 am
Just a small question. Is it possible to combine this whith a smartlist to include/exclude special files from the lib, or is it allway searching inside the complete lib for new songs?
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.2
Post by: gummbah on August 06, 2008, 10:58:10 am
Just to say thanks!
I really like this plugin and it works surprisingly well!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.2
Post by: lOth on August 07, 2008, 12:08:57 pm
Hallelujah!

http://yabb.jriver.com/interact/index.php?topic=41438.msg287736 (http://yabb.jriver.com/interact/index.php?topic=41438.msg287736)

I believe this thread had some ideas for some extra features for this plug-in.

Downloading it now, testing it later.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.2
Post by: davjand on August 09, 2008, 02:55:50 pm
Hi all, I've been away for the week hence my lack of replies

@yooz:

It's not currently possible to do that but it is in the planned features - i was thinking of allowing a search query to added that will execute if no songs are found. Ontop of this i was thinking of adding placeholders of the artist name/year/album etc within this so that you could select songs by the same artist. With this you could obvoiusly add: [playlist]='playlist name' and then use a smartlist.

One question here though for anyone who knows, is it possible to bring up the search wizard interface from a plugin?

@lOth

I don't have access to that message so can't see what it says.

While I was away i tidied some of the code up and implemented the similarTrack from lastfm, I'm going to test this over the next few days and maybe add some more features so there should be a new release soonish!
Thanks everyone!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.2
Post by: datdude on August 12, 2008, 04:00:40 pm
Haven't tried this yet, but plan to tonight hopefully. 

One thing that would be really cool is if you could mix Last.fm recommendation NOT in your library with Last.FM recommendations that are.  So some songs would be streamed and others would be right from your library.  A slider to control how much from either would be cool.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.2
Post by: davjand on August 12, 2008, 04:07:25 pm
I've looked into streaming from lastFm but the urls to the individual tracks that they stream are extremely long and complicated. I have a feeling they don't want people using them. The only way I've found to get access them is using the downloadhelper firefox addon but I don't know how that works.

However it should be possible to stream from the radio feature of lastFm. I've not looked into this much but it might give decent results.

I've nearly finished the 0.0.0.3 release which will have a few extra features that were listed in the planned features and so far it seems stable enough to use for everyday listening.

Edit: 0.0.0.3 is done

Thanks
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: datdude on August 12, 2008, 11:03:33 pm
This is quite amazing, davjand!

1) Would like to see an option for it selecting songs only from standard MC smartlist rules.
2) The pop up saying it is choosing the next song should be optional.
3) It might be cool if it didn't show the song it selected until right before or after the seed song ends.

If you could add those things in, it would be perfect.  As is, it is really cool, and I can't wait to see what you do next with it.  Maybe add in song selections based on acoustically similar songs from say musicip (search for it on google).
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: datdude on August 13, 2008, 12:18:39 am
I think skipping a song should revert to the previous song played when looking for similar artists.  If you skip again, it goes back even further to the pervious song behind that one and so on.  That way if for whatever reason the new songs start getting out of whack with the original selection you can just keep skipping until you return to the center so to speak.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: neFAST on August 13, 2008, 03:16:31 pm
1) Would like to see an option for it selecting songs only from standard MC smartlist rules.
Do you know how to build a search with a modifier to limit result to a certain smartlist?
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: datdude on August 13, 2008, 05:04:58 pm
Me?  No, I am not a programmer. :)  But it should be like how the built in 'radio' feature works.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: neFAST on August 14, 2008, 05:15:36 pm
1) Would like to see an option for it selecting songs only from standard MC smartlist rules.
Done but you'll have to paste it in a text box.

2) The pop up saying it is choosing the next song should be optional.
Done

3) It might be cool if it didn't show the song it selected until right before or after the seed song ends.
What's your problem with this behavior? I had an itune-like behavior in mind where it would have show 5 songs in advance.

I'll send the sources to davjland tonight and he'll decide when to post v0.4
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: datdude on August 14, 2008, 06:19:28 pm
Done but you'll have to paste it in a text box.
Done
What's your problem with this behavior? I had an itune-like behavior in mind where it would have show 5 songs in advance.

I'll send the sources to davjland tonight and he'll decide when to post v0.4
GREAT!

I haven't used itunes in a while, but if I am correct you can have it show 0 songs until it actually plays.  I like not know what is coming, just makes it funner that way.  It's not a bad thing as it is, just think of it as polish.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: datdude on August 15, 2008, 02:03:34 am
A few more feature requests, please!

1) The option to not look up the top songs of the Artist but to simply find a related Artist, and then play a random song from that artist from my library.  I am noticing that many of the songs are the same from the same artists.

2) Rather than selecting how often an artists shows up in consecutive songs, there should be a probability weight instead, that way when there are only a few related artists in my library, it keeps pulling it from them rather than choosing a random song, and this allows larger groups of related artists in my library to still be varied.  At least I think that is why it is choosing random songs when I don't think it should (because of small related artists pools)?

3) If it can't find a related artist in my library, then pick a random song from the same genre?  If none from the same genre, then from the same year?   Heck, just let us pick what fields we want it to choose from, and in what order of precedence!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: davjand on August 15, 2008, 01:16:58 pm
1)
So you basically want an option to disable the 'similar track for current artist' bit and just use the similar artist/top tracks method?

2)
I'll have a look at this, sounds like a good idea. The easiest way would be to predjudice the current algorithm to new artists and keep the old ones instead of just removing them and looking for a random track.

3)
This is in the feature list. If it makes the next version i'll just implement an option to select a song off a  smartlist with the view to extending it in later versions.

At the moment I'm working on asynchronous file downloads which requires a big code rewrite but I've done the worst of it. This also ties in with your request for no progress bar - I only added it to let the user know why jrmc was frozen! They key benefit though as it will allow more features to be added (ie neFasts's idea for 5 songs queued, if it doesn't freeze jrmc then you could create huge playlists of pregenerated tracks)
I'm also hoping to add autosave to the interface.

Your other request for adding smartlist style queries. I think the best way to do this will just be to select songs from an existing smartlist then you can use jrmc's query generator etc

The next version shouldn't be too long anyway
thanks

Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: datdude on August 15, 2008, 03:45:33 pm
1)
So you basically want an option to disable the 'similar track for current artist' bit and just use the similar artist/top tracks method?

I just want it to look up similart artists, then once it finds a matching artists it selects a random song of what I have.  How does the similart track for current artist work?  Acoustically similar?  Sounds like I need to play with it more to better understand how it works. ;D
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: davjand on August 15, 2008, 04:21:17 pm
There are two modes of operation so to speak and they're both based of the last.fm audioscrobble feeds:

1) use the similar Track feed which returns tracks which last.fm judges to be similar to the one played
2)use the similar Artist feed to get say 10 similar artists then use the top track feed to retrieve the top tracks for the artist.
[ur=http://www.audioscrobbler.net/data/webservices/l]You can see more info here[/url]

There is also some more info in the readme
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: datdude on August 16, 2008, 01:38:59 am
1) use the similar Track feed which returns tracks which last.fm judges to be similar to the one played
I don't see an option for this in the UI, or I have to manually change the feed in a config file?

Thanks
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.0.0.3
Post by: davjand on August 16, 2008, 04:56:45 am
There isn't an option to do so as of yet, but there will be in the next version.

It's not far from being complete, I just need to add the smartlist options mentioned earlier and I'll have a look at your weighting idea for prev played artists.
Should be out within a day or two.

Thanks
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: davjand on August 17, 2008, 08:58:37 pm
Hi

0.4 has been released, feeback welcome etc

Most of the features requested are in there in some shape and size (except streaming)

Enjoy!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: neFAST on August 18, 2008, 02:16:01 pm
Come on guys what are you waiting for? Download this great plugin!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: datdude on August 18, 2008, 10:26:21 pm
Seems like the "Only select songs from a playlist option" is not holding its selected playlist across restarts of MC.

I am confused on the difference between number of similar artist found and artist similarity?  What is the net effect of both?

I am starting to think it might be good to have a single slider that allows you to select more variety to less variety.  I am finding it hard in general to find the right balance based on my library.  Part of that is dependent upon the seed song selected and that makes it harder for me to tell if a change in the settings really made it more varied or not.  The key here is that I feel like I'm not sure if I make a certain combination of settings what effect it will truly have and if you dumb it down a bit and force more variety vs. less as a simple obvious choice, I wouldn't personally worry about this as much and I would just know what it is trying to do, even if sometimes it doesn't seem to have a certain effect.  Make sense?

It seems like there could be two different ways for the DJ to 'flow' the music.  One is to only select songs based on the last song played which I think is what it is doing now, and the other is to attempt as best as possible to keep selecting songs based on the original seed song, as it can get quite varied if this is not done which isn't necessarily a bad thing, it just might be a nice option to do that, to keep the playist a little more honest so to speak.  If it then moves to a new random song (because it couldn't find any more similar artists), or the users manually adds a new one in, either of those would become the new seed song.

One last issue I also have is the plugin only selecting top tracks.  I really could care less if it picks what other users think are top tracks, I just want it to find a similar artist then pick from ALL of the songs I have in my library from that artist.  If it is limited to only the top tracks, then that is a big flaw in my opinion as it pure and simply limits the number of songs I might hear, which is bad.  I can see that you can set the Top tracks to 50, but I have artists with a lot more than 50 tracks.

This thing is coming together nicely, and really completes the automation part of MC for me, so to speak.  I can just play a song, and not have to think about anything else!!!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: datdude on August 19, 2008, 12:38:23 am
If I play a System of a down song, it always chooses a Who song.  Last.Fm does not show them as a related artist.

Is it possible for this plugin to run in a background MC thread?  I notice that it slows down browsing for  a few seconds right before it chooses a song.

I really think there should be some sort of delay (preferably just add it in right before the last song ends) because if I pick a song, I don't necessarily want it to pick a new song right away, particularly if I am looking to add more songs to the one I just started playing.  At that point, he DJ feels like it is budging its way in when it shouldn't.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: davjand on August 19, 2008, 08:44:04 am
Hi

Thanks alot for your feedback!

The only select songs from a playlist not retaining its value is a bug and will be fixed.

With regards to not understanding the settings, There is more info in the readme (program files\j river\plugins\lastfmrecommend or similar) and opening post for each settings but I do agree that there is no indication what effects some of the settings will have. To be honest I don't know the full extent of how the settings will affect the variety but theoretically:

Artist similarity is a value obtained from last.fm as to how similar it thinks the artists are, the minimum value is therefore a cutoff point, tracks with less similarity aren't processed. Have a look here for an example (http://ws.audioscrobbler.com/1.0/artist/kano/similar.xml)

Number of similar artists to find is how many similar artists to look up top tracks for (this ties with artist similarity since the similarity determines what the maximum possible number is since artists are discarded with less similarity). The higher the value, the more possible artists will be looked up but since looking up top tracks takes time, the longer it will take.

I think having an option to enable 'use top tracks' is a good idea as this will allow either just top tracks or all tracks.

Anyway, that paragraph pretty much justifies simplifying things!!

I think a slider will be a good idea as it can be used to alternate between the methods. Something like this:

Left                        ->                              right
similartrack method                          similar artist/toptrack                            just similar artist

Within each of these there will be intermediate values that adjust the values. Possibly not for similartrack as there are currently no settings to change.
I'll look at implementing this soon!

The two flow options you discuss is an interesting idea that i hadn't thought much off. I don't think it would work very well with the similartrack method since not many songs are usually returned. However with similar artists (top tracks or no top tracks) it could be a good idea. The easiest way to implement this would be to set a number of songs to queue (say 10) then 10 songs would be added to the playlist on the first dj run. Then when they have finished playing, another 10 could be done for the last song. Is this workable with what you had in mind??

I agree with you about selecting a song and it feels like its budging. I'll look at a way of adding a song after so many seconds or a certain percentage played. It wouldn't make sense to execute the dj once the song has ended since it takes time to execute. I'll probably  allow you to select a percentage of the song played.

About the slowing down, it could be possible to run in another thread but I don't know much about this. However I'll look at optimising the current algorithm and this might help.

What exact system of a down track is it?  and are you using the similartrack method?

Thanks for the feedback

If anyone else has some ideas then please let me know.
For the next version (or maybe one after that) i'll look at implementing a way to stream the last.fm radion


Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: datdude on August 19, 2008, 11:13:28 pm
I agree with you about selecting a song and it feels like its budging. I'll look at a way of adding a song after so many seconds or a certain percentage played. It wouldn't make sense to execute the dj once the song has ended since it takes time to execute. I'll probably  allow you to select a percentage of the song played.
Or you could queue it up ahead of time and allow the user to select how soon before the song ends they want it added.

What exact system of a down track is it?  and are you using the similartrack method?
No.  I can pick any random SOAD song and it always picks a random Who track.  Not sure why.

For the next version (or maybe one after that) i'll look at implementing a way to stream the last.fm radion
Sweet!  Other than the timing issue, I think allowing the DJ to create a greater overall variety from one listening session to the next, is of up most importance to building a great plugin.  Adding in the streams would really help with that.  One thing I am noticing is that often times the same artist combinations are played over and over from one listening session to the next even with different seed songs,, it often times ends up in the same place.  This is I presume purely based on Last.FM, not something you built in, or somehow I configured it oddly?
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: datdude on August 20, 2008, 01:06:04 am
The more I am using this, the more I am seeing Who songs being played, not just for SOAD, but for bands like Mars Volta and Linkin Park.  Seems odd.  I have a library of over 9000 songs and 389 artists.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: morrison on August 20, 2008, 03:37:38 am
awesome plugin, thanks
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: davjand on August 20, 2008, 07:30:27 am
Hi

@datdude:

Could you please set debug logging to 4, enable writing of a debug file then run the DJ a few times(it will be really slow and probably freeze mc for 30ish seconds for each track) then email it to me at davjand AT yahoo.co.uk. Maybe run a few different artists that all seem to lead to the who being selected. The debug file should be located in the app data folder but you can change it in the settings.

Thanks
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.4 (18/08/08)
Post by: datdude on August 20, 2008, 08:07:09 pm
Done, just sent it to you.

It also seems to like to play a lot of my blues collection even from an artist like Pepper, which you'll see it chose.  And I tested it again with the same results just now.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.5 (24/08/08)
Post by: davjand on August 23, 2008, 07:39:22 pm
Hi

Just to let everyone know v0.5 is now released! See the first post for more information.

@datdude

Have a play with the new interface/settings etc and see what you think. Theoretically the slider implementation isn't as solid as I would like but to the normal user it should work. Let me know what you think!

I've had a reasonable look at the logs you sent me but I'm going to need more time to determine what the cause of the issues with regards to the same tracks being played repeatedly.

However one thing that I would highly recommend, is putting a limit modifier onto your alternate query (~no=500) as this could be one of the reasons for slowdown when processing data. The plugin was retrieving all 5000 tracks from your smartlist and hence freezing for a bit.

I look forward to your ever detailed feedback!!
Title: v0.51
Post by: davjand on August 25, 2008, 07:19:56 am
Hi
Just a quick bug fix For more info see the origional post
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: gummbah on August 29, 2008, 12:53:10 am
First, I must say this is the first plugin in its branche that is working for me.
I tried radio mode, but tends to move to general pop and rock music after some time. \
MusicIP also always gives me strange mixes, which is probably due to my taste of a wide varierty of music.
But your plugin just works great, so thanks!

I have an idea for a new feature, i.e. playlist generation.
So instead of getting only a song after the last song has started playing, you could also generate a playlist of a selected number of songs (let's say 50). Then you can still remove some songs, or add some. You could also use it to generate a playlist for a mobile device.

Another idea is to make it a bit smarter by giving the possibility to skip music, which then loads a new song, e.g. on the basis of a 2 or 3 songs back in the playlist.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: davjand on August 31, 2008, 07:38:10 am
Hi
Thanks for the input, for the next version I'm currently working on streaming last.fm's radio. Here's a brief overview of what to expect:


I like the idea of playlist generation/generating 50 tracks in one go and I'll try and implement this in the next version or version after. It just depends how long it takes for me to complete the radio code. The same can be said for the skip feature.

The next version isn't too far away, I'd say that I'm about 70% of the way through finishing the radio streaming code so if I'm not too busy with other things then it should be finished within a few days!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: gummbah on August 31, 2008, 09:04:18 am
Hi
Thanks for the input, for the next version I'm currently working on streaming last.fm's radio. Here's a brief overview of what to expect:

  • Stream songs that are similar to the now playing song. This is similar to how the autodj currently works but it will be streaming new tracks that you don't have in your library!
  • A mode to stream radio from Last.Fm's global tags like rock, classical, jazz, rap etc.
  • I don't think it will make the next version but I'd also like to be able to lookup the recommendations Last.Fm creates for your profile and then stream some of these. It definatly is possible but as I said, it probably won't make the next version.

I like the idea of playlist generation/generating 50 tracks in one go and I'll try and implement this in the next version or version after. It just depends how long it takes for me to complete the radio code. The same can be said for the skip feature.

The next version isn't too far away, I'd say that I'm about 70% of the way through finishing the radio streaming code so if I'm not too busy with other things then it should be finished within a few days!

Woaw that would be another great feature. Looking forward to it already. Keep up the good work!!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: datdude on September 02, 2008, 01:00:20 am
Installed the latest version and it seemed to work for a few hours, but now I keep getting these errors in the logs and it never works:

01/09/2008 10:53:44.653: Initialising LastFm Recommend - 0.51
01/09/2008 10:53:44.804: Error writing to settings file
01/09/2008 10:53:44.804: The process cannot access the file 'C:\Users\Media Center\AppData\Roaming\J River\LastFmRecommend\LastFmRecommend_settings.xml' because it is being used by another process.
01/09/2008 10:54:22.117: DJ will run in 360 seconds

I checked and I only have one instance of MC12 running, so not sure what else could be accessing that file.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: datdude on September 02, 2008, 01:04:09 am
Oh, wait I get it.  You are literally setting a timer.

Not a good idea.  If I fast forward in the song it will wait that many seconds no matter what.  Hopefully this can be made more accurate.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: davjand on September 02, 2008, 03:10:29 am
Occaisionally there are file errors due to windows indexing etc but I've never seen them repeatedly, you could try deleting the file listed and see if that helps. (you will lose all your settings though). Chances are though that it is a fileaccess bug in the plugin and i'll see if i can repeat it.

It isn't a timer being set, it is when the song reaches that time in playback so fast forwarding etc will be fine.  However if you change songs then it may not work exactly as intended. You may also encounter problems with having such a high value (i'm guessing you have a high percentage set there) since if the song ends before the dj can complete then it may just quit. I'm working on improving this for the next version though.

Just a quick update anyway, I'm just in the process of debugging the latest version so it should only be a few days.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: datdude on September 02, 2008, 08:00:33 pm
I'll keep testing, but I noticed that several times it would take a minute or so for the next song to pop up after the previous song ended, or it wouldn't play at all.  I just noticed that the log said it would run in 360 seconds, thinking this was purley a timer.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: llafriel on September 03, 2008, 03:23:05 am
I'm getting the same error as datdude, 'Cannot access file..'. Same error on two different machines.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: davjand on September 03, 2008, 05:49:14 am
Do you only get this error at startup?
Can you still save and load settings (settings are carried across after program ended)?
Do you get the error every time you change an option?

sorry if it's a bit crude but if you could answer then it would help. I think its more of a bug to do with initialising rather than a bug in saving the settings. As long as your settings are saved and restored when you close and open MC then don't worry about it.

I'll look into it though
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: llafriel on September 03, 2008, 07:11:50 am
No worries, not crude at all.
Only at startup, and settings are saved between sessions.
Couldn't get the plugin to work but found out why. Need to send just one song to 'Playing Now', not several.
Great stuff this plugin!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: llafriel on September 03, 2008, 07:13:34 am
Is it possible to install onto a portable install?
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: davjand on September 03, 2008, 07:33:58 am
I don't know the answer to that but i doubt it

If you (or anyone) has information about how to write/run a plugin on a portable install then I'll have a look at it and give it a try.
I'll look into it thoroughly once the next version is complete.

As I'm writing I'll give you a quick update:
The streaming features for next version (I'm going to call it 1.0!) are complete and I've eliminated what I hope are all the bugs. Just need to tidy the interface up and tidy up the track change processing functions that datdude mentioned.

Apart from that its working really nicely, streaming tracks on the fly, either as an autodj or as a radio. The Readme is going to take a while to update though!!

One interesting thing that I've had to do is download the tracks to a temp directory as I couldn't get MC to stream internally. What this means is that the tracks are on your computer so could be copied to your media directory permanently.
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: gappie on September 03, 2008, 07:53:45 am
this is great stuff. amazing. thanks.

 :)
gab
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: gappie on September 03, 2008, 11:14:43 am
i was wondering if this is an issue, or a limitation. when playing songs, and you start to look at some images, the plugin 'stops working'.
this is ofcource while when you start image playback when music is playing, mc makes an temporary zone, and the playing now with the music is not the active zone anymore.

anyway. enjoying this a lot.

 :)
gab
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: gummbah on September 03, 2008, 12:21:26 pm
Can't wait to get the new version :)
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: datdude on September 03, 2008, 12:56:38 pm
One interesting thing that I've had to do is download the tracks to a temp directory as I couldn't get MC to stream internally. What this means is that the tracks are on your computer so could be copied to your media directory permanently.
;D

Auto Import he we come!
Title: Re: New Plugin: Last.Fm Auto DJ (LastFmRecommend) v0.51 (25/08/08)
Post by: davjand on September 03, 2008, 05:42:53 pm
I'll build a keep button into the version after next ;D But in the next version you will be able to turn off automatic temp file cleaning so you could run auto import manually!

I've got rid of even more bugs now and just have a few little features to complete. I'll hopefully release a beta tomorrow or the day after!
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: davjand on September 05, 2008, 05:02:46 pm
Hey all

I'm pleased to announce the 1.0 beta version, see origional post etc.
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: davjand on September 05, 2008, 06:03:05 pm
Just a quick note:

If you select the previous song when a stream is playing, it essentially acts as a skip function, hence a double click on the prev button will do it!

I'm going to have a break for a bit but planned features for next version:
any bugfixes
option to keep files (allows other files to be deleted while keeping specific files)
playlist generation as requested
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: gappie on September 05, 2008, 06:22:33 pm
nice, im upgrading as we speek. thanks.
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: gummbah on September 06, 2008, 12:07:45 am
I get an error message and the plugin won't run  :(
This might be my own fault, but I don't know how to fix it.

I forgot to uninstall the old one, so after installation I noticed that both plugins showed up in the service list. I decided to uninstall both and did a clean install afterwards. Now version 1 did not show up in the service list, so I had to go to the plugin manager.
There it does show up in the interface list, but when I click on "show" I get the message: Interface plug-in 'lastfmdj'' could not be found or created.

I have them now both uninstalled, and now I get an error message on starting up MC: Interface plugin 'Lastfmrecommand is not the correct version.

Any help?
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: gummbah on September 06, 2008, 02:34:51 am
I removed any references to the plugin in the registry, and I was able to install without error messages.
The plugin is there under services, but now I cannot change anything in the options.

When I play a song I get a .net framework error message:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\Rob\Application Data\J River\LastFmDJ\temp'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
   at System.IO.Directory.GetFiles(String path)
   at MC_Plugin_LastFmDJ.MainInterface.setRadioNumberTempFiles() in c:\Users\Dave\Documents\Programming\MediaCenter\LastFmRecommend\06\MC_Plugin_LastFmDJ\MC_Plugin_LastFmDJ\MainInterface.cs:line 633
   at MC_Plugin_LastFmDJ.MainInterface.LoopTimerTick(Object sender, EventArgs e) in c:\Users\Dave\Documents\Programming\MediaCenter\LastFmRecommend\06\MC_Plugin_LastFmDJ\MC_Plugin_LastFmDJ\MainInterface.cs:line 968
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
MC_Plugin_LastFmDJ
    Assembly Version: 1.0.3170.39165
    Win32 Version: 0.6.0.0
    CodeBase: file:///C:/Program%20Files/J%20River/Media%20Center%2012/Plugins/LastFmDJ/MC_Plugin_LastFmDJ.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Interop.MediaCenter
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/J%20River/Media%20Center%2012/Plugins/LastFmDJ/Interop.MediaCenter.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: gappie on September 06, 2008, 02:34:58 am
i also get an error message. i did uninstall first. but uninstalling 1 beta, and reinstalling 0.51 was no problem.

after installing version 1 the interface of last fmjd did not react to any clicking. it looked disabled.
after starting a song i got a lot .net error messages. had to kill mc via taskmanager. the plug had placed a new song in my playing now though, or at least that is what i think .
this is the error message i get from .net.


Code: [Select]
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\gab\Application Data\J River\LastFmDJ\temp'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
   at System.IO.Directory.GetFiles(String path)
   at MC_Plugin_LastFmDJ.MainInterface.setRadioNumberTempFiles() in c:\Users\Dave\Documents\Programming\MediaCenter\LastFmRecommend\06\MC_Plugin_LastFmDJ\MC_Plugin_LastFmDJ\MainInterface.cs:line 633
   at MC_Plugin_LastFmDJ.MainInterface.LoopTimerTick(Object sender, EventArgs e) in c:\Users\Dave\Documents\Programming\MediaCenter\LastFmRecommend\06\MC_Plugin_LastFmDJ\MC_Plugin_LastFmDJ\MainInterface.cs:line 968
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

it looks like there is a reference to something on the machine it is made on..

 :)
gab

lol... posted at the same time....  8)
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: davjand on September 06, 2008, 06:00:50 am
Hi
If you create the folder 'temp' in
C:\Documents and Settings\USERNAME\Application Data\J River\LastFmDJ\

then this should solve it.

I'm working on it now, its the stupidist of errors as well :'( - Basically the code to update the interface forgets to check if the directory exists!
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: davjand on September 06, 2008, 06:12:47 am
Hi

I've updated the installer, it should be fixed now!
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (05/09/08)
Post by: gappie on September 06, 2008, 06:52:30 am
Hi

I've updated the installer, it should be fixed now!

yes, it is.

thanks

 :)
gab
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (06/09/08)
Post by: gummbah on September 06, 2008, 12:03:15 pm
Thanks for this great plugin!!
I am playing with it and love it.

One thing I noticed is that the streams have quite a low volume compared to my own files.
I have tried lowering the volume through volume leveling settings, but that does not work, because it also lowers the volume of the streams.

Do you think it is possible to pump up the volume of the streams or have an option to allow the user to adjust it (I assume there can be major difference between the base volume of different users)?

Thanks!!
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (06/09/08)
Post by: davjand on September 06, 2008, 12:23:43 pm
I noticed the same volume thing but wasn't sure if it was just my setup. I've found that some tracks are ok though. It should be pretty easy to build in a volume boosting tool - lowers the volume to a set amount when a normal track is playing and boosts it when a stream starts. I'll have a look into it.

Here's what I was thinking for the next version anyway:

Playlist generation - generate a library playlist (or now playing) from the now playing song.
Keep streams - hit a keep button to copy tracks to a keep directory - MC's move and rename function could then be used to copy them to your lib
Volume monitoring - as mentioned above

Friendly user interface - since there is no option for an action pane plugin the UI isn't the most friendly since you have to go to the plugin pane  to access skip controls and potentially keep controls so here's an idea I had:

Have a group of playlists , Last.Fm skip, Last.Fm Keep, Last.Fm Generate which are kept empty. When a song is added to any, the plugin can retrieve the track data and perform the relevant action, if it's a stream then it could be kept/skipped. If it was a normal song on the generate playlist then the playlist generation could start from there.

I'm going to have a break for a few days and fix any bugs but then I'll start some work. Just a quick note though, I'm only going to be able to keep this regularly updated for another two weeks since I'm going to university on the 20th. I'll still be around but I doubt I'll have much time to code. I'll release the source code before I go anyway so if anyone wants to continue then they can.

Also, for anyone whos got access to the beta, is this currently compatible?
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (06/09/08)
Post by: gummbah on September 06, 2008, 01:07:21 pm
Personally if you have limited time I would prefer to have at least the volume leveling functionality. Without it it makes the mixing of library songs and streams quite unusable for me. The other functions are secondary to me.
Hope this helps.
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (06/09/08)
Post by: gappie on September 06, 2008, 02:40:46 pm
Also, for anyone whos got access to the beta, is this currently compatible?
you better check yourself. 10 september there will be a version available on the 12 board. it could be that it is to early to tell now.

gab
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (06/09/08)
Post by: datdude on September 06, 2008, 04:32:06 pm
Personally if you have limited time I would prefer to have at least the volume leveling functionality. Without it it makes the mixing of library songs and streams quite unusable for me. The other functions are secondary to me.
Hope this helps.


That and preventing it from resetting if the buffer fails.  Could you setup a secondary buffer?
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (06/09/08)
Post by: davjand on September 06, 2008, 05:22:19 pm
@datdude, do you mean that if the download fails, start the autodj again?

I'm working on a volume levelling function, should be done before the end of the night (its 11 in the uk ;))
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: davjand on September 06, 2008, 06:17:22 pm
Right that's volume levelling added, feedback is welcome!
Title: Re: New Plugin: Last.Fm Auto DJ v1.0 beta (06/09/08)
Post by: datdude on September 06, 2008, 07:56:04 pm
@datdude, do you mean that if the download fails, start the autodj again?

I'm working on a volume levelling function, should be done before the end of the night (its 11 in the uk ;))

No Just thinking of a way to prevent it from restarting, some sort of way to fake it out...

I guess a better question is, what is causing it to restart playback when this happens?
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: davjand on September 07, 2008, 03:57:50 am
There are still a few minor bugs that cause playback to stop that I've been unable to track down so far.

Another sort of bug is that when the download is going too slow to keep up with playback then it will have to pause and buffer-this is normal. However when this happens I couldn't get it to resume from the same place that it left off so it just restarts the song - is this what you are referring to? I'll have a look at it anyway and see if I can find a way around it.
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: gummbah on September 07, 2008, 07:06:01 am
All seems to work pretty fine so far. Volume leveling is doing an excellent job.
I only had one crash, when I wasn't even playing a song in MC, but it was the same netframework error I got earlier.
Next time it will happen I'll report the exact error here.

One issue I noticed was that when a song is played from my own library followed by a streamed song, the gap between artists is not respected. The same artist is played immediately after another, while I have a medium artist gap of 5 defined in the options.

Finally, streamed songs are automatically deleted from the now playing playlist. Is it possible to keep them in the playlist? So I can always check back which songs were played. I do not want to keep the temp files though.
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: davjand on September 08, 2008, 07:57:55 pm
Hi, I forgot to add the removed recent artists etc code to the radio streaming function so I'll slip it in for the next version. There currently isn't an option to allow the songs to remain on now playing. When deleting files MC will throw errors if they are still on the now playing so the easiest way to allow you to look at songs would be to have a list on the radio pane of songs streamed.

I've not done much work yet but for the next version I'll just add the things mentioned above and implement a way of keeping files while deleting the temp files.

Anyone else got any feedback? Cheers
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: gummbah on September 09, 2008, 12:58:35 am
There currently isn't an option to allow the songs to remain on now playing. When deleting files MC will throw errors if they are still on the now playing so the easiest way to allow you to look at songs would be to have a list on the radio pane of songs streamed.

An option to delete files upon MC closure might be a good way to go?
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: datdude on September 09, 2008, 09:38:06 pm
Might be a good idea to add in buttons for banning or loving a radio song?
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: davjand on September 10, 2008, 06:00:03 am
As far as I know, there is no event fired when MC closes so I don't think that would work. However, clearing files on startup might be a good alternative.

Quote
Might be a good idea to add in buttons for banning or loving a radio song?

Do you mean that you want it to ban/love songs and communicate this to your last.fm profile?
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: datdude on September 10, 2008, 12:40:40 pm
Yes.  This isn't that big of a deal, but would be a cool feature.

Besides that, I am hoping you can make it work for MC 13 now that it is released!
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: davjand on September 10, 2008, 12:58:23 pm
I'll have a look at it when I can get my hands on it  ;) Only a few more hours anyway...
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: gummbah on September 16, 2008, 11:59:17 am
Hi Davjand, any news on progress?

Thanks!
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: davjand on September 16, 2008, 01:30:07 pm
Hi, I've not had a huge amount of time this last week, had to finish another project and have been getting ready for uni!
I've finished version 1.2 which has a few bug fixes and improved keeping file logic - click to keep a file and copy it to a keep directory then import etc. I've just got to update the readme etc so I'll upload it in a few hours.

I would like to get some playlist generation feature added before the end of the week but I'm not sure I'll have time.

I've also been trying to get it working with MC13 but i think the problem is with MC13, I've updated the installer anyway so it should work with MC13 when j river find out what the problem is. This means that it will also work with media jukebox as well.

EDIT: Going to be tomorrow, just found a bug  >:(
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: gummbah on September 22, 2008, 10:31:48 am
Hi, sorry to come back again, but I am just hoping that you'll find the time to release the new version.
The fact that when the plugin switches between stream and library audio does not respect the limits for artist repetition is annoying.
Otherwise it is working like a charm.
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: bennyd on October 02, 2008, 12:14:11 pm
Any progress on getting this to work in MC13 ?
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: datdude on October 02, 2008, 08:16:33 pm
It's up to JRiver: http://yabb.jriver.com/interact/index.php?topic=48227.0
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: Messiahs on October 03, 2008, 03:08:24 am
Now solved in MC13.
But you have to save your values to:
HKEY_LOCAL_MACHINE\SOFTWARE\JRiver\Media Jukebox\Plugins\Interface\yourPlugin

... but if you click on a button a error is thrown.

M.
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: datdude on October 03, 2008, 08:11:59 pm
Except davjand never released the 1.2 version which is supposed to support MC13.  Messiahs, I copied the keys over and it does show up in the MC interface, but the tabs are all blank.
Title: Re: New Plugin: Last.Fm Auto DJ v1.1 beta (07/09/08)
Post by: Messiahs on October 03, 2008, 09:19:16 pm
@datdude
here is the same. The plugin now loads, but the tabs are blank too.
I think it's a MC13 bug. I also tested it with my own plugin... not the same behaviour ( my plugin throws an error when i click on a button.)

M.
Title: v1.2
Post by: davjand on October 05, 2008, 03:11:34 pm
See the first post.

Sorry but i haven't added support for not streaming the same artist etc as I've been busy. It should hopefullly support MC13 depending on j river as  it now adds the registry key that messiahs mentioned-also allowing it to work in MJ.

Not got a huge amount of time at the moment but let me know any problems/requests etc

I've also added the source if anyone wants to have a play etc.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on October 05, 2008, 03:57:00 pm
It now works with MC13,woo hooo!

I do get a .Net error every time I first access the plugin but if I hit continue, I am able to save changes.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on October 05, 2008, 04:12:27 pm
I've had a brief look at the error, the main problem is that it causes my debugger to crash as well and I don't have anytime to investigate further. Could people please tell me if other interface plugins get the same error as if this is the case then it is probably a bug in MC13 and hence nothing i can do about it. I don't really want to spend ages trying to find a bug if its in MC13!

Thanks for the headsup anyway!
Title: Re: v1.2
Post by: gummbah on October 06, 2008, 01:30:11 am
Sorry but i haven't added support for not streaming the same artist etc as I've been busy.

I understand, though I still hope we'd see this soon.
Maybe I have a look myself, and this could be the start of a new carreer (I only programmed quickbasic in the 80s) :)
In what language is this written?
Or maybe someone else could fix it?

Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on October 06, 2008, 11:15:08 am
It's writtin in c#

For any programmers out there the problem is that i have two data structures - one for tracks recieved for streaming and one for tracks that are currently in the library. However i only have a function to remove recently played artists for the second of the data structures. All that needs to be done is create a copy of this function and rewrite a few parts of it for the other data structure. I think it is the helper source file. I will look into it when i get time but i have very little at the moment!
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on October 06, 2008, 10:55:59 pm
davjand,

What do these log statements mean?

AutoDj is already running, cancelled new AutoDj
AutoDj is already running, cancelled new AutoDj

I played several songs in a row, it picked several, then I think I picked a new one in the middle of a dj picked one and then nothing happened.  The only way to get it to work again was to restart MC.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: bennyd on October 11, 2008, 03:06:17 am
I can confirm that with the latest build of MC13 this wonderfull plugin is now working.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on October 11, 2008, 01:20:36 pm
That is good news!

@datdude

That logging message is a little bit deceiving: Due to the nature of the plugin and the fact that essentially two dj's can run at once (one streaming a track, one getting a new track etc), every time an event is fired, ie track is skipped/track is changed etc then the dj assumes that a new dj needs to be run. It then checks that one needs to be run and that message is seen when one isn't needed. I hope that makes sense, it essentially just a consequence of the structure of the plugin.

There are a few bugs that crop up with the dj just stopping and I've encountered them a few times. However as they aren't consistent it makes it very difficult to debug. If you ever get to a position where you can repeat an individual bug then please give me details. To find out more about the problem you can increase the logging level to 2 or 3 to get more details.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on October 12, 2008, 12:40:30 am
Will do.  It doesn't happen all the time for me either.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: tboy34 on November 14, 2008, 05:29:59 pm
Is this compatable with Media 13? I can't seem to install it.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: bennyd on November 15, 2008, 01:02:16 am
Is this compatable with Media 13? I can't seem to install it.

As you can see in the posts above, it is compatoble with MC13.

The only thing you have to do is change the install path to "Media Center 13" in stead of the prefilled in "Media Center 12".
(it will prompt you for the path during installation)
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: tboy34 on November 15, 2008, 04:27:24 am
As you can see in the posts above, it is compatoble with MC13.

The only thing you have to do is change the install path to "Media Center 13" in stead of the prefilled in "Media Center 12".
(it will prompt you for the path during installation)
As you can see in the posts above, it is compatoble with MC13.

But I cannot find the link for it, and I'm not sure how to install it. I tried to install it and got an error message in media 13. Would you be kind enough to tell how to install it. I need another download for it.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on November 15, 2008, 08:29:28 am
If you have already tried installing it, make sure you've uninstalled it via add/remove programs not just from within the plugin manager in MC.

You shouldn't need to change the path by the way.

Also make sure you have the latest MC build.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: tboy34 on November 15, 2008, 08:58:18 am
If you have already tried installing it, make sure you've uninstalled it via add/remove programs not just from within the plugin manager in MC.

You shouldn't need to change the path by the way.

Also make sure you have the latest MC build.

Could someone direct me to the link to get this download again. I tried what you said and I still got an error message before. I lost the file by the was.

Ok after searching some more I think I found the file. Yet it will not install. I went into Media 13 and chose plug-in's and tried to install this file: MC_Plugin_LastFmRecommend.dll, then I get an error message. Can anyone shed some light on this?  ? ? ? ? ? ? ?

Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on November 15, 2008, 06:49:33 pm
Hi

Sorry, I misread your post due to the quotes. You can get it here (same as link in first post) (http://www.oughtibridgegala.co.uk/downloads/JRMC_LastFmDJSetup_120.exe)
If you got it from the j river website then that is currently only v1.1 which could be causing problems, I'll go about getting it updated now.

To install:
remove any previous versions using their uninstallers
if you've used mc's plugin manager to install then uninstall via that as well.
run the downloaded file and follow the installer, you shouldn't need to change the path.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: tboy34 on November 15, 2008, 07:36:54 pm
Hi

Sorry, I misread your post due to the quotes. You can get it here (same as link in first post) (http://www.oughtibridgegala.co.uk/downloads/JRMC_LastFmDJSetup_120.exe)
If you got it from the j river website then that is currently only v1.1 which could be causing problems, I'll go about getting it updated now.

To install:
remove any previous versions using their uninstallers
if you've used mc's plugin manager to install then uninstall via that as well.
run the downloaded file and follow the installer, you shouldn't need to change the path.

Thank you I did what you said, and it worked. I love this plug in. You can just go do other things and get musical surprises. I noticed that Media 13 is a lot faster too. While the new track is coming. It checks very, very fast. Thank you again.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: runemail on November 17, 2008, 12:22:23 pm
First: Thank you for writing one of the best plugins for MC in a long time!   ;D

Just one small thing: Streamed tracks gets this anoyng "STREAM:" prefix to the songname. Is there a way to remove this?

Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on November 19, 2008, 03:02:32 pm
It should be removed automatically when you 'keep' a track, otherwise it is essentially just a half streamed track (not complete).
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: runemail on November 21, 2008, 11:48:39 am
It should be removed automatically when you 'keep' a track, otherwise it is essentially just a half streamed track (not complete).

It shows up on Last.fm like this:
Gene – STREAM: Still Can't Find the Phone

Would be nice if it at least became optional to have the "STREAM:" prefix. Off course this can be fixed by replacing "STREAM:" with "" in the Last.fm plugin, but it would be even greater to remove the "STREAM:" prefix totally.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: runemail on December 06, 2008, 09:52:02 am
I get a .NET framework error from this plugin.

"Object reference not set to an instance of an object."

Running Vista 64 and MC13. But I also see this error on my old laptop running xp.

Should i Post the log here?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on December 07, 2008, 05:23:24 pm
When do you get it?

You can post a log which I'll have a glance at (just post a level 2 log for now) but I don't have a huge amount of time at the moment.

As I've mentioned before, there are a few random bugs here and there, a few result in .net error frameworks but they are extremely hard to repeat and thus solve. They don't seem to affect the plugin 99% of the time and the time it would take to track them down would be huge so I've not bothered looking into them.

Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: mabes on January 06, 2009, 03:58:11 pm
I've been using this the last couple of days and it is GREAT! Can I send you a check?  ;)  One question, sorry if this has been answered but I can't find it. If a song is playing by a certain artist and I like it, can I have the DJ find other songs by that artist only, and not random songs?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on January 06, 2009, 06:18:35 pm
Sorry but it isn't currently possible to do that but it would be an easy feature to implement which I may look at when I next have some time. Sorry as well by the way as I've been busy over christmas so didn't get chance to add any of the extra features that I wanted to :(

It would be quite a simple thing to add though so I may have a look at it over the coming weeks (or possibly months as I'm quite busy).

I wasn't going to ask for donations but if you would like to donate then I'm open to them! (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2320635)

Cheers for the feedback guys!
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: mabes on January 08, 2009, 03:05:36 pm
I'll make a donation once I get a little extra cash.

To clarify the above post, what I was thinking of was a checkbox like "find other songs by currently playing artist"

One other option I thought of. Now you have the option of saving all tracks or selecting the ones to save as they play. But the latter doesn't work in Theater View AFAIK. So maybe allow the option to keep all tracks that play all the way through. If you skip it, it is discarded. 
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on January 15, 2009, 12:16:39 am
I think what would be really cool, is if there was a way to take that idea, plus other options, and make them available in the taskbar as toolbar option, so that you don't have to change the playing now screen in  MC to get to the 'hidden' plugin settings.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: mabes on January 17, 2009, 09:15:35 pm
Anyone know why all songs get tagged as Blues and how to change it?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on January 18, 2009, 06:06:49 am
The plugin doesn't attempt to set the genre of the songs downloaded as the information isn't immediately available on last.fm. It must be the default setting for MC?

datdude, are you talking about the top or bottom toolbars? I'm not sure if it is possible to add your own buttons, does anyone know of anyway to do this? I don't have much time at the moment but I will investigate it further at a later date.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: mabes on January 18, 2009, 12:53:22 pm
Genre is being set even before songs start to play. MC must be applying it to streams, but I don't see an option to change it.

Not a huge deal, I don't use Genre Blues, I have Blues and Soul, so if I see Blues I know it's from the DJ. I'll still see if I can fix it just to make things cleaner.

Is there a way for the DJ to remember my password?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on January 18, 2009, 02:03:50 pm
The plugin doesn't attempt to set the genre of the songs downloaded as the information isn't immediately available on last.fm. It must be the default setting for MC?

datdude, are you talking about the top or bottom toolbars? I'm not sure if it is possible to add your own buttons, does anyone know of anyway to do this? I don't have much time at the moment but I will investigate it further at a later date.

I'm talking about the Vista Taskbar.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on March 23, 2009, 07:08:42 pm
Hey guys, I'm back around for a bit at the moment!

@mabes
1) I'll have a look into genre at some point but it's most likely MC's auto tagging or something
2) It does remember your password - it is encrypted before it is stored so the password box can't be refilled with characters when you re-open MC. It does remember it though and is only changed if you type a new password

@datdude
I'm sure it is possible but it would most likely be quite a major project. Depending on how much time I have I might look into implementing the playlist control idea that I mentioned before.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Arbiter on March 25, 2009, 12:08:10 pm
Seen the news?

last.fm is turning into a subscription per-month model for music streaming... more on the matter -> http://lifehacker.com/5183571/lastfm-goes-paid+only-for-international-users-kills-unofficial-mobile-apps


What will be the future for this fantastic plugin?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on March 25, 2009, 02:53:54 pm
Hey guys, I'm back around for a bit at the moment!

@mabes
1) I'll have a look into genre at some point but it's most likely MC's auto tagging or something
2) It does remember your password - it is encrypted before it is stored so the password box can't be refilled with characters when you re-open MC. It does remember it though and is only changed if you type a new password

@datdude
I'm sure it is possible but it would most likely be quite a major project. Depending on how much time I have I might look into implementing the playlist control idea that I mentioned before.


Davjand, since I have been using Theater View more now, this request really would not do much for me.  Somehow incorporating this into Theater View would be great however.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: mabes on March 26, 2009, 02:14:12 pm
Seen the news?

last.fm is turning into a subscription per-month model for music streaming... more on the matter -> http://lifehacker.com/5183571/lastfm-goes-paid+only-for-international-users-kills-unofficial-mobile-apps


What will be the future for this fantastic plugin?

Chuck Berry said it, I'm so glad I'm living in the USA. Anything you want we got it right here in the USA.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on March 27, 2009, 06:06:55 pm
It sounds like the radio api is going to be locked down so that functionality is going to be lost. It might take a bit of work but hopefully I should be able to re-implement it with whatever new api they bring out. Obviously this will probably require a payed for account if you're not registered to the free countries (US, UK, Germany I think).

It'll be interesting to see how they lock this down as you could maybe just say you're from another country or maybe use a proxy??

Hopefully the statistics api (what the non-streaming dj uses) will remain untouched so that should work as it currently does.

I'll look into things when there is more news. Please let me know when you start experiencing problems however as I may not experience any as I'm in the UK
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on March 28, 2009, 02:07:56 pm
The plugin has been working great as far as the track look up goes. 

However the plugin seems to be a bit iffy in terms if it decides to play something or nothing at all.  I think this happens when the music is stopped manually by me and then if I resume playing of a new song without restarting MC, I think the plugin gets confused, and only restarting MC gets it going again.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: apeters on April 10, 2009, 05:07:52 am
Hello!
Realy nice Plugin. But I have one Feature request. Can you build in a Streaming Feature, so that upnp Clients can use your Plugin. I think this would be nice for everyone.

Some bugs i found (i think that thats bugs):
- if i hear music from a library server, the autodj doent do anything
- sometimes there comes a .NET Errormessage with a object reference exception. Until now, no way to reproduce it found.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on May 28, 2009, 03:16:10 pm
Still enjoying those Last.fm picks!

One thing I am noticing is that the plugin picks a song even when there is a full album of music left.  Shouldn't it wait until the last song in the queue starts playing?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on June 20, 2009, 06:34:45 am
Hi all, sorry for the lack of activity, I've been reading stuff just not posting as I've not had any chance to do updates etc.

I'll have some free time soon so I may do a few updates. Over the last few months I've discovered a few reproducable bugs:
1) If you click stop/pause when a track is being streamed, when the download is finished the player will restart. Should be simple to fix.
2) An exception occurs when the data from last.fm has characters that the xml parser doesn't recognise. I think this is the main reason that exceptions occur.

@datdude, it shouldn't be doing that, are there any circumstances that you can reproduce it? Just to check, you aren't adding single tracks to the playing now as it scans the playing now for tracks left?

@apeters, I've never used it with a library server, could you please just detail your setup so I can have a play around with it.
I really don't know much about upnp, could anyone point me in the direction of what might be needed to do this?

Just to check as I've not tried it, is it fine with MC14?

Cheers guys
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: broncodan on June 21, 2009, 01:03:24 pm
Can this plug in retrieve the play counts and date last played from lastfm and import these into the MC library? 

It would be great if it could do this (there is a similar plug-in for itunes but i hate itunes).  This would be a great feature as there are many times I do not play songs through MC that don't get counted.

If you search on the internet you will see the itunes plug-in = the functionality is okay but there are some issues for someone with a large libary - for one it doesn't keep track of the last time it was run - so it updates all the songs each time (and for those songs in your library that are duplicates - you have to either accept a global change for all these songs - or plod through them manually if you don't want them all changed.)

A few requests/suggestions if this could be done -

add a lastfm sync column to MC library - and then each time it sync's it could check that date vs. the date last played in lastfm and this would help determine if an update is required for a particular song.

For multiple songs with same artist, name - the option to choose the song with the earliest year to get credit for the playcount - this will usually give the original version the credit if you have multiple copies of a song from compliation albums.


Thanks in advance for your consideration.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on June 23, 2009, 02:19:04 pm
@datdude, it shouldn't be doing that, are there any circumstances that you can reproduce it? Just to check, you aren't adding single tracks to the playing now as it scans the playing now for tracks left?

No I am adding in full albums or playlists.

This really isn't that big of a deal.

The main thing I hope is improved or maybe you can help me determine if I am doing something wrong is that I constantly run into the "AutoDj is already running, cancelled new AutoDj" error.

Is anyone else running into this issue?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on June 23, 2009, 07:34:13 pm
Don't worry about that 'error' at all. It isn't actually an error, it's part of the program logic - the dj reacts to a MC event and looks to see if a new autodj is needed, if it isn't then in cancels the process of running a new one + that is shown. It's just a simple logging issue, I'll alter the phrasing and make it a higher log number so you won't see it!

Thanks for the input
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on June 23, 2009, 09:35:06 pm
The problem is that when that error occurs, the DJ stops running, ie no more songs are chosen, and the music stops.  For some reason it thinks on my system that there is allready a running copy and then aborts.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on June 24, 2009, 03:02:11 am
Ah ok. Is this when streaming tracks or djing local tracks? How often does it occur. If you increase the logging level to 2 or 3 then copy the log to here or email me then I'll have a look. Thanks
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on June 24, 2009, 12:13:54 pm
Its just playing local files, no streaming.  I'll send a log hopefully today.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on June 24, 2009, 11:55:23 pm
ok, here u go.  I tried just copying the relevant data, let me now if you need a longer history.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on July 08, 2009, 07:32:33 pm
Hi I had a look through it the other week but couldn't find anything. If you can get a more detailed log then that would help. I've a few questions that might help me replicate it etc...

Does it always happen with a specific artists/tracks ?
What setting is the mode in (advanced tab, mode at the bottom)?
What is the value for "Run Dj when last track has % played" ? - If this is quite high then decreasing it might help.

I'm a little busy again but I hope to release a new bugfix version soonish (week or a few) - I've fixed one of the unhandled exception errors and I'm going to look into stopping it automatically playing when it selects a new track after you have stopped it. I know what it's doing, I just need to figure out how to prevent this!

Thanks again
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: taklamakan on July 08, 2009, 09:00:36 pm
I'm new to this plug-in and now that I've tried it there's really only one word for it: FAN-FREAKIN-TASTIC!  Way to go. And source code too. You're the man.

I notice that steaming isn't working. Have you ported to the new APIs?  I'm in Canada, but I'm a last.fm subscriber and I've double-checked that I've entered me credentials correctly.

Sample logs from Radio, but similar patterns occure with StreamingDJ:

Quote
Running Authentication with Last.Fm
Getting playlist from Last.Fm
Buffering deneÌ sled by Pick A Piper...
Error downloading file: http://kingpin6.last.fm/user/e24b5630b809f5af0fafa842e7848aeb.mp3
Radio Error, deleting task
Running Radio
Running Authentication with Last.Fm
Getting playlist from Last.Fm
Buffering Not at Home by Peter Broderick...
Error downloading file: http://kingpin6.last.fm/user/a89bfe1cea741e39223bfed5b6d3021d.mp3
Radio Error, deleting task
Running Radio
Running Authentication with Last.Fm
Getting playlist from Last.Fm
Buffering Takk... by Sigur Rós...
Error downloading file: http://kingpin6.last.fm/user/98489fadaabdc19ca6abea69e37f18df.mp3
Radio Error, deleting task
Running Radio
Running Authentication with Last.Fm
Getting playlist from Last.Fm
Buffering Today I was an Evil One by Bonnie 'Prince' Billy...
Error downloading file: http://kingpin6.last.fm/user/83654ce9adf58ac4c0ecad272913c760.mp3
Radio Error, deleting task
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on July 09, 2009, 12:31:10 am
Hi I had a look through it the other week but couldn't find anything. If you can get a more detailed log then that would help. I've a few questions that might help me replicate it etc...

Does it always happen with a specific artists/tracks ?
no.  it seems to be random

What setting is the mode in (advanced tab, mode at the bottom)?
all tracks for similar artists

What is the value for "Run Dj when last track has % played" ? - If this is quite high then decreasing it might help.
80%

I'm a little busy again but I hope to release a new bugfix version soonish (week or a few) - I've fixed one of the unhandled exception errors and I'm going to look into stopping it automatically playing when it selects a new track after you have stopped it. I know what it's doing, I just need to figure out how to prevent this!

Thanks again
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: ruze on July 18, 2009, 07:04:54 pm
I have the same issue as user taklamakan above, no streaming at all :(

Here's a bit of my log at level 4...

Generated query: [Media Type]=[Audio] (([Name]=[Sing this song] and [Artist]=[Fantazja]) or ([Name]=[More Serotonin] and [Artist]=[Neuroactive]) or ([Name]=[In Different Things] and [Artist]=[Rename]) or ([Name]=[Digital Delays] and [Artist]=[Cosmicity]))
4 track(s) found that aren't in the current music library
Creating temp file to stream: C:\Users\john\AppData\Roaming\J River\LastFmDJ\temp\Stream1.mp3
Streaming url: http://kingpin5.last.fm/user/9376aacc2bb04ea4650f15d645aa1458.mp3
Sing this song by Fantazja
Buffering Sing this song by Fantazja...
Error downloading file: http://kingpin5.last.fm/user/9376aacc2bb04ea4650f15d645aa1458.mp3

Download Failed: http://kingpin5.last.fm/user/9376aacc2bb04ea4650f15d645aa1458.mp3
FileName: C:\Users\john\AppData\Roaming\J River\LastFmDJ\temp\Stream1.mp3
Radio Error, deleting task


Would love to hear any feedback on this.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on July 24, 2009, 08:10:00 pm
Hi I had a look through it the other week but couldn't find anything. If you can get a more detailed log then that would help. I've a few questions that might help me replicate it etc...

Does it always happen with a specific artists/tracks ?
What setting is the mode in (advanced tab, mode at the bottom)?
What is the value for "Run Dj when last track has % played" ? - If this is quite high then decreasing it might help.

I'm a little busy again but I hope to release a new bugfix version soonish (week or a few) - I've fixed one of the unhandled exception errors and I'm going to look into stopping it automatically playing when it selects a new track after you have stopped it. I know what it's doing, I just need to figure out how to prevent this!

Thanks again

since i bumped it down to 70% complete i havent had any problems, so maybe that solved it.

one comment i have on the streaming is that i would use it more if there was a way to make sure it didnt stream any songs allready in my library.   doeas that make sense?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on July 25, 2009, 04:41:55 am
Hi
I don't use the streaming feature much ironically but it seems that they've finally switched off the old radio api that I've used. I'm  quite busy with website design at the moment so I'm struggling for time but I will have a stab at updating it in a few weeks.

@datdude: The plugin does attempt to remove any tracks from the streaming playlist that you already have in the library but it requires them to have the exact same artist and track names - any small differences will prevent it from working properly. When I have a look at porting it, I'll see if i can optimize the code as well.

Thanks everyone.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on July 25, 2009, 12:20:49 pm
i may have found another bug.  the music stopped playing when it should not have so i checked the log and saw this:

"Searching for similar Artists to Led Zeppelin on Last.Fm
No artists to search for top tracks"


shouldn't it have used the alternate method option, which i have checked in the settings?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: gshaver on September 15, 2009, 11:47:26 pm
have installed your plugin attempting to play last fm radio, but not luck....keep getting error:
Initialising LastFm DJ - 1.20
Running Radio
Running Authentication with Last.Fm
Getting playlist from Last.Fm
Error downloading radio data
Getting playlist from Last.Fm
Error downloading radio data
Getting playlist from Last.Fm
Error downloading radio data
Getting playlist from Last.Fm
Error downloading radio data
Getting playlist from Last.Fm
Error downloading radio data
Download Error, the connection timed out for the maximum number of times

any advise greatly appreciated....loging is my login with last fm
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on September 16, 2009, 12:40:22 am
Firewall or anti-virus problem?  What kind of network are you on?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Richee on September 18, 2009, 10:34:24 pm
I get the exact same error as gshaver and that was with my virus checker disabled in order to test. I am on cox.net but it seems I had LastFMDJ working at one point although it worked on and off. I don't have a clue why it is no longer working.

Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Richee on September 18, 2009, 11:38:13 pm
I forgot to mention I use AVG Internet Security with built in firewall, so by shutting down AVG I assume firewall shut down as well. The firewall for XP Home is off.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: JimH on September 19, 2009, 07:19:41 am
Make sure you're logged in to Last.fm.  Try outside the program.

Sometimes Last.fm has problems.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: gappie on September 19, 2009, 07:24:34 am
today, 19 september, last fm is doing some bigger maintainance to the server scrobling etc does not really work. see: http://status.last.fm/

 :)
gab
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: davjand on September 23, 2009, 01:22:36 pm
Hi all

Sorry but been very busy so I've not had time to update the plugin. The autodj aspects still work fine but the radio aspect needs tweaking/possible rewrite to adapt to the new Streaming API that has been released. At the moment, the radio function doesn't work even if you are a last.fm subscriber (tell me if it does).

I'm unlikely to have any time soon to update this but I have released the sourcecode if anyone does want to have a go- the functions that need rewriting are within the LastFmRadio class and are the request builders and xml parser functions.

Basically, turn off the radio features and the rest of the plugin will still function. Untill the plugin is updated then this won't work. If I get time, I will have a brief look at it this weekend but it is going to take me a while to learn the new api and adapt the plugin for that.

With regards to current bugs in the plugin, there are a few bugs that appear when downloading data for certain artists/albums. I do know how to fix these but again, time is the issue!

@datdude, thanks for the input, I'll look into it if I find the time.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: datdude on April 04, 2010, 05:58:49 pm
Is anyone else not able to connect to the last.fm service using this plugin? 

I have internet access and can use last.fm from my browser, but this plugin will no longer find similar artists/tracks or play the radio function.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: craft on April 13, 2010, 11:04:50 pm
null
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Systex on May 23, 2010, 02:58:57 pm
I know this thread is old, but I really like this plugin when it works. Here's the problem:

I'm using the Auto DJ feature to add a similar track once the current playing track is 1% done. Every once in a while (every 5-10 songs?), when the script is running I get a .NET unhandled exception saying that "Value was either too large or too small for a Decimal". Here's the details of the error

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.OverflowException: Value was either too large or too small for a Decimal.
   at System.Decimal.FCallMultiply(Decimal& result, Decimal d1, Decimal d2)
   at MC_Plugin_LastFmDJ.MediaHelper.weightRecentArtists(List`1 listTracks, Int32 PrevArtistCountToCheck)
   at MC_Plugin_LastFmDJ.LastFmAutoDj.processRawTracks()
   at MC_Plugin_LastFmDJ.LastFmAutoDj.processData(Int32 calledDownloadType)
   at MC_Plugin_LastFmDJ.LastFmAutoDj.runDJ(DJACTION action)
   at MC_Plugin_LastFmDJ.LastFmAutoDj.processTask(Int32 taskId)
   at MC_Plugin_LastFmDJ.LastFmAutoDj.process()
   at MC_Plugin_LastFmDJ.MainInterface.LoopTimerTick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Please help! This plugin is fantastic, but it throws this exception just often enough for me to want to pull my hair out.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Systex on May 23, 2010, 05:16:30 pm
First off, let me say THANK YOU for linking the source code! This has allowed me to fix my own problem.

For anybody that was curious, the problem line of code was

listTracks.match*=1000;

in weightRecentArtists(...) in file LastFmHelper.cs.

I changed that line to be

if (listTracks.match >= (Decimal.MaxValue/1000))
{
     listTracks.match = Decimal.MaxValue;
}else
{
     listTracks.match*=1000;
}

to avoid the overflow error. This was happening when the value of listTracks.match was within 1000 times of the maximum value allowed for a Decimal datatype. Now, it simply sets the match value to be the maximum if it is going to overflow. I've been using the plugin now for several hours without any of the errors I was getting before.

I compiled the changes using Visual Studio 2010 Pro and am linking the revised .dll so that anybody else who runs into this problem can save the hassle of fixing it themselves. Enjoy--

MC_Plugin_LastFmDJ.dll  --  http://www.megaupload.com/?d=HUNMC3IS (http://www.megaupload.com/?d=HUNMC3IS)
Interop.MediaCenter.dll  --  http://www.megaupload.com/?d=A7JUKBH7 (http://www.megaupload.com/?d=A7JUKBH7)
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: bytestar on May 28, 2010, 02:02:24 pm
Does not works for me.

i have use

"C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm" /unregister "C:\Program Files (x86)\J River\Media Center 15\Plugins\LastFmDJ\MC_Plugin_LastFmDJ.dll"
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm" /unregister "C:\Program Files (x86)\J River\Media Center 15\Plugins\LastFmDJ\Interop.MediaCenter.dll"

and than

"C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm" "C:\Program Files (x86)\J River\Media Center 15\Plugins\LastFmDJ\MC_Plugin_LastFmDJ.dll"
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm" "C:\Program Files (x86)\J River\Media Center 15\Plugins\LastFmDJ\Interop.MediaCenter.dll"

Both was successful but the plug in cannot be initialized, is this because MC_Plugin_LastFmDJ.tlb is missing ? please upload all files from the Folder !!!
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: leezer3 on May 28, 2010, 02:52:48 pm
Try the attached file :)
I've fixed the code he posted (I'd assume that was a typo when copying into the forum), and redone the compile, including everything.

No comments on whether this works or not, I don't use LastFM.

-Leezer-
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: bytestar on May 28, 2010, 04:22:45 pm
Does not works, registering yes but it cannot be initialized again

change the key Version in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JRiver\Media Jukebox\Plugins\Interface\LastFmDJ

from 1.2 to 1.0 it works now, but why is it not 1.2 ?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: leezer3 on May 28, 2010, 04:49:55 pm
Does not works, registering yes but it cannot be initialized again

I've run a couple of quick tests, and it initialises here, and the basic setup seems to work.
More details please-
1. Where are you getting the failed to initialise message?
2. How did you install it? (Use the installer from the first post, altering the path, and then copy in my files)


Does not works, registering yes but it cannot be initialized again

change the key Version in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JRiver\Media Jukebox\Plugins\Interface\LastFmDJ

from 1.2 to 1.0 it works now, but why is it not 1.2 ?
All I can really say is that it works with 1.2 here.
You didn't restart MC in the meantime or something did you? (Not sure if it dynamically loads plugins/ settings therin, or whether they're read once at startup)

Cheers

-Leezer-
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: bytestar on May 28, 2010, 05:16:44 pm
Yes you are right i have restart the pc and now it works with the 1.2 Key !!!

i hope now all is good.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Systex on May 28, 2010, 07:21:11 pm
Try the attached file :)
I've fixed the code he posted (I'd assume that was a typo when copying into the forum), and redone the compile, including everything.

No comments on whether this works or not, I don't use LastFM.

-Leezer-


What was wrong with the code I posted? I didn't upload the .tlb file because the change I made didn't actually affect that file. Everything worked fine for me by simply replacing the two old .dll files with the two new ones that I posted. How is everyone else installing this plugin?
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: leezer3 on May 29, 2010, 05:59:08 pm
What was wrong with the code I posted? I didn't upload the .tlb file because the change I made didn't actually affect that file. Everything worked fine for me by simply replacing the two old .dll files with the two new ones that I posted. How is everyone else installing this plugin?

The issue with the code snippet you posted is that you're missing some
Code: [Select]
[i] ;)
It won't compile on SharpDevelop or VS2010.
Should look like this:
Code: [Select]
if (listTracks[i].match >= (Decimal.MaxValue/1000))
{
listTracks[i].match = Decimal.MaxValue;
}else
{
listTracks[i].match*=1000;
}
Like I said, I presume this is a transcription error :)
If this is working nicely, I'll see about building a new installer.

-Leezer-
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Systex on May 29, 2010, 06:03:31 pm
Ah, yes. You're exactly correct. I somehow lost the indecies when I was typing it up in a post.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: prg02 on October 07, 2012, 07:12:29 pm
Hello,

I know this is an old post, but I have been trying this plugin and when it works it is great, but since I have a large library, sometimes I have the overflow error. I have tried the module posted but I cannot get it to work, MC18 says "Interface plugin LastFmDJ cannot be found or created" I tried to unregister and register using MS.NET v 4.0 and I have the same problem. Any ideas someone?

Thanks

Pablo
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Al ex on September 23, 2013, 05:06:57 am
GREAT PLUGIN!!!

An old thread, but the plugin is still available for download on MC ( http://accessories.jriver.com/mediacenter/accessories.php ), and it works on MC 18.0.212!

However, something I am wondering: I want to hear 5star rated tracks from my library only, so I set up an smartlist with all my 5* tracks in the library. I also selected this smartlist under "advanced" to select songs from this playlist.

Still I get also songs from the complete library (with 4*, etc.).

Is this a bug, or did I misconfigure something?

Thx :)
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Reigi on February 25, 2015, 02:33:45 am
It doesn't work with MC 20. I get an error message in debug:
Running Authentication with Last.Fm
Error downloading radio data

Anyone with MC 20 and successful in running the plugin.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Awesome Donkey on February 25, 2015, 06:19:08 am
I doubt it works anymore. Last.fm removed the radio/streaming features from their site.
Title: Re: New Plugin: Last.Fm Auto DJ v1.2
Post by: Reigi on February 25, 2015, 08:16:59 am
Thank you, that's good (or even less good  :() to know.