<< < 1 2 3 (Page 3 of 3)
  • Dirk

    Dirk - 2008-10-12

    Yes, this is a known issue that will get fixed. But I'm lacking the time at the moment (switching jobs and moving to a new place...) I hope things will get less busy in about a month.

  • Mark Gillespie

    Mark Gillespie - 2008-11-29

    the mediatomb.patch does not work against latest SVN,   Is there any plans for intergrate Last.FM into Mediatomb on a more permenent basis?

  • Jin

    Jin - 2008-11-29

    I am not sure if Dirk has finished the C interface to his library, that's what I wanted to use.

    I think my main problem is still - I have no clue about, about what it is doing and what it is good for :) And since I did not yet have the time to look at that service and to figure out what it does, I did not do any work on the patch integration.

    Actually, if you can tell me the most important details on what it is and on how it works I may be more motivated to finally take some time and look at it :)

    Kind regards,

  • Frisco

    Frisco - 2008-12-02

    Hi Jin, suggests songs. You need an account for this. It simply tracks what users here and builts statistics out of that.

    Say, if one likes to listen Tina Turners "I can't stand the rain", he's likely to hear other TT songs as well as other R&B Songs from different interprets.

    It's like amazons suggestions "others buying this book bought this one as well" transferred to listening.

    Amarok for example uses it for dynamic playlists - you start playing a file, it transferrs it to, get's recommendations back, looks which of these are in your local music database and puts them in the playlist.

    This is like getting your custom radio program fitting your music taste. And you often wonder what's inside your archives *lol*


  • BT

    BT - 2008-12-03


    The changelog for the latest version of Dirk's lastfmlib[1] mentions the addition of a C interface.


    • Dirk

      Dirk - 2008-12-03

      The patch in subversion of lastfmlib has been updated to use the c interface and build against the trunk.
      You can find the patch here:

      Be aware that I haven't tried the patch yet I just made sure it builds. So you can try it out at your own risk. I still have to try it out myself at home.


  • Mark Gillespie

    Mark Gillespie - 2008-12-06

    Hmm, having problems with the patch (I think).  Done a clean SVN get of MediaTomb, a clean SVN get a lastfmlib, built and installed lastfmlib, patched mediatomb, autoreconfig -i, ./configure, make

    libmediatomb.a(libmediatomb_a-lastfm.o): In function `LastFm::destroy()':
    /root/mediatomb/build/../src/ undefined reference to `finished_playing'
    /root/mediatomb/build/../src/ undefined reference to `destroy_scrobbler'
    libmediatomb.a(libmediatomb_a-lastfm.o): In function `LastFm::initialize()':
    /root/mediatomb/build/../src/ undefined reference to `create_scrobbler'
    /root/mediatomb/build/../src/ undefined reference to `set_commit_only_mode'
    libmediatomb.a(libmediatomb_a-lastfm.o): In function `~LastFm':
    /root/mediatomb/build/../src/ undefined reference to `finished_playing'
    /root/mediatomb/build/../src/ undefined reference to `finished_playing'
    /root/mediatomb/build/../src/ undefined reference to `finished_playing'
    libmediatomb.a(libmediatomb_a-lastfm.o): In function `LastFm::startedPlaying(zmm::Ref<CdsItem>)':
    /root/mediatomb/build/../src/ undefined reference to `create_submission_info'
    /root/mediatomb/build/../src/ undefined reference to `started_playing'
    /root/mediatomb/build/../src/ undefined reference to `destroy_submission_info'
    collect2: ld returned 1 exit status
    make[2]: *** [mediatomb] Error 1
    make[2]: Leaving directory `/root/mediatomb/build'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/mediatomb'
    make: *** [all] Error 2

    • Dirk

      Dirk - 2008-12-07

      Can you verify the output of "nm /usr/local/lib/ | grep create_scrobbler"
      and make sure it's not empty. (location of can be different on your machine)

      If it's empty I think something went wrong installing the latest version of the lastfm library, because you seem to be missing all the exports of the C interface which were added in the latest version.


  • Mark Gillespie

    Mark Gillespie - 2008-12-08

    I had duplicate sets of libs (I think from a bug in a early test version of the libs).  Deleted all the lastfm libs, and then did a make install, and then mediatomb compiled.

    The only thin I hate about Linux, is how different distros chuck stuff in different places, some in /usr/lib some in /usr/local/lib and so forth...

  • Dirk

    Dirk - 2008-12-10

    I just released version 0.1.3 of lastfmlib which fixes a bug that caused tracks not being submitted.

    The patch didn't change and I verified that it works this time :-)
    So update to version 0.1.3 and you should be good to go.


  • Julien SIMON

    Julien SIMON - 2008-12-28


    this works perfectly on the latest SVN build (1997). Thanks for this great addition!

    Hopefully, this will soon become a standard mediatomb feature ;)



  • B4tm4n

    B4tm4n - 2009-02-03

    Mediatomb At revision 2018.
    LibLastFM AT Release 0.1.3

    I hadn't played any music for awhile via my PS3 untill yesterday.
    I noticed no submissions going through to LastFM.
    So I got a fresh Svn copy of Mediatomb and a fresh copy of LibLastFM.
    Patched the code and compiled both with no problems.
    But still no submissions, have lastfm changed something or does the patch need updating?


  • Dirk

    Dirk - 2009-02-04

    I just commited an update to the mediatomb patch

    - lastfm section gets added to the default config file
    - fix crash when lastfm was disabled
    - transcoded files should get scrobbled now

    It's still in the same location:

    I only tested it on one transcoded flac file so feel free to test more thoroughly.

    Playlists still don't work though.

    Question for Jin:
    Is there some place where I can see that the files from a playlist are being played? Currently I only see the playlist coming by in the file_request_handler but I don't get the individual files there.


  • B4tm4n

    B4tm4n - 2009-02-04

    I get the following error on compiling.
    It says  "error: lastfm.h: No such file or directory"  and I don't have that file on my system but I do have lastfmclient.h

    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-action_request.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-atrailers_content_handler.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-atrailers_service.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-autoscan.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-autoscan_inotify.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-buffered_io_handler.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-cached_url.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-cds_objects.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-cds_resource.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-cds_resource_manager.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-config_manager.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-content_manager.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-curl_io_handler.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-destroyer.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-dictionary.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-dvd_io_handler.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-dvdnav_read.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-exceptions.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-fd_io_handler.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-file_io_handler.o `test -f '../src/' || echo './'`../src/
    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../tombupnp/upnp/inc    -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I..   -I/sw/include/js -I/sw/include/taglib       -D_THREAD_SAFE     -I/sw/include    -I/opt/local/include -g -O2  -c -o libmediatomb_a-file_request_handler.o `test -f '../src/' || echo './'`../src/
    ../src/ error: lastfm.h: No such file or directory
    ../src/ In member function 'virtual zmm::Ref<IOHandler> FileRequestHandler::open(const char*, File_Info*, UpnpOpenFileMode)':
    ../src/ error: 'LastFm' has not been declared
    ../src/ error: 'getInstance' was not declared in this scope
    make[2]: *** [libmediatomb_a-file_request_handler.o] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    MacBook:~/mediatomb B4tm4n$

  • Dirk

    Dirk - 2009-02-04

    Damn I forgot to add the lastfm.h and files to the patch. I will fix this tomorrow, as I don't have access to my computer now.

  • Dirk

    Dirk - 2009-02-05

    The patch has been updated and should work again.

    Sorry for the inconvenience.


    • Stephane

      Stephane - 2009-03-09

      Thanks for the patch and library. I've been hoping something like that would appear for some time. It works very well in the general case. However there seem to be a problem with album art resources. When I browse through the my library while listening to music, the current artist/title are overwritten each time an album art resource is retrieved. I end up submitting the song I've been browsing instead of the one I have been listening.
      Not sure what's wrong as I've seen in the patch you filter request of audio mime type. Maybe something specific to the PS3.

  • Stephane

    Stephane - 2009-03-16

    Replying to myself in case somebofy else has the same issue.
    The problem seems to be that a lastfm submission is registered for each call to the file_request_handler, irrespective to the resource id thet's being requested (which can be a picture as in my case). Here is what the patch for file_request_handler should be:

    Index: src/

    --- src/ (revision 2018)
    +++ src/ (working copy)
    @@ -66,6 +66,10 @@
         #include "transcoding/transcode_dispatcher.h"

    +#ifdef HAVE_LASTFMLIB
    +    #include "lastfm.h"
    using namespace zmm;
    using namespace mxml;

    @@ -452,9 +456,9 @@

         Ref<CdsItem> item = RefCast(obj, CdsItem);
         String path = item->getLocation();
         String ext = dict->get(_("ext"));
         int edot = ext.rindex('.');
         if (edot > -1)
    @@ -570,6 +574,10 @@
             if (!is_srt && string_ok(tr_profile))
    +#ifdef HAVE_LASTFMLIB
    +            if (item->getMimeType().startsWith(String("audio")))
    +                LastFm::getInstance()->startedPlaying(item);
                 Ref<TranscodeDispatcher> tr_d(new TranscodeDispatcher());
                 Ref<TranscodingProfile> tp = ConfigManager::getInstance()->getTranscodingProfileListOption(CFG_TRANSCODING_PROFILE_LIST)->getByName(tr_profile);
                 return tr_d->open(tp, path, RefCast(item, CdsObject), info);
    @@ -653,6 +661,11 @@
                 if (mimeType == nil)
                     mimeType = item->getMimeType();

    +#ifdef HAVE_LASTFMLIB
    +            if (item->getMimeType().startsWith(String("audio")))
    +                LastFm::getInstance()->startedPlaying(item);
                 info->file_length = statbuf.st_size;
                 info->content_type = ixmlCloneDOMString(mimeType.c_str());

  • Jin

    Jin - 2010-01-04

    OK… first of all: sorry that it took so damn long for me to integrate the patch :) Feel free to flame me :>

    I guess my main problem was that I have no idea what is and so far I did not manage to register and have a closer look, I postponed doing it again and again.

    No, I still do not have a account :) But nevertheless I integrated the patch with some modifications.

    PLEASE TEST IT!  I have not done so and I doubt I will ever have a account, so I rely on you guys here.

    One thing to keep in mind - you will have to adapt your config.xml, the lastfm tag goes under server/extended-runtime-options/, i.e.:

              <lastfm enabled="yes">

    Dirk, thank you! And again, sorry it took me so long.

    Committed revision 2041.

<< < 1 2 3 (Page 3 of 3)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks