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_skip: skip tracks that match a specified search query (Read 366937 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: foo_skip: skip tracks that match a specified search query

Reply #775
No, that's not at all what I'm saying. The query string in Preferences determines which tracks are skipped entirely. Skipping parts of tracks is based on tags in those files.
Tags are changed by opening properties of the track. Fields are the text labels on the left, like Artist, Title, Album... For partial skipping a track needs a field called Skip with timestamped data of parts that one wants to skip.

Re: foo_skip: skip tracks that match a specified search query

Reply #776
I'm not sure I fully follow your explanation.
So what I set already isn't enough to get each playing file jump in time?
Specific tags are needed?
Can you give a specific example how to achieve a jump in time in just one mp3 file?
What should I setup, where and how.
Thanks.

Re: foo_skip: skip tracks that match a specified search query

Reply #777
It's not enough. The string in preferences is checked for each track and if running the query against current track returns true value, the entire track is skipped.

Right click an MP3 file in foobar2000, click 'Properties', then click '+ add new'. Enter the partial skip information here and save the changes with 'OK'. Below is a screenshot showing what it will look like. Notice that I left the hours away from the timestamp, it's not necessary to type them if they aren't needed.
X

Re: foo_skip: skip tracks that match a specified search query

Reply #778
It's not enough. The string in preferences is checked for each track and if running the query against current track returns true value, the entire track is skipped.

Right click an MP3 file in foobar2000, click 'Properties', then click '+ add new'. Enter the partial skip information here and save the changes with 'OK'. Below is a screenshot showing what it will look like. Notice that I left the hours away from the timestamp, it's not necessary to type them if they aren't needed.
[attach type=image]30473[/attach]

Thanks so much for the detailed answer!
Unfortunately for me, if that's the case, it won't be much of a use.
I need every track playing to jump in time and as I have a considerable amount of them, tinkering with each one individually doesn't seem practical.
Maybe if I find an easy way to add or remove the skip tag from all of them at once, it might be an option.
Appreciate your help.

Re: foo_skip: skip tracks that match a specified search query

Reply #779
I kind of figured you were looking at a wrong component. You should try Preview.

Re: foo_skip: skip tracks that match a specified search query

Reply #780
I kind of figured you were looking at a wrong component. You should try Preview.

Thanks but if that is playing first seconds of tracks, not exactly what I'm looking for.
Anyway, found out I can easily add and remove the SKIP tag in multiple tracks with MP3Tag, so that problem solved :)

Re: foo_skip: skip tracks that match a specified search query

Reply #781
@Sergey77 - new version released with the bookmarking fix. Also contains some other small changes, including behavior change for automatic DSP insertion that ApacheReal complained about.

Re: foo_skip: skip tracks that match a specified search query

Reply #782
@Sergey77 - new version released with the bookmarking fix. Also contains some other small changes, including behavior change for automatic DSP insertion that ApacheReal complained about.
Case, I tested it. In the new version, these components work fine for these items. Thank you!
Are you planning to add "Add Skip Track bookmark" to the right-click context menu? - other component commands are already there, it would be convenient.

Re: foo_skip: skip tracks that match a specified search query

Reply #783
The context menu feels like a wrong place for that action. Context menu is supposed to show valid actions that you can perform to any number of selected tracks regardless of current playback state. Bookmarking playback position is only related to the active playing track. The on/off toggle isn't in the context menu either.

Re: foo_skip: skip tracks that match a specified search query

Reply #784
We really need some kind of "skip to here" and "skip when here" in the context menu or main menu.

