Audioscrobbler plugin

Feature requests for VLC.
funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Audioscrobbler plugin

Postby funman » 03 Sep 2006 12:28

Hi,

I'm writing a plugin for audioscrobbler ( http://www.last.fm ) and it requires some testing even it's not finished.

The submission part is ok, but it should check some conditions before submitting tracks, currently it's too permissive :)

I paste the svn diff below :

how to apply:
-paste the diff in, say, ~/patch.audioscrobbler
-get the trunk : svn co svn://svn.videolan.org/vlc/trunk ~/vlc-trunk
-patch the trunk : cd ~/vlc-trunk && patch -p0 < ../patch.audioscrobbler
-build : ./configure --enable-audioscrobbler --your-favorite-options
make && sudo make install

then you'll have to activate the plugin in preferences->interfaces->control interfaces and set your username & password in the control interfaces' submenu

check in the console for useful messages, and on http://www.last.fm if all your tracks get submitted.


positive, but especially negative feedback would be greatly appreciated

get the patch here :
http://paste.videolan.org/pastebin.php?dl=357

heindsight
New Cone
New Cone
Posts: 2
Joined: 03 Sep 2006 02:37
Location: Netherlands
Contact:

Postby heindsight » 06 Sep 2006 19:38

that patch doesn't seem to work. am i doing something wrong?

Code: Select all

$patch -p0 < ../patch.audioscrobbler Hunk #1 succeeded at 1534 (offset 3 lines). (Stripping trailing CRs from patch.) patching file modules/misc/audioscrobbler.c (Stripping trailing CRs from patch.) patching file modules/misc/Modules.am patch unexpectedly ends in middle of line patch unexpectedly ends in middle of line
int question = to_be || !to_be;

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Postby funman » 07 Sep 2006 01:23

No you're doing right, there is just a problem when using pastebin which adds unneeded characters (\r) at the end of each line.

Just ignore these messages, it should compile ok.

I'm joining a new patch, up to date.

http://paste.videolan.org/pastebin.php?dl=368

Again ignore error messages from patch, it will disappear when i'll found another way to distribute the code ;)

Thanks

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Postby funman » 07 Sep 2006 15:05

oops, last update broke the plugin (i tried to make handshake verify interval)
it now works on http://paste.videolan.org/371

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Postby funman » 08 Sep 2006 13:53

update: now use "vlc" client id instead of "tst" since it has just been registered on audioscrobbler's server

todo:
avoid submitting data when media played is a video or a stream, or when user seeks into the song
submit data only when song has been played 50% of the length, or 240 s (the first which comes)

so you should listen only to songs you like to avoid sending bad info to your last.fm profile :)

here's the new patch : http://paste.videolan.org/pastebin.php?dl=374

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 09 Sep 2006 12:25

Is it near completion ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Postby funman » 09 Sep 2006 16:35

I won't have time to work on it the next week, so it will remain in that state.

And I don't know the time needed to perform all remaining tasks, since I'll have to learn more of vlc. Programmation should be easy to do for the last part, but 1st I must find what vlc can do for me :)

Thanks for you interest

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Postby funman » 14 Sep 2006 22:39

Great news !

Now plugin is fully compatible with audioscrobbler spec :
it does not submit video's meta data
it does not submit stream's meta data
it submits data only when song has been listened 50% of the full time OR 240 seconds ( you can seek, if you still listen to it enough, since it records the time when you start listening )

still some things to check, especially if it works under other operating systems than linux, and some code cleanup, but all should be ok :)

don't hesitate ! test it now !

get the patch here : http://paste.videolan.org/pastebin.php?dl=400 and don't worry about things like this:

===
(Stripping trailing CRs from patch.)
patching file modules/misc/audioscrobbler.c
(Stripping trailing CRs from patch.)
patching file modules/misc/Modules.am
patch unexpectedly ends in middle of line
patch unexpectedly ends in middle of line
===

