Skip to main content
Topic: foo_skip: skip tracks that match a specified search query (Read 203646 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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

Reply #500
This doesn't seem to be working after its newest update. I can no longer skip part of a track using:

<SKIP> 0:00:00-0:01:25

The entire track just plays instead now. I even tried updating to 1.4.1. Anyone else having issues?

Note that originally I was using the syntax:

<SKIP> -9:07;13:44-

but I have tried other variations because that has stopped working and I can't get anything to work.

 

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

Reply #501
I'll refer you to my previous reply.

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

Reply #502
the Skip Track continues to be located here (see picture) even when you remove it from here.
Is this how it should be? please take a look.

I figured it out.

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

Reply #503
A small suggestion, is it possible for the component to make optionally available the ability to retrieve last import date? Since I'm manually retrieving the last.fm data via importing having the last imported date stamp available would be handy to see which of my files need updating.

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

Reply #504
Ignore previous comment, I'm an idiot, clearly I was posting in the wrong thread.

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

Reply #505
Hey Case,

A question and feature request for your consideration.

Earlier in the thread it was mentioned Skip Tracks should be last in the DSP chain. However if I put it last, the default Crossfader DSP stops working (as if it were not present) - is this expected behavior? While if I put it before Crossfader, they both work, but a track playing before a skipped track, seems to get the end cut off early - I guess by half the fade amount.(?)

(I tested both scenarios with a fresh portable fb 1.4.6 and only foo_skip 1.9.10 installed, with only Skip and Crossfader DSPs, but has been happening a while, fb 1.4.2 at least)

On to feature requests. 1) I use a column in the playlist to indicate the skip status of each track, with title formatting replicating the skip query. Occasionally though I turn off the skipping with a toolbar button. Would it be possible to have a global variable %skip_enabled% that is readable by the playlist? Then I could wrap the column pattern in $if(%skip_enabled%,...) to get immediate visual feedback of skip status when I toggle it.

2) For my skip query I typically include: %last_played% DURING LAST 5 DAYS. (This is because foobar reshuffles playlists every restart, and I find it often repeats tracks I heard yesterday, even with large 200+ playlists on shuffle). This eventually results in all tracks being endlessly skipped, if I'm away from the computer. Would it be possible to have a preferences option 'Stop playback after repeated skips'? - I'm not sure how viable it would be, but maybe the component can note the first track to be skipped per session of playback, and stop when it reoccurs.(?)

Well, in the tradition of Led Zep I've rambled on a bit, thanks for listening and for your work on these components 8)

Cheers

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

Reply #506
[...] Crossfader DSP stops working [...] - is this expected behavior?
I don't remember all the old reasons for the recommendation about the DSP order but the way the skipping is implemented is expected to break many fancy features.

I created a new prototype version of the component that works as a decoder and won't need DSPs and won't break crossfader. I'm not sure I can get all the features of the current version implemented there but we'll see.

Would it be possible to have a global variable %skip_enabled% that is readable by the playlist?
Doing that would require forcing refresh of every track foobar2000 sees when the setting is toggled. Also SDK documentation forbids such fields: "If you can't reliably notify other components about changes of content of fields that you provide (such as when your fields provide some kind of global information and not information specific to item identified by passed metadb_handle), you should not be providing those fields in first place."

Would it be possible to have a preferences option 'Stop playback after repeated skips'? - I'm not sure how viable it would be, but maybe the component can note the first track to be skipped per session of playback, and stop when it reoccurs.(?)
Sounds reasonable.

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

Reply #507
Here's a version that appears to work well enough to give you for a test.

There's a new option to stop playback when running into the first skipped track of the session for the second time. And skipping features will no longer interfere with DSPs. The partial track skips done with SKIP tag now alter the visible track length.

The "Skip even manually selected tracks" option has no effect. Adding support for that will require some hacks with this method and I haven't yet looked into if it can be detected reliably.

For the component to work "Skip Track" decoder should be on top of the Preferences -> Playback -> Decoding listing. It goes there by default on install but if new inputs are installed they will generally go on top.

Edit: removed the old build.

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

Reply #508
Hi Case! Thanks for the update! 8)

The decoder method seems way faster at the actual skipping. The DSPs work perfectly, Crossfader actually fading to the next playable track as if the skipped one in between was not even there. Fantastic.

"Stop after repeated tracks" mostly worked as intended, as long as the playlist had a playable track. On a new playlist with only to-be-skipped tracks (which would not be a common situation), it went on an endless loop, and so fast not even the stop button worked(!) - I had to end task in Task Manager. (Edit: Skip was on %last_played% DURING LAST 5 DAYS)

