Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: Bilgus on March 25, 2022, 09:21:12 AM

Title: Anyone still scrobbling in 2022?
Post by: Bilgus on March 25, 2022, 09:21:12 AM
I've decide to make the scrobbler a plugin
that means removing the settings for it and the code from core

We have the ablility to run plugins at start-up so you could simply run scrobbler at start up
(Settings > General Settings > Startup/Shutdown > Start Screen > Open Plugin:
[apps/lastfm_scrobbler]


I wonder is anyone still even using this in 2022?

Comments welcome -
Title: Re: Anyone still scrobbling in 2022?
Post by: music_ on April 19, 2022, 04:38:42 AM
Hello, Bilgus!
Yes, I still use scrobbling in 2022 with my Sansa Clip +
Title: Re: Anyone still scrobbling in 2022?
Post by: Duceboia on April 19, 2022, 10:07:32 AM
Still using scrobbles
Title: Re: Anyone still scrobbling in 2022?
Post by: doomsquirrel on April 22, 2022, 03:30:24 AM
I'm still using scrobbling in 2022 with my Fiio M3K, and Sansa Clip+

It's not a must have, and I won't be distraught if it is a plugin (or even if it was completely removed). But it is somewhat nice to keep a history of my listening habits rabbits.
Title: Re: Anyone still scrobbling in 2022?
Post by: soap on May 02, 2022, 09:54:06 AM
Scrobbling on my gen5
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on May 11, 2022, 08:32:53 AM
http://qtscrob.sourceforge.net/
Title: Re: Anyone still scrobbling in 2022?
Post by: doomsquirrel on May 16, 2022, 09:49:47 AM
I've noticed an unfortunate problem when using the [apps/lastfm_scrobbler] plugin from Startup/Shutdown > Start Screen. After you disconnect the USB cable (when it was connected to your computer for data trasfer), the lastfm_scrobbler stops working. You have to restart the player to get it working again. Not a major problem, but can be annoying if you forget to restart the player.
My device is Fiio M3K. I'm using the latest daily build 2f71571c0a.
Title: Re: Anyone still scrobbling in 2022?
Post by: dhugas on May 18, 2022, 04:10:38 PM
Yes, I'm still using it to keep my last.fm profile accurate. Yesterday I updated to xDuoo X3ii last daily build and now I was wondering why there was no log on songs I've listened today. I will check the lastfm_scrobbler plugin.

[Edit]
I have a problem with [lastfm_scrobbler] producing a panic when USB is unplugged and the plugin is running. I've written at the plugins/viewers section of the forum: https://forums.rockbox.org/index.php/topic,54230.0.html
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on May 19, 2022, 08:53:25 AM
the plugin shouldn't stop when USB is plugged, doomsquirrel
With the scrobbler plugin running..
after USB unplug if you restart the plugin by browsing to plugin/apps/lastfm_scrobbler does it splash  message about 'Scrobble cache flushed'?
Title: Re: Anyone still scrobbling in 2022?
Post by: doomsquirrel on May 19, 2022, 06:24:16 PM
It does splash the message about 'Scrobble cache flushed'.

To be specific, I can't really say if the plugin stops, but it does stop writing played track info to the scrobbler.log file.

the plugin shouldn't stop when USB is plugged, doomsquirrel
With the scrobbler plugin running..
after USB unplug if you restart the plugin by browsing to plugin/apps/lastfm_scrobbler does it splash  message about 'Scrobble cache flushed'?
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on May 19, 2022, 11:26:04 PM
doomsquirrel here is a build with some polling of the USB status after the initial connection
ATM i'm thinking we are missing the notifications but it might be that they never get sent
Code: [Select]
static void poll_usb_wait_for_disconnect(struct event_queue *q)
{
    struct queue_event ev;
    while(rb->usb_inserted() == true)
    {
        rb->queue_wait_w_tmo(q, &ev, HZ);
        int id = ev.id;
        if (id == SYS_POWEROFF || id == SYS_REBOOT || id == SYS_USB_DISCONNECTED)
        {
            rb->queue_post(q, ev.id, ev.data); /* repost */
            return;
        }
    }
    rb->queue_post(q, SYS_USB_DISCONNECTED, 0); /* we missed the disconnect ?? */
}

baremetal mips:
https://www.mediafire.com/file/86d44osh61ql1pq/FioM3kBaremetal_scrobbler.zip

Or are you using the hosted port??
hosted:
http://www.mediafire.com/file/3psu8ojpp6knm47/FioM3kHosted_scrobbler.zip

first verify which port you are using (rockbox-info.txt CPU: hosted or CPU: mips)
unzip to your device after renaming the current .rockbox directory as a backup



Title: Re: Anyone still scrobbling in 2022?
Post by: doomsquirrel on May 20, 2022, 02:31:47 AM
That seems to have fixed it.

Now, after I unplug the USB, it writes the track info to scrobbler.log.

There is a situation where it didn't write the track info to scrobbler.log. This happens when it resumes play on a track that is the last track it has written into scrobbler.log. I'm assuming this is so that it doesn't write the same track too many times when you stop playing (and the device powers down) in the middle of a track. If this is intentional, I'm happy about it. I always wanted this to be the behavior, instead of having to manually remove duplicates in the scrobbler.log file or in last.fm.

I'm using the baremetal mips port

P.S. Would it be possible to have the device resume playback after the [lastfm_scrobbler] plugin is started from the Start Screen? Maybe a setting somewhere to enable such behavior? This is not a major issue, but I would like it the most if the device automatically resumes playback when powered on (and after starting the [lastfm_scrobbler] plugin)
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on May 20, 2022, 08:44:18 AM
I have been toying with making the TSR plugins persistent but I haven't decided how yet

EDIT , oh I see you meant start playback that shouldn't be too difficult but I'm not going to have time for it for a while

yes it tries not to write the same track 2x..

I'm not sure what is actually going on with the USB events, maybe it will become apparent once
dhugas' issue is figured out

 
Title: Re: Anyone still scrobbling in 2022?
Post by: amachronic on May 21, 2022, 10:25:01 AM
bilgus, re IRC yesterday, I'm not sure why usb events wouldn't be propagated. It seems to be working for me but maybe my testing is too simple. This is what I did (with a clean RB install):

1. start up scrobbler and play a few tracks
2. plug in USB, I can see the tracks in the scrobbler log
3. unplug USB and play a few more tracks
4. plug in USB again, new tracks show up in scrobbler log

I added a USB TSR test plugin g#4555 (https://gerrit.rockbox.org/r/c/rockbox/+/4555) to debug connection issues but it seems to be getting both connect & disconnect as expected.

doomsquirrel if you can think of any more specific thing I can try to trigger the bug i'd appreciate it.
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on May 21, 2022, 11:57:09 AM
It tests the same for me..
amachronic I added a foreground mode so we can test both

Code: [Select]
/***************************************************************************
 *             __________               __   ___.
 *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
 *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
 *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
 *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
 *                     \/            \/     \/    \/            \/
 * $Id$
 *
 * Copyright (C) 2022 Aidan MacDonald
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ****************************************************************************/

#include "plugin.h"
#include "logf.h"

#undef DEBUGF
#define DEBUGF(...)
//#define DEBUGF printf

#define EV_EXIT MAKE_SYS_EVENT(SYS_EVENT_CLS_PRIVATE, 0xFF)

unsigned char stack[DEFAULT_STACK_SIZE];
struct event_queue queue;
int thread_id;
const char* state = "none";
const char* prev_state = "none";

static void main_loop(void)
{
    bool exiting = false;
    struct queue_event ev;

    while(true) {
        rb->queue_wait(&queue, &ev);

        /* events that are handled whether exiting or not */
        switch(ev.id) {
        case EV_EXIT:
            return;
        }

        if(exiting)
            continue;

        /* events handled only when not exiting */
        switch(ev.id) {
        case SYS_USB_CONNECTED:
            prev_state = state;
            state = "connected";
            logf("test_usb: connect ack %ld", *rb->current_tick);
            DEBUGF("test_usb: connect ack %ld\n", *rb->current_tick);
            rb->usb_acknowledge(SYS_USB_CONNECTED_ACK);
            break;

        case SYS_USB_DISCONNECTED:
            prev_state = state;
            state = "disconnected";
            logf("test_usb: disconnect %ld", *rb->current_tick);
            DEBUGF("test_usb: disconnect %ld\n", *rb->current_tick);
            break;

        case SYS_POWEROFF:
        case SYS_REBOOT:
            prev_state = state;
            state = "exiting";
            exiting = true;
            break;
        }
    }
}

static void kill_tsr(void)
{
    rb->queue_post(&queue, EV_EXIT, 0);
    rb->thread_wait(thread_id);
    rb->queue_delete(&queue);
}

static bool exit_tsr(bool reenter)
{
    MENUITEM_STRINGLIST(menu, "USB test menu", NULL,
                        "Status", "Stop plugin", "Back");

    while(true) {
        int result = reenter ? rb->do_menu(&menu, NULL, NULL, false) : 1;
        switch(result) {
        case 0:
            rb->splashf(HZ, "State: %s", state);
            rb->splashf(HZ, "Prev: %s", prev_state);
            break;
        case 1:
            rb->splashf(HZ, "Stopping USB test thread");
            kill_tsr();
            return true;
        case 2:
            return false;
        }
    }
}

static void run_fg(void)
{
    rb->queue_init(&queue, true);
    thread_id = rb->create_thread(main_loop, stack, sizeof(stack),
                                  0, "test_usb"
                                  IF_PRIO(, PRIORITY_USER_INTERFACE)
                                  IF_COP(, CPU));
    rb->splashf(HZ, "Thread started");

    while(true)
    {
        if (rb->button_get_w_tmo(HZ) != BUTTON_NONE)
        {
            kill_tsr();
            rb->splashf(HZ, "Thread Exiting");
            return;
        }
    }
}

static void run_tsr(void)
{
    rb->queue_init(&queue, true);
    thread_id = rb->create_thread(main_loop, stack, sizeof(stack),
                                  0, "test_usb TSR"
                                  IF_PRIO(, PRIORITY_BACKGROUND)
                                  IF_COP(, CPU));
    rb->plugin_tsr(exit_tsr);
}

enum plugin_status plugin_start(const void* parameter)
{
    (void)parameter;
    MENUITEM_STRINGLIST(menu, "USB test menu", NULL,
                        "Start TSR", "Start Foreground", "Quit");
    while(true) {
        switch(rb->do_menu(&menu, NULL, NULL, false)) {
        case 0:
            run_tsr();
            rb->splashf(HZ, "Thread started");
            return PLUGIN_OK;
        case 1:
            run_fg();
            continue;
        case 2:
            return PLUGIN_OK;
        default:
            return PLUGIN_ERROR;
        }
    }
}


doomsquirrel here is a build with the test plugin if you could test both the TSR and fg mode with your Fio
https://www.mediafire.com/file/bbq07r2nj8lpcxe/rockbox_TestUSB_FioM3k_bm.zip/file
Title: Re: Anyone still scrobbling in 2022?
Post by: doomsquirrel on May 23, 2022, 07:11:19 AM
I tested the TSR and FG mode of the test_usb plugin in the rockbox_TestUSB_FioM3k_bm.zip.

For TSR I did the following procedure from the plugin instructions:

1. entered plugin -> selected Start
2. plugged in and unplugged USB
3. reentered plugin -> selected Status
   it displayed "State: disconnected" then "Prev: connected"

For FG I did:

A:
1. started plugin
  it displayed "Thread started"
2. connected USB cable
  it displayed "Thread exiting"

B:
1. connected USB cable (without entering data transfer mode)
2 started plugin
  it displayed "Thread started"
3. disconnected USB cable
  it displayed "Thread exiting"



I also tried a procedure similar to what amachronic did:

1. set scrobbler to start from Startup/Shutdown > Start Screen
2. restart player
3. play a few tracks
4. plug in USB, I can see the tracks in the scrobbler log
5. unplug USB and play a few more tracks
6. plug in USB again, new tracks show up in scrobbler log

(I didn't restart at all after point 2.)

So, it does seem to be writing track data to scrobbler.log ok now. I can't get it to not write to scrobbler.log anymore. Weird. I can't really say what could have caused it earlier. Maybe it was a side effect of some other crash or hangup. I do sometimes get unexpected behavior like = after unplugging the USB cable the player forgets where it was in the playlist/queue and starts from the beginning of an album I was playing earlier, or sometimes even from the beginning of an album that I was playing a couple of restarts ago.
Title: Re: Anyone still scrobbling in 2022?
Post by: sg2002 on August 30, 2022, 07:34:26 AM
Hi, just reporting that I'm another person who still uses scrobbling in 2022. Had to change my setup now, but thanks for at least maintaining this in some form.
Title: Re: Anyone still scrobbling in 2022?
Post by: cholero on November 23, 2022, 01:14:28 PM
Hello I'm also still scrobbling in 2022 and now reverted back to a downloaded build from march 22 on my sansa clip zips and xduoo x3 because background scrobbling without any additional steps is more important to me than the commits from march to now. :-) I am still using rockbox for about 10 hours a week.
Title: Re: Anyone still scrobbling in 2022?
Post by: keyb_gr on December 29, 2022, 09:41:57 PM
Also chiming in to note that yes, I am very much still actively using the scrobbler. Recently I was wondering why my "home" player, a Clip+ that I had updated to a build from September (but not used a whole lot since then), wasn't scrobbling. It would be nice if one could easily get a summary changelog of sorts since date X in order to avoid surprises like this.
We have the ablility to run plugins at start-up so you could simply run scrobbler at start up
(Settings > General Settings > Startup/Shutdown > Start Screen > Open Plugin:
[apps/lastfm_scrobbler]
That seems to work splendidly.

With this workaround, I should be able to upgrade my main FiiO M3K as well, which still runs a 1-year-old build.
Title: Re: Anyone still scrobbling in 2022?
Post by: automusician on March 03, 2023, 07:47:09 PM
Actually, I just created an account in order to add in that I consider Scrobbling a critical feature to my listening habits and within Rockbox. I'm on the 5th gen iPod.
I just updated to the latest development build as I was having some issues and I saw scrobbling was gone and came to the forums to see what's up.

The steps to run a plug-in at start-up may not work if you haven't run the plugin before (I do see it generated a .cfg). I did a quick test and the first song I played did not generate a scrobble. The second did, but I booted up the plugin manually to sniff check. Might be a goof on my end, who knows. Could also be worth testing further.

Anyway, I'm extremely relieved to see this plugin here. Hopefully it works the exact same as before. Is there a way of easily checking if it's running when I boot the device and/or after scrobbling a song? I'm new to Rockbox, so maybe just opening the scrobble log is correct here, but thought to ask for opinions.

Cheers.
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on March 04, 2023, 12:09:52 AM
you should be able to run the plugin a second time and it'll give you a menu:
Settings (see below)
Flush Cache (saves the log immediately to disk)
Exit Plugin (stops the scrobbler)
Back (hides the plugin and runs in background)

Settings:
Resume playback makes it so the scrobbler plugin will resume the last song(if any exists)
save threshold sets how much of the song must be listened to before it gets saved (default is 50%)
Verbose = false suppresses the start-up message

I plan to make these type of plugins auto resume but till I get around to that running another plugin will flush the log to disk and kill the scrobbler plugin which you will need to re-run so slight downsides but better than gone
Title: Re: Anyone still scrobbling in 2022?
Post by: automusician on March 05, 2023, 08:36:16 AM
Cool, thanks for the tips.  :)

With respect, and asking from a place of curiosity, what's the reason(s) for moving it to a plugin? The first post mentioned that it was being moved but I don't know the rationale.
It seems at first glance to be better as part of the core like it was in the latest stable, but I know nothing about it and would like to know more.
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on March 05, 2023, 10:24:26 AM
Quote
It seems at first glance to be better as part of the core like it was in the latest stable

you only say that because you use it, for everyone else its eating up valuable ram
and we need a slimmer core (the space it freed has already been used)

Title: Re: Anyone still scrobbling in 2022?
Post by: automusician on March 05, 2023, 11:55:22 AM
Of course, good to have the rationale!
Title: Re: Anyone still scrobbling in 2022?
Post by: automusician on March 20, 2023, 02:18:05 PM
Would it be possible to eliminate or reduce the loud beep when the plugin starts?
I'd rather it started silently.
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on March 20, 2023, 07:07:27 PM
There youare it'll be in tomorrows builds

https://gerrit.rockbox.org/r/c/rockbox/+/5167
add volume level 0-10
10 is what it is now
0 disables the beep
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on March 25, 2023, 01:01:40 PM
Quote
I plan to make these type of plugins auto resume but till I get around to that running another plugin will flush the log to disk and kill the scrobbler plugin which you will need to re-run so slight downsides but better than gone

TSR plugins now restart automatically after you close the plugin that interrupted

if you want to exit the scrobbler for good run the plugin again and choose 'Exit Plugin'
Title: Re: Anyone still scrobbling in 2022?
Post by: automusician on March 27, 2023, 08:18:46 AM
Awesome! Thanks for both
Title: Re: Anyone still scrobbling in 2022?
Post by: automusician on March 27, 2023, 10:36:02 AM
I notice there's some cruft here in the pre-amble on the .scrobbler.log

Code: [Select]
#AUDIOSCROBBLER/1.1
#TZ/UNKNOWN
#CLIENT/Rockbox ipodvideo $Revision$
#ARTIST #ALBUM #TITLE #TRACKNUM #LENGTH #RATING #TIMESTAMP #MUSICBRAINZ_TRACKID
-8d45-f8a3ddc4430c

This is breaking my scrobbling tool https://github.com/ultraelephant/pyapplier and requires manual effort each time.
Is this line supposed to mean something or could it be removed? Maybe it was supposed to be in the client line instead of $Revision$?
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on March 27, 2023, 10:51:45 AM
looks to be the end of a track id?
example of a full one -- 88b49ed9-bd79-48db-909a-4b3007135707

not sure if its a failed write or maybe a buffer that is too small
Title: Re: Anyone still scrobbling in 2022?
Post by: automusician on April 02, 2023, 09:24:16 AM
Good eye! It's the tail-end of the first track-id that should have shown up as a 'S' (skip).

I tried the steps again and it's fully reproducible in the daily build from March 27.

1. Delete .scrobbler.log
2. In Rockbox, go to Files
3. Select an album
4. Skip the first track (after a few seconds played is fine)
5. Wait a few more seconds
6. Pause / Stop
7. Connect and check

boom. The first track ID there should be https://musicbrainz.org/recording/969ee8a7-8b12-4297-bf05-c2a67b09c40c

Seems the scrobbler might have a write bug if there's no file already present.

Code: [Select]
#AUDIOSCROBBLER/1.1
#TZ/UNKNOWN
#CLIENT/Rockbox ipodvideo $Revision$
#ARTIST #ALBUM #TITLE #TRACKNUM #LENGTH #RATING #TIMESTAMP #MUSICBRAINZ_TRACKID
2-4297-bf05-c2a67b09c40c
Billy Talent Billy Talent II Red Flag 2 196 S 1680430715 5ee8e632-4c88-49e4-ab07-0626fbc196eb
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on April 18, 2023, 12:52:37 AM
I have a fix that should do the trick but I won't have time to test it for about a week

https://gerrit.rockbox.org/r/c/rockbox/+/5206

after I do I'll update here
Title: Re: Anyone still scrobbling in 2022?
Post by: cirdanlunae on June 17, 2023, 01:59:38 AM
The Scrobbler plugin seems to be causing Rockbox to crash. I'd submit a bug on rockbox.org/tracker, but the register page is broken (gives a fatal error). So, might as well mention it here.

Edit: Also tested with Daily Build 2747e920ba-230617 on iPod Video 5.5
Info: Daily Build 666a836227-230609 on iPod Video 5.5

What causes crash:
Switching between songs, either manually or as the song progresses, causes Rockbox to randomly crash. The crash states:

Code: [Select]
Data abort at 03f8074c (0)
pc: 03f8074c
sp: 000d6de0
bt end

After turning off the Scrobbler plugin and switching between nearly 100 songs does not result in a crash. Turning the plugin back on causes a crash within 10 or so songs.

The last version of Rockbox I used before this was Daily Build b6d04d1ac0-230310, and the error did not happen then.
Edit: Reverted my Rockbox install to the 230310 build, no issues so far while running the Scrobbler plugin. It looks like there must have been either an update to the plugin or (more likely) Rockbox itself that is causing the crash between March 10 2023 and June 9 2023.

Will gladly provide any additional information that I can.

EDIT: After some experimentation, it seems that setting VERBOSE to NO is what causes the crash. When setting VERBOSE to YES, it seems to act normally. Going to test this by having a 20 song playlist play with VERBOSE set to YES, following by trying again with VERBOSE set to NO. Will report back.
EDIT EDIT: Nope. Crashed even when VERBOSE set to YES. Tried setting to default settings, and when rebooting Rockbox and starting up the plugin, it still will crash after about 5 songs.
Title: Re: Anyone still scrobbling in 2022?
Post by: chris_s on June 22, 2023, 02:11:41 PM
The Scrobbler plugin seems to be causing Rockbox to crash. I'd submit a bug on rockbox.org/tracker, but the register page is broken (gives a fatal error). So, might as well mention it here.

Edit: Also tested with Daily Build 2747e920ba-230617 on iPod Video 5.5
Info: Daily Build 666a836227-230609 on iPod Video 5.5

What causes crash:
Switching between songs, either manually or as the song progresses, causes Rockbox to randomly crash. The crash states:

Code: [Select]
Data abort at 03f8074c (0)
pc: 03f8074c
sp: 000d6de0
bt end

After turning off the Scrobbler plugin and switching between nearly 100 songs does not result in a crash. Turning the plugin back on causes a crash within 10 or so songs.

The last version of Rockbox I used before this was Daily Build b6d04d1ac0-230310, and the error did not happen then.
Edit: Reverted my Rockbox install to the 230310 build, no issues so far while running the Scrobbler plugin. It looks like there must have been either an update to the plugin or (more likely) Rockbox itself that is causing the crash between March 10 2023 and June 9 2023.

Will gladly provide any additional information that I can.

EDIT: After some experimentation, it seems that setting VERBOSE to NO is what causes the crash. When setting VERBOSE to YES, it seems to act normally. Going to test this by having a 20 song playlist play with VERBOSE set to YES, following by trying again with VERBOSE set to NO. Will report back.
EDIT EDIT: Nope. Crashed even when VERBOSE set to YES. Tried setting to default settings, and when rebooting Rockbox and starting up the plugin, it still will crash after about 5 songs.
I was able to reproduce this on an iPod video. Looks like it is fixed by aligning the buffer for the cache entries.

edit: Fix has been merged and is now available in the dev build
Title: Re: Anyone still scrobbling in 2022?
Post by: joswef on July 04, 2023, 10:05:26 AM
Hello! I've been having trouble with not all of my songs being added to scrobbler.log on my iPod and I'm wondering if there are any settings to fix it? I have minimum elapsed and threshold at 0ms / 0%. This often happens with tracks that I pause but sometimes whole albums aren't scrobbled for no reason. I have the plugin set to launch on startup so I'm not just forgetting to start it. Does the 'Unique Track MRU' setting have anything to do with it? Any kind of help with any of this is gratefully received. Thanks all! :)
Title: Re: Anyone still scrobbling in 2022?
Post by: hooded_paladin on August 08, 2023, 02:00:22 PM
What's tricky about this being a plugin is that in poweroff situations (idle timeout, sleep timer, and closing the simulator) it gets a SYS_POWEROFF event before the audio stack gives you a track_finish_event. Have you encountered that?

I use a script to sync plays between my rockbox device and iTunes so I'm picky about everything getting logged. (I used to use a database hack, but I'm trying to switch over to a scrobbler hack). I was experimenting with some way to maybe get the track_finish_event before getting SYS_POWEROFF. Maybe have it send some pre-poweroff event, wait a little while, and then power off. Or I might just revert all the patches and go back to scrobbling from the core, since I'm hacking things anyway.
Title: Re: Anyone still scrobbling in 2022?
Post by: joswef on August 09, 2023, 12:12:04 PM
I’m unsure. I don’t use the sleep timer at all, a lot of scrobbles are simply absent from my .log file. We seem to be in a drought of dev updates at the moment and so I’m just stuck. Thanks for replying.
Title: Re: Anyone still scrobbling in 2022?
Post by: hooded_paladin on August 11, 2023, 06:00:45 PM
Well I guess that was more of a general comment for Bilgus or chris_s maybe. While reverting, I did notice that original version used to check for a currently playing song in the poweroff path:
        if (audio_status())
            add_to_cache(audio_current_track());

For your case joswef, no idea. It sounds specific enough to be a specific bug and not some general case of corruption.
Title: Re: Anyone still scrobbling in 2022?
Post by: joswef on August 12, 2023, 04:33:37 AM
You’re likely right. I haven’t modified any code of the dev version at all; it’s as is. I’m unsure what I’m doing to cause the bug but I’m keeping a note of what I’ve been listening to and logging the scrobbles manually until a new dev version is released. :)
Title: Re: Anyone still scrobbling in 2022?
Post by: Trzyzet on August 28, 2023, 08:34:48 PM
I came back to using my old last.fm account and found this for uploading .scrobbler.log:
https://github.com/jeselnik/rb-scrobbler
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on August 29, 2023, 01:37:10 AM
Trzyzet Cool!

hooded_paladin are you just wanting it to flush on shutdown then?
edit: yeah that was a bug should be fixed now
Title: Re: Anyone still scrobbling in 2022?
Post by: Trzyzet on August 29, 2023, 04:55:39 PM
Alright, plugin for eros/surfans/etc. has the same issue as mentioned previously - when plugin is working and you will connect device to USB device freezes.
OS on the PC tries to mount the device but with no success and when you unplug the player it will crash with
Code: [Select]
*PANIC*
mount: 0
and damages the FAT filesystem on the SD card. Luckily FS is fixable by the windows or linux tools.
.scrobbler.log generated by the plugin is not working with any of the apps mentioned here, on the wiki and even the ones I tried to find.