I'm trying to use masstagger plugin to create the SKIP tag on the selected file and use the %playback_time% variable as a way to do it one keypress skip tag creation at this current time; but that plugin can't read the %playback_time% variable and I end up with "SKIP=%playback_time%" tag. :(

Re: foo_skip: skip tracks that match a specified search query

Reply #785
The context menu feels like a wrong place for that action. Context menu is supposed to show valid actions that you can perform to any number of selected tracks regardless of current playback state. Bookmarking playback position is only related to the active playing track. The on/off toggle isn't in the context menu either.
Maybe this context menu option "Add Skip Track bookmark" would only be available when playing a track? Accordingly, the bookmark would be added only for the active playing track. If more than one track is selected, this option is not available.

Re: foo_skip: skip tracks that match a specified search query

Reply #786
Can we change the "Add Skip Track bookmark" behaviour so instead of making the playback jump to bookmark, it skips the track at the bookmark?

Re: foo_skip: skip tracks that match a specified search query

Reply #787
^ Considering elcosomalo's question, I would add to my suggestion above that the "Add Skip Track bookmark" option could be available in the context menu for an inactive track as well. When selecting it for an inactive track, the bookmark is set to "0:00.000". Tracks in a playlist with "0:00.000" could be skipped during playback.

Re: foo_skip: skip tracks that match a specified search query

Reply #788
Hi. I would like to use this plugin to spased repeated audio files for memorization. This requires a more complex formula than %rating% IS 1, but I've run into some difficulties. There is nothing in the manual except for the information that it supports sql syntax and a link to a page. However, that page states that sql query allows built-in functions starting with the $ sign. I tried writing a test expression $mod(%play_count,3) EQUAL 0, but it gives 0 all the time. I also tried using the foo_dynfil plugin, but its fields also output always 0.

Could you please extend the functionality of the formula parser or make a more advanced plugin based on the template of this simple one?

Re: foo_skip: skip tracks that match a specified search query

Reply #789
It's not SQL syntax, it's foobar's search query syntax. Correct way to write the query you tried to use is:
Code: [Select]
"$mod(%play_count%,3)" EQUAL 0
It has been said numerous times but I'll say again: you can test your query (if it doesn't use the component's built-in features) in foobar's library search dialog. You'll instantly get feedback if the syntax is right and will get a list of tracks that match the query.

Re: foo_skip: skip tracks that match a specified search query

Reply #790
When writing the post, I made a mistake and didn't put the second % sign. When I noticed this, the edit function was not available.
I wrote correctly in Foobar. It doesn't work.
I didn't know about the quotation marks. Thanks, that seems to be working now.

Re: foo_skip: skip tracks that match a specified search query

Reply #791
I use fb2k V2.2 and the theme Georgia-ReBORN (latest version)
My question is:
None of the queries are working
- $mod(%play_count%,3) EQUAL 0
- %play_count% GREATER 0
- ...
Any idea why they don't work, Spider Monkey Panel?

I post the same question in Georgia ReBORN-Forum.

Re: foo_skip: skip tracks that match a specified search query

Reply #792
Did you miss my post right above?
Correct way to write the query you tried to use is:
Code: [Select]
"$mod(%play_count%,3)" EQUAL 0
It has been said numerous times but I'll say again: you can test your query (if it doesn't use the component's built-in features) in foobar's library search dialog. You'll instantly get feedback if the syntax is right and will get a list of tracks that match the query.
Mixing titleformat functions with query format requires use of double quotes. And had you tried your first string in media library search you would have instantly gotten feedback that the syntax is wrong.

For playback count functions to work you need to have Playback Statistics installed.

Re: foo_skip: skip tracks that match a specified search query

Reply #793
Seems like the implementation for keeping skip counts is a bit buggy. I have no interest in these values but I thought I'd report it regardless

First I noticed this impossibly high value for something I never skip....



Now I do mess around with the metadata a fair bit as it's a file I use for testing tag writing/art embedding in various components I maintain.

The above skip count is with artist/title metadata only.

If I strip all tags, I get a new skip count of...



If I then restore the same artist/title tags from screenshot number 1, the value has increased exponentially again.  :D


Re: foo_skip: skip tracks that match a specified search query

Reply #794
Just to add to the above, this statement was not accurate.

Quote
First I noticed this impossibly high value for something I never skip....

Testing a clean setup, you really do need a genuine skip count before the bugz can happen. I must have dabbled with a rating of 1 at some point on the given track. Sorry about that.

Re: foo_skip: skip tracks that match a specified search query

Reply #795
Your counts are high but they may be explainable. At least I don't see anything obviously wrong in the skip count tracking code, other than potential to overflow pfc_infinite in skip count combination calculations. I seemed to have forgotten overflow checks there.

The tracking code is basically direct copy of SDK sample 'rating.cpp'. Skip counts are pinned to tracks with string "%artist%|%album%|%discnumber%|%tracknumber%|%title%". I don't like losing data on tag edits so the component has callback for metadata edits. The callback takes care of copying skip count from old hash to new hash. And in case the new hash already contains something, the new hash will get the combined skip count from both hashes.

Re: foo_skip: skip tracks that match a specified search query

Reply #796
Oh right, thanks for the explanation.

I might have to reconsider what I'm doing here....

https://github.com/marc2k3/foo_playcount_2003/blob/main/src/MetadbIOEditCallback.cpp#L31-L32

I overwrite with no consideration for merging at all.  :))