Secondly, I'm not sure it was entirely "per session of playback" either. On a repeat playlist: 1-2-3 with 2 being skipped and stopping on 3. First time through it continues playing 3, repeats and stops on 3 the second time as intended. If pushing stop during 3 instead and double-clicking 1 again (which should be a new session?), it stops on 3 the first time. (Edit: Skip was on %rating% IS 1)

Re: "Skip even manually selected tracks" having no effect... So I guess that meant, double-clicking a to-be-skipped track, or adding to queue, was skipped regardless. Oh no. Hopefully you can get that working somehow - I always had that option off and prefer it that way. (It makes sense too, if I'm selecting a track to play, I want it to play).

Lastly, with a SKIP tag of 0:00:00-0:01:25, it seems %playback_time_remaining% was not effected (countdown was -4:55 / 3:30).

Nice work for a prototype though! Cheers :)

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

Reply #509
"Stop after repeated tracks" [...] went on an endless loop, and so fast not even the stop button worked(!) - I had to end task in Task Manager.
Thanks for the warning. I'll add prevention against that.

Secondly, I'm not sure it was entirely "per session of playback" either.
I made it reset the session only when the component itself stops the playback. I realize now it should always be reset on stop.

Lastly, with a SKIP tag of 0:00:00-0:01:25, it seems %playback_time_remaining% was not effected (countdown was -4:55 / 3:30).
Sounds like you are seeing information cached by the player. You'll need to reload info. Also currently if you add a SKIP field with foobar the info won't affect length instantly. I could change that by making my decoder take over tagging too and force the updates to core.

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

Reply #510
Yep, reload info indeed fixed it. :)

I hardly ever use a SKIP field so I'm not sure what would be best. I guess if there is no downside...

What would happen to %length% if Skip Tracks is toggled off? When I do that, it seems I have to reload info each time. (Not a big deal though).

(Incidentally I use m-TAGS which writes DURATION into the .tags files for some unknown reason. It is (now) second in the decoding list, was first previously. I doubt using that makes any difference to anything you are planning?)

Cheers

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

Reply #511
The length changing for SKIP is that way out of necessity. If I call regular seek methods DSP effects will break. But if I return original length %playback_time_remaining% will be off and waveform seekbars will display waveforms of the full track and be off-sync.

Duration field of m-TAGS shouldn't affect Skip Track.

Hopefully skipping stopping issues are fixed. And overriding the skip for manually selected track should now work again. Here's a new beta:

Edit: removed the old build.

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

Reply #512
Yes, stopping works perfectly now and manual tracks too. None of previous issues.

Queued tracks not quite - add ten to queue, it plays the first queued track, skips the rest.

Thank you, Case, I'm optimist about these improvements! I'll keep testing it out later but for now I should be asleep... ;)

Cheers

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

Reply #513
Here's a new version where everything else but bookmarking should work. I removed the feature entirely as it is incompatible with this decoder approach.
The betas had the full track skipping active everywhere so it affected for example Converter and ReplayGain scanner. Now it's enabled by default only for playback but can be toggled on for Converter.

Edit: removed the old build.

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

Reply #514
(‒ic. Optimistic)

Hi Case,

So close. :) Now the reverse, all queued tracks play correctly, but double-clicking on one to-be-skipped track skips (the 'Skip even manually selected' option off in preferences to no effect)

^ Related I think, the "playlist on repeat with all to-be-skipped tracks" -scenario needs ending in Task Manager again. I guess because normally double-clicking would play at least one track. Indeed if I queue one track in same playlist, it plays, and then stops after the repeated skips correctly.

Edit: perhaps such a rare situation not worth the effort? For a user to trigger would have to be specific preferences on/off, and no one would make a playlist with no tracks that play; I only discovered it by accident...

One other suggestion which is totally your call but I'll just mention briefly - I think the Playback menu option should just be 'Skip tracks'. The checkbox shows the enabled status, and if toggling it off, selecting an option that says 'Enable' seems strange. And then if not using the component name, of course it would be sentence form to match other menu options. (And match the likes of your useful 'Stop after queue' component / menu option, which by the way I had disabled for testing the above...)

(Nitpicking, I know :D )

Cheers

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

Reply #515
A playlist with all tracks skipped should still have stopped when the "stop after repeats" option is set. And even with it not set the UI shouldn't be allowed to freeze. Unfortunately I can't seem to make skipping go so fast as to freeze the UI so I didn't notice the prevention measures for non-stop case weren't active. The intention was to play silence if the player isn't stopping but the silence was never inserted.

