Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_skipcount (discussion) (Read 5971 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_skipcount (discussion)

Skip Counter
foo_skipcount Upload thread


This was made for my personal use as I've wanted to keep track of this for a long time to help curate playlists and understand what I like and don't like of my current music. This is my first fb2k component and first I've really touched C++ in a decade or so and it took me about a week to complete. Let me know if there are improvements, optimizations, or features you'd like to see. Source code is attached in the other thread.

Targets version 80, so it works with 1.5/1.6/2.0 x86 and x64.

Current version: 1.1.0

Features:

    Custom column in playlists: Use the pattern %skip_count%
    Context menu available to reset the skip counter on tracks.
    Settings (Under Tools) to modify which actions cause skips to count, how long the track needs to play before a skip does not count, and if you want skips to count if you do the action from a paused or stopped state.

Re: foo_skipcount (discussion)

Reply #1
Thank you! Something like this has been asked many times.

I think a variable storing dates could be handy.
https://hydrogenaud.io/index.php/topic,115227.0.html

%skip_times_js% - JS timestamp list: [1344117517000, 1355172047000, 1514957893431]
%skip_times_raw% - raw foobar timestamps: [129885911170000000, 129996456470000000, 131594314934316754]
%last_skipped% - Single date: "2018-04-04 15:58:37

The array of times for scripting with JS or SMP.
Last skipped could be used to create really interesting playlists (like "add a track only if it was not skipped this week").

Re: foo_skipcount (discussion)

Reply #2
I will add that, I built this referencing a lot off of foo_enhanced_playcount and I wasn't sure it was within my ability at the time. Now that I have the base of it completed, it should be less daunting and I certainly see utility in including those.

Re: foo_skipcount (discussion)

Reply #3
I think there is a conflict with foo_skip as that also uses %skip_count%:
https://www.foobar2000.org/components/view/foo_skip/release/1.27

Not sure what is the right solution here, perhaps a user configurable name for the tag used? Or just renaming it to %skip_counter% by default?

Or perhaps foo_skip's developer can add an option to not populate the same field as it's not strictly necessary for that component to function (asked there too).
https://hydrogenaud.io/index.php/topic,30361.msg1032711.html#msg1032711

Otherwise thanks for the component, looks very promising.


Re: foo_skipcount (discussion)

Reply #5
Alright, got the new version all set. I saw that Case changed the field name on f00_skip. I tried to implement a custom set field name, and although it worked, it required a restart as I couldn't get it to update otherwise, so it is fortunate that I do not need it. Let me know if there are any crashes/bugs.

Re: foo_skipcount (discussion)

Reply #6
Seems to work well now that the field name conflict is resolved.

Re: foo_skipcount (discussion)

Reply #7
Updated to 1.9. Upload topic post with full changelog

Note that the settings for logging skips was modified to a dropdown list and likely needs to be re-applied. Added a grace timer for each action so at the very beginning of the track it is possible to now count a skip. Added context menu to clear all but the most recent skip.

Re: foo_skipcount (discussion)

Reply #8
Plaese change component version.

Skip count  1.7.0  foo_skipcount (2023-09-23)

SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)


Re: foo_skipcount (discussion)

Reply #10
Thanks.

Reply #3 Corrected 1.9.0 component file
https://hydrogenaud.io/index.php/topic,124742.msg1033162.html#msg1033162
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)


Re: foo_skipcount (discussion)

Reply #12
Is it possible to make it count when you double click a song in the playlist to play, other than the one it is currently playing;

Stupid question 1, where is the log file saved so i can make a backup of it;

Stupid question 2, can i somehow read the counts in Mp3Tag;

Re: foo_skipcount (discussion)

Reply #13
I will look into whether it is possible, my gut feeling is no, but I will let you know once I'm more confident.

I believe the data is stored with other things in metadb.sqlite of %APPDATA%/Roaming/foobar2000 (folder has a -v2 at the end if you are on v2).

