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: [fb2k v2] Playcount 2003 (Read 14131 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [fb2k v2] Playcount 2003

Reply #26
I'm calling this 0.1 final.

https://jscript-panel.github.io/other/playcount2003/

- Remove `foo_playcount` importer from main `Library` menu.
- The `Edit` dialog for context menu selections now has built in `Presets`.



- Implement drop down history on the `Edit` dialog text boxes. Only title format patterns are remembered. Other plain text entry is not.
- Add support for importing `JSON` files with `UTF8-BOM`.

Re: [fb2k v2] Playcount 2003

Reply #27
General incompetence strikes again. 0.1.1 fixes a bug where the context menu items for marking selections as loved/unloved didn't work. This happened during the edit dialog rewrite and I wasn't paying enough attention. :/

https://jscript-panel.github.io/other/playcount2003/


Re: [fb2k v2] Playcount 2003

Reply #29
Hi there again Marc, regarding the %2003_last_played_ago% is there any plan to introduce month(m) and year(y) value instead of overly used week(wk)? just like in $jsp3_since.

Also another title formatting help question, with the last update the code "$substr(%2003_added_ago%,0,$strstr(%2003_added_ago%,d))" will return empty since there is no days(d) in string, since it will return just HH:MM:SS, is it possible to just make it return as "Today" string? Thanks.

Btw, there is small typo in the docs %2003_last_played_ago%`

---
Regarding the import feature, thanks for adding the presets for foo_lastfm_playcount_sync. However, it seems it had to be done manually. Can it be done in batch just like the previously import from foo_playcount in Library menu? Also a console log for the process would be nice.

Thank you.

Re: [fb2k v2] Playcount 2003

Reply #30
For display in JSP3, you can use $jsp3_since with these fields. Instead of using %2003_last_played_ago%, use

Code: [Select]
$replace($jsp3_since(%2003_last_played%),0d,Today)

I'll look at providing more feedback on edits.


Re: [fb2k v2] Playcount 2003

Reply #32
Thanks for the update.
Regarding the last_played title formatting, I think i got it, here's my noob attempt.
Code: [Select]
$puts(lp,%2003_last_played_ago%)$puts(week,$replace($substr($get(lp),0,$strstr($get(lp), )),wk,))
$if($get(lp),$ifgreater($get(week),52,$div($get(week),52) years ago,$iflonger($get(lp),8,$substr($get(lp),0,$strstr($get(lp),d)),Today)),)



Re: [fb2k v2] Playcount 2003

Reply #34
https://marc2k3.github.io/foo_playcount_2003/
https://github.com/marc2k3/foo_playcount_2003/releases

So 0.1.4 adds these new fields...
Code: [Select]
%2003_added_ago2%
%2003_first_played_ago2%
%2003_last_played_ago2%

Demo:


Full code:
Code: [Select]
$font(Cascadia Mono,24,700)
Added: %2003_added%
$crlf()
Added ago: %2003_added_ago%
$crlf()
Added ago2: %2003_added_ago2%
$crlf()
$crlf()
First: %2003_first_played%
$crlf()
First ago: %2003_first_played_ago%
$crlf()
First ago2: %2003_first_played_ago2%
$crlf()
$crlf()
Last: %2003_last_played%
$crlf()
Last ago: %2003_last_played_ago%
$crlf()
Last ago2: %2003_last_played_ago2%
$crlf()
$crlf()
Plays: %2003_playcount%
$crlf()
Loved: %2003_loved%
$crlf()
Rating: %2003_rating%

That font function is only supported in JSP3 Text Display. It can be removed for displaying in ye olde foo_textdisplay / CUI item details.


Re: [fb2k v2] Playcount 2003

Reply #35
Thank you very much for the update, it looks wonderful!



Re: [fb2k v2] Playcount 2003

Reply #38
0.1.6
Update Edit dialog with Rating field. Although setting the Rating via the context menu was always possible, it wasn't possible to import ratings from foo_playcount. This change allows that.

Docs:
https://marc2k3.github.io/foo_playcount_2003/

Download:
https://github.com/marc2k3/foo_playcount_2003/releases


Re: [fb2k v2] Playcount 2003

Reply #40
That was quick! Thank you. Everything is working properly with the Album List Panel again.
Think millionaire, but with cannons.

Re: [fb2k v2] Playcount 2003

Reply #41
0.18

The Edit dialog now supports dates in YYYY-MM-DD format. The time will be set to 00:00:00 automatically. Probably more useful for editing the added time and not first played/last played. :P

Docs:
https://marc2k3.github.io/foo_playcount_2003/

Download:
https://github.com/marc2k3/foo_playcount_2003/releases

Re: [fb2k v2] Playcount 2003

Reply #42
It's mentioned that immediate data loss will occur both in the readme and here. Can you expand a bit on that? I'm not installing anything that has the potential to wipe out all my playback statistics; it's bad enough when fb2k crashes and takes the current session's with it.

Does this continue to update both the built-in stats and its own? (As far as I can tell, it has its own database too.) How does it work with regular existing tag names? Is it possible to make changes less ruinous by attempting to map old entries to the new pattern?

Re: [fb2k v2] Playcount 2003

Reply #43
The readme says it all really..

Quote
It's important that settings are decided on before starting as any change causes immediate data loss. foobar2000 will prompt you to restart when changing any setting.

Title format pattern

This is how database records are bound to your tracks. The default of %path%|%subsong% does mean every track will have unique data.

Note

As of 0.1-Beta.6, statistics can survive files being moved or copied when using file operations. Cuesheets/other tracks with multiple chapters are not supported. If that is not acceptable, you should change it to a pattern that makes use of tags instead. You might consider a pattern like

%album artist%|%album%|%date%|%discnumber%|%tracknumber%|%title%

When you pick a pattern, you need to stick with it. That is all.

And data loss occurs when you change from the default simple mode to advanced mode. Pretty much no one needs advanced mode. This logs the date/time of each individual play and the only way you can make use of this info is by extracting it with scripting components like JScript Panel/Spider Monkey Panel. This is going to be beyond most people so most should ignore it and stick with simple mode.

And it obviously only manages its own data. It can't modify the data of anything else. Data can be imported from foo_playcount via the Edit dialog.

Other than a description here...

https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Playback_Statistics_v3.x_(foo_playcount)

Quote
Playback statistics are now pinned to a combination of artist + album + disc number + track number + track title information, contrary to pre-3.0 versions which would pin data to file paths.

...no one knows the exact pattern foo_playcount used internally but the example I posted as an alternative to using the path/subsong should be close enough.

Re: [fb2k v2] Playcount 2003

Reply #44
Quote
This logs the date/time of each individual play and the only way you can make use of this info is by extracting it with scripting components like JScript Panel/Spider Monkey Panel. This is going to be beyond most people...
To add more details about this, in fact anyone could make use of it if timestamps were also provided as dates (since the tag is a string and can be used via TF). Or if TF support was extended with a date<->Unix timestamp function (but that's a foobar2000 native thing).

Then:
Code: [Select]
"$strstr(%2003_timestamps_date%,YYYY-MM-DD)" GREATER 0

It could also be tweaked to find tracks played on an specific year, month, etc.

I suppose exposing it as a multivalue tag would also work.
Code: [Select]
2003_timestamps_date HAS YYYY-MM-DD

Note the first example works fine on the original enhanced playcount:
Spoiler (click to show/hide)
So JSP/SMP is not an strict requisite to use it (if dates are exposed too).

Re: [fb2k v2] Playcount 2003

Reply #45
I suppose exposing it as a multivalue tag would also work.

Nope, this is technically impossible. It's a single string per field per track.

Quote
(if dates are exposed too).

They are not. Converting potentially dozens/hundreds of timestamps->strings on the fly per track does not sit right with me. If foo_enhanced_playcount does it without slowing down, great. But I'm not going anywhere near that functionality.

Re: [fb2k v2] Playcount 2003

Reply #46
No idea how it's done, works perfectly fine on real time and pretty fast. For 90K tracks:

Quote
[15:57:43] Search took 0:00.279563
[15:57:43] Search sorting took 0:00.022913

But it's fine if you are not interested, was just adding my experience because it has an utility on queries.

Re: [fb2k v2] Playcount 2003

Reply #47
Hi Mark.
I am moving the playcount statistics to foo_playcount_2003

I encountered a critical error. Edit fields are limited to 70 characters. And an incomplete string causes foobar to crash. Wish to increase the string length much more.

I've been waiting for such a custom statistics component for a long time.

Another wish.
It would be possible to create fields each with its own custom Title Format Pattern. Looks like foo_customdb  :)

Code: [Select]
$ifgreater($replace($substr(%2003_first_played%,0,$strstr(%2003_first_played%, )),-,),$replace($substr(%lfm_first_played%,0,$strstr(%lfm_first_played%, )),-,),[%lfm_first_played%],[%2003_first_played%])



Spoiler (click to show/hide)
crash + screen