downloading from paste.videolan.org add unnecessary \r at the end of lines

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Postby funman » 17 Sep 2006 21:40

Hi !

I'm glad to learn you that audioscrobbler is now part of vlc beginning at revision 16698

Thanks for those who helped to it

encosion
New Cone
New Cone
Posts: 3
Joined: 14 Nov 2006 17:44

Postby encosion » 14 Nov 2006 17:55

Sorry to cross post... I've just seen this thread... Can you point me to an OSX build with the latest working incarnation of the Audioscrobbler plugin pretty please? Ta!

OS X 10.4.8

encosion
New Cone
New Cone
Posts: 3
Joined: 14 Nov 2006 17:44

Postby encosion » 23 Feb 2007 18:37

0.8.6a is out... Still no sign of audioscrobbling... Such a pity! There aren't any programs that'll scrobble my FLAC files on a mac - Songbird is the only one I know of but it's really REALLY buggy and the Last.FM support is very badly implemented...

Anyone who's managed to compile a version for OS 10.4.8 PPC with audioscrobbling feel free to contact me and hook me up!?! Compiling is beyond me unfortunately... Thanks!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 23 Feb 2007 21:21

Audioscrobbler is ONLY on trunk, 0.9.0
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

evarlast
New Cone
New Cone
Posts: 1
Joined: 28 Mar 2007 21:36

Postby evarlast » 28 Mar 2007 21:47


Now plugin is fully compatible with audioscrobbler spec :
it does not submit video's meta data
it does not submit stream's meta data
it submits data only when song has been listened 50% of the full time OR 240 seconds ( you can seek, if you still listen to it enough, since it records the time when you start listening )
I'm trying to use this in a 0.9.0 nightly, but I have a feature request.

I have my audio library on an http server (auth only of course) and I listen to HTTP streams off of it. It is /MY/ library. It is no one elses.

My request is an advanced checkbox of some sort that allows bending audioscrobbler rules a little and submits data from streams.

Give me some pointers and I'll look into adding this functionality myself.

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Re: Audioscrobbler plugin

Postby funman » 25 Jun 2007 00:46

You have to change in the source: modules/misc/audioscrobbler.c
the line :

if( ( video_val.i_int > 0 ) || \
( input_GetItem(p_input)->i_type == ITEM_TYPE_NET ) )

in

if( video_val.i_int > 0 )

delete the 2nd part which check if the playing item is read from a distant stream

justinroman
New Cone
New Cone
Posts: 1
Joined: 29 Jul 2007 02:32

Re: Audioscrobbler plugin

Postby justinroman » 29 Jul 2007 02:46

I'm running 0.9.0 nightly on Intel Mac. I checked a box in Preferences->Interface->Control interfaces next to "Audioscrobbler submission plugin". Under "Errors and Warnings" I get a message "Last.fm username not set". It advises setting the username or disabling the plugin. I would like to set my last.fm username, but I can't find any interface where I should do so. I've looked all around inside the Control interfaces window for a "submenu", but even with the "Advanced" box checked on the lower left, all I see is a line associated with the plugin that seems to be the plugin's name. It says "audioscrobbler". Should it be something like "audioscrobbler --[user/pass]" or something?

Tips would be appreciated.

UPDATE: Okay, nevermind, I found the relevant parts of the VLC preferences file. If anyone else has this trouble, here's what you're looking for. Be sure to uncomment the two lines that start lastfm by deleting the # and add your plaintext no-quotes username / pass after the equals.

Code: Select all

[audioscrobbler] # Audioscrobbler submission Plugin # Username (string) #lastfm-username= # Password (string) #lastfm-password=

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Re: Audioscrobbler plugin

Postby funman » 29 Jul 2007 12:15

the settings can't be find easily, I think the error message should give an explicit way to find it, or ask for the username/password.

i'll try to remember that when i'll have time to work on it ;)


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 7 guests