I can't trigger a double-click-not-playing bug. I'll attach a debug version that prints some status info to console. Could you copy paste the console output from the first "Skip Track debug" string where the manual override of skip fails?

I changed the menu name back.

Edit: removed the debug build.

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

Reply #516
Hey Case,

I bring good news. Before I installed the debug version I found out the problem - it was m-TAGS. Double-clicking a to-be-skipped FLAC track in the playlist directly, it played fine, while same m-TAGS track would skip. So I moved the m-TAGS decoder above Skip Tracks decoder, now everything seems it work perfectly. :)

Installing debug version, I tested the non-stop skipping issue and was able to push stop button during the silence you mentioned, so that works too. In case I was not clear about that, the freeze was not a typical "unresponsive" app that Windows reports, rather none of the menus or buttons would even highlight in blue when mouse-over'd and clicking them did nothing. (foobar though just doing as instructed, skipping every track really fast :D )

Nonetheless the debug results, not revealing much. The only difference between the two tests was the line "Skipping track..." (track #2 set to skip, double-clicking it...)

Playing correctly (m-TAGS decoder on top):
Code: [Select]
Skip Track debug: on_playback_starting
Skip Track debug: g_playing_playlist_name = Ben Harper - Lifeline, g_active_playlist_name = Ben Harper - Lifeline, g_playback_order_name = Repeat (playlist)
Skip Track debug: track_command_settrack
Skip Track debug: new g_playback_order_name = Repeat (playlist)
Opening track for playback: "M:\Music\Ben Harper\Lifeline\Lifeline.tags" / index: 2
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\02 In The Colors.flac [0]
foo_title: Loading album art...
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\01 Fight Outta You.flac [0]
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\01 Fight Outta You.flac [0]
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\01 Fight Outta You.flac [0]
Skip Track debug: on_playback_new_track
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\02 In The Colors.flac [0]
Skip Track debug: on_playback_stop
Skip Track debug: stop_reason_user
Skip Track debug: new g_playback_order_name = Repeat (playlist)

And skipping incorrectly (Skip Tracks decoder on top):
Code: [Select]
Skip Track debug: on_playback_starting
Skip Track debug: g_playing_playlist_name = Ben Harper - Lifeline, g_active_playlist_name = Ben Harper - Lifeline, g_playback_order_name = Repeat (playlist)
Skip Track debug: track_command_settrack
Skip Track debug: new g_playback_order_name = Repeat (playlist)
Opening track for playback: "M:\Music\Ben Harper\Lifeline\Lifeline.tags" / index: 2
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\02 In The Colors.flac [0]
Skipping track...
foo_title: Loading album art...
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\01 Fight Outta You.flac [0]
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\01 Fight Outta You.flac [0]
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\01 Fight Outta You.flac [0]
Skip Track debug: on_playback_new_track
Opening track for playback: "M:\Music\Ben Harper\Lifeline\Lifeline.tags" / index: 3
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\03 Fool For A Lonesome Train.flac [0]
foo_title: Loading album art...
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\01 Fight Outta You.flac [0]
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\01 Fight Outta You.flac [0]
Skip Track debug: on_playback_new_track
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\02 In The Colors.flac [0]
m-TAGS:: REFERENCED FILE: file://M:\Music\Ben Harper\Lifeline\03 Fool For A Lonesome Train.flac [0]
Skip Track debug: on_playback_stop
Skip Track debug: stop_reason_user
Skip Track debug: new g_playback_order_name = Repeat (playlist)

(Adding to queue works either way. I'm not sure why beta 2 worked with m-TAGS / double-click though...)

Component list, FYI
Spoiler (click to show/hide)

At any rate I'm very happy with this new and improved foo_skip. Thanks, Case. Sorry my request took so much mucking about. :-[

Cheers

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

Reply #517
New build that should fix compatibility with m-TAGS and some issues I found in my testing. I also increased the delay it adds when looping is detected and playback is not set to stop.

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

Reply #518
Hey Case,

Everything working fine with that one. Skip Tracks decoder back on top.

Excellent!

Cheers 8)

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

Reply #519
Good to hear. The new version is now officially released.

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

Reply #520
SKIP tag handling worked for me in some previous version of foo_skip, but with updating to foo_skip 1.10.2 it stopped working completely (I guess, the main difference would be in moving foo_skip from DSP to Decoding?).

Various bits of information about my foobar2000 installation and its' configuration:
Spoiler (click to show/hide)

Tests were made by adding SKIP external tag with value 0:01:44-0:02:28 to some YouTube URL and then restarting foobar2000 and ensuring that tag value is appeared both in Edit external tags and Properties before playing track

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

Reply #521
Unfortunately reading skip info from External Tags is currently not reliable. The component opens a real decoder for handling the track but there's no API to get the decoders in configured order. When the order isn't correct the info it reads doesn't contain the skip data.

But I'm under the impression you don't need External Tags with YouTube component as it does its own tagging.

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

Reply #522
Unfortunately reading skip info from External Tags is currently not reliable. The component opens a real decoder for handling the track but there's no API to get the decoders in configured order. When the order isn't correct the info it reads doesn't contain the skip data.

But I'm under the impression you don't need External Tags with YouTube component as it does its own tagging.
No, External Tags (or analog) is required, or at least I personally am not aware of a way to manually add and permanently store YouTube track's unique SKIP tag on a case-by-case basis using foo_youtube only.

Maybe you've thought about https://fy.3dyd.com/help/metadata/
Quote
Component supports two ways to produce metadata. First one is to map video properties to metadata fields as is. Second one is to parse video title and extract metadata out of it.

...Oh, or, maybe you've meant this (from the same link):
Quote
Metadata can be overridden on URL basis. This can be done by extending video URL with pairs field=value where field is metadata field name prepended with fb2k_ prefix

I did read help earlier and just completely forgot about this feature, because I wanted to keep original URL as-is.

Now I've tried it and fb2k_SKIP value is really seen in track properties as SKIP tag in Metadata tab, but it doesn't lead to real skipping.

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

Reply #523
There were actually two other issues preventing the new Skip Track from working here:
First obstacle was that the component didn't operate at all for tracks that returned a mime-type as I figured no one would want to use it with streams.

Second problem was that I had prevented operation on all decoders that mark themselves as redirectors. This was done to prevent potential infinite recursion, but currently I think there are no other components doing what I do except Skip Track and External Tags. So just blacklisting Skip Track in External Tags prevents the problem.

A new version with the above restrictions removed is out.

I haven't read any foo_youtube documents. I just open track properties and add or edit the tags as I please and they are stored under foobar's profile in foo_youtube's cache dir.

Edit: Note that External Tags actually has foo_youtube excluded by its custom mime-type. It interfered with its operation and it's pointless there when youtube component seems to be able to store any metadata on its own.

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

Reply #524
A new version with the above restrictions removed is out.

I haven't read any foo_youtube documents. I just open track properties and add or edit the tags as I please and they are stored under foobar's profile in foo_youtube's cache dir.
It really does (I didn't notice it) and I also confirm that this works just fine with updated foo_skip, enabling skipping. Thank you.

Edit: Note that External Tags actually has foo_youtube excluded by its custom mime-type. It interfered with its operation and it's pointless there when youtube component seems to be able to store any metadata on its own.
Though, this is literally a metadata "cache", which is, like, not permanent storage. foo_youtube's preferences allow to set its' capacity to unlimited (in practical sense, to make it permanent), but it's itchy for me: this cache is used also for metadata of search results (which I prefer to be cleaned periodically, so I'll have to make it manually), it's all stored in flat scheme in one directory (with 50 results on search page it will grow relatively fast also in file count), files are automatically named after URL.

I have no local music files and I am using foo_youtube exclusively. foo_external_tags was a solution for permanent correcting of Artist Name and Track Title along with storing ReplayGain info for "favorite" URLs. I especially liked the option of storing all external tags in one file (in SQLite database).

Given that (as I understand) there are inherent limitations preventing using SKIP tag from foo_external_tags, I have no further relevant requests. However, I'll use explicitly saved metadata in form of m-TAGS files instead of foo_youtube's metadata cache: SKIP tag in m-TAGS file is also recognized by foo_skip, but, additionally, m-TAGS files are explicitly named and placed, they are recognized by Media Library and Waveform Minibar (mod) doesn't recognize them as remote tracks therefore saving waveforms permanently (like I want).



Should two or more intervals work? Like 0:00:04-0:00:15;0:00:19-0:00:25. It doesn't work for me, and I have a track where I'd like to use it.



I think I have a bug report (for foo_skip v1.10.3), though issue is unusual enough to think I just did something wrong, but it was reproduced on three different foo_youtube's tracks.

0:00:04-0:00:10 works, but 0:00:05-0:00:10 stops playing after 5 seconds and jumps to next playlist entry. Incidentally, Waveform Minibar (mod) also abruptly stops visual scanning at (what looks like) 5 seconds mark.

But if in these 5 seconds I click on Waveform Minibar (mod) panel to beginning of track (before 5 seconds), playing will continue work with skipping, however, waveform scanning will still be (visually) stopped.

 
SimplePortal 1.0.0 RC1 © 2008-2019