I have a few tag/counts related things on my to-do list that foo_playcount does: copy-pasting statistics between files, writing the counts to tags, importing counts from tags and exporting to xml.

I push it up my priority list now that I know there is interest in it

Re: foo_skipcount (discussion)

Reply #14
That's good news. Thank you and keep up the good work.

Re: foo_skipcount (discussion)

Reply #15
Have been playing with this for my wrapped script and just noticed that there are skip_times_raw and skip_times_js tags but not skip_times with timestamps like  "2018-01-02 23:38:13".

Not sure if that's intended or you forgot to add it (since you said you were referencing foo_enhanced_playcount).

Everything else works like a charm

Re: foo_skipcount (discussion)

Reply #16
By the way, is there some way to log automatic skips by foo_skip? Since they don't involve user intervention.

EDIT: about the previous post, the details panel does in fact show a %skip_times% but the tag is not available at other places or has another name.

Re: foo_skipcount (discussion)

Reply #17
What you see in the Properties dialog is not title formatting. While info displayed there is usually similar, the implementation is quite separate. It's a perfectly reasonable feature request to make though.

Re: foo_skipcount (discussion)

Reply #18
Hey, I just released a semi-beta version of 2.0 on github and the upload thread. I am not going to put it on the foobar2000 website repository just yet in case there are problems as I added and changed quite a bit.

I can added a date-time column, I wasn't sure if there would be anyone that would use it. I will add it in 2.0.1. I do not know exactly how foo_skip works currently, but I will check it out and see what is possible.

Re: foo_skipcount (discussion)

Reply #19
2.0.1 is out, I will be putting it up on the fb2k repo shortly. I fixed some bugs with how I changed things in the initial in 2.0.0 and I added double-click track selection skip logging stuff and %skip_times% for date time timestamps field.


Quote
is there some way to log automatic skips by foo_skip?

There is probably a way to do this if I lookup the values that Skip Track keeps, if it were for timestamp logging it would be possible but much harder. I talked to Case and with how it works there is nothing for me to hook into so I'd have to be checking constantly. Not impossible but probably out of my ability at the this time. I will add it as a potential future update to look at.

As always, please let me know of any crashes, bugs, or issues regarding foo_skipcount and I will fix ASAP. Thanks!

Re: foo_skipcount (discussion)

Reply #20
What a pity. Just a note, it could be "easier" to just mimic the same query used on Skip Track and always add a timestamp when such query applies. i.e. doing the same than Skip Track but just for increasing the counter, and letting the other plugin to do its thing. No need to hook anything then. The query could be copied/pasted by the user (if it's not possible to be retrieved from the other plugin).

In my limited usage everything seems to be working now, except some minor thing. For tracks with a single skip, latest skip is right but oldest skip is empty. That's technically wrong, both should be the same for skip arrays of length 1.

EDIT: is it right that changing any config hangs the entire process like 6-7 seconds?


Re: foo_skipcount (discussion)

Reply #22
I'm unable to recreate that issue, but that API usage is indeed not useful, I believe I had added it originally to update fields based on the activated settings but scrapped it. I've updated, let me know if there are still issues. Will updated with less-prio things soon

Looking at the single-skip issue, I also do not see that myself. Does it resolve it self if you clear the timestamps and then re-skip once? This is what I am seeing on my test client and effectively the same thing on my main install.

Re: foo_skipcount (discussion)

Reply #23
Have found another bug, which crashed my scripts. I'm pretty sure it was working fine on previous versions.

%SKIP_TIMES_JS% output is not always a valid JSON value. Sometimes outputs an array [] and other times values like "1710492645000" . The properties panel displays the right values, but tags get through other components or SMP are wrong.
Spoiler (click to show/hide)

The config issue is now gone.

About oldest vs latest in single skipped tracks. Current situation (for a track skipped before updating):
Spoiler (click to show/hide)
Note the tags are fine now, the properties\detail panel is not. Reloading info does nothing.

With a new track, skipped after update, the situation is the same.