Error looks like this:

Code: [Select]
panic: runtime error: index out of range [5] with length 1
EDIT: I attached the file generated by the plugin. I just added *.txt extension.
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on August 29, 2023, 09:58:38 PM
the log looks ok. to me versus the spec
http://web.archive.org/web/20180415061851/http://www.audioscrobbler.net/wiki/Portable_Player_Logging

is this the very latest dev version crashing on USB unplug?

does the battery bench plugin act this way too?
Title: Re: Anyone still scrobbling in 2022?
Post by: Trzyzet on August 30, 2023, 05:56:26 PM
Previously I had like 2 week old build, now installed a fresh one. It does exactly the same.
And yes, battery bench plugin behaves the same. Unable to mount partition and mount: 0 panic screen when unplugged.
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on August 30, 2023, 10:15:53 PM
if the bench plugin does it too i wonder how old the bug is

does this happen 3.15 as well?

maybe from the USB rewrite?
Title: Re: Anyone still scrobbling in 2022?
Post by: joswef on September 03, 2023, 03:27:23 PM
Hi, so is anyone able to confirm if the latest dev build does boot properly please? I’m not too sure what’s happening with the technical jargon. 😳. Thanks all!
Title: Re: Anyone still scrobbling in 2022?
Post by: jsdf on December 31, 2023, 02:24:46 PM
Hi everyone, I had Rockbox 3.15 installed on my 6th gen iPod using the old style scrobbler for a while, but upon updating to the latest daily build from today and using the lastfm_scrobbler plugin it doesn't seem to create the scrobbler log file...

If I add it at boot it displays a message that the plugin is loaded but after listening to a whole album and flushing the cache to disk manually it doesn't show up anywhere in the file system

The music files are .alac loaded from the original firmware and played through the database, if that matters
Title: Re: Anyone still scrobbling in 2022?
Post by: Bilgus on January 02, 2024, 10:04:08 AM
should be
Quote
.scrobbler.log
in the root

if doing this on the DAP you probably need to set your file view to Show All
Title: Re: Anyone still scrobbling in 2022?
Post by: jsdf on January 04, 2024, 02:42:15 PM
Oh well, I formatted the iPod from scratch again with today's build and its fine now, sorry
Title: Re: Anyone still scrobbling in 2022?
Post by: automusician on February 14, 2024, 12:38:26 PM
The lastfm scrobbler log viewer is a nice idea.
I'm getting crashes from it, though. First off, the buttons seem to lock up, and then it causes total system crashes most of the time I use it.

Here's one:
Code: [Select]
SWI at 073d0294 (0)
pc: 073d0294
sp: 000007e0
       A: 000007e0
bt end

That's on an iPod Video (5.0Gen), build commit :
e122243bb0c80e582c15360d4c334345aefdc9c9