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_queuecontents - View and edit queue (Read 164427 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_queuecontents - View and edit queue

Reply #300
I suspect I am an average/typical user.
Everybody thinks that.  What's your sample size?

Of course you are correct. In the future I will strive to not so carelessly generalise, and to be more precise in my observations.

The Keep Queue component has not been updated in a long time.

Ultimately whatever da yuyu decides to do with the Queue Editor component will be fine.

Re: foo_queuecontents - View and edit queue

Reply #301
I like and use Kerpondile's Queue Contents Editor. So I will post my two cents worth:

In regard to the Queue playlist. I find it to be useful too.

As for the Stop after queue feature. I always keep the Stop after queue component activated/selected. I have never needed a toggle or visual indicator to let me know the component's current state. I can't speak for others obviously, but I suspect I am an average/typical user.

As for "keep queue", If I remember there is a component for that but having that built into an editor sounds like a  positive.
I often set a queue of often-unrelated music for listening before the player ultimately gets to a track in a particular album which I would like it to continue playing. The solution I finally found recently was built into Playlist Attributes - the "Stop after focused track" function. It lets me queue up as many tracks as I want, then keep playing from the final track in the queue until it plays the focused track. It is very flexible - much more so than a "Stop After Album" would be, or even "Stop After Queue", which I also tend to use a whole lot at other times. I require a visual indicator to know when it is or is not going to stop at a certain point, as sometimes I just let it keep playing.

The sample size has increased to 2.
Think millionaire, but with cannons.

Re: foo_queuecontents - View and edit queue

Reply #302
@Cannonaire

Ok, I got you. You are saying that you find it helpful to have a visual indication of the on/off state of "Stop after queue". I am corrected.

Can I ask what you used to make the "indicator" buttons in the screenshot? Are you using Columns UI?

Re: foo_queuecontents - View and edit queue

Reply #303
Yes, Columns UI. I downloaded free icons for the buttons.
Think millionaire, but with cannons.

Re: foo_queuecontents - View and edit queue

Reply #304
There is a new beta release available.

Requirements:
- fb2k v2 is now required.
- Best run in a new portable installation.
- Configuration is not v1.0 backward compatible.

What's new:
- Dark mode.

Known issues:
- 'Hide header' is no longer available in context menus.
- Issues related to enabling/disabling columns and column auto-resize.

I will review the latest posts after a short break...

Download: Queue Editor v2.0 beta

I hope you like it... thanks for your feedback!

Re: foo_queuecontents - View and edit queue

Reply #305
Quick fix for wrong new field ID generation, causing unresponsive Apply and Remove button actions.

Queue Editor v2.0 Beta 2

Re: foo_queuecontents - View and edit queue

Reply #306
This new beta release fixes most issues related to the preference panel.
Final v2.0 should be almost ready.

Queue Editor v2.0 Beta 3

Fixes:

- Preference page: Field add/remove actions revised.
- Preference page: Reset and Apply.
- Column auto-size revision.

Whats new:

- Preference page: New list control context menu.
- General preference page layout revisions.

Mixing fixed and auto-sized columns probably works unusually.
In order to set an auto-sized 'Queue item' field surrounded by two fixed-sized fields:

- Disable the context menu auto-size option.
- Remove all header columns.
- Add fixed-sized column 'Queue index'.
- Enable auto-size in the context menu.
- Add auto-sized column 'Queue item'
- Disable auto-size.
- Add a fixed-sized column 'Codec'.


Re: foo_queuecontents - View and edit queue

Reply #307
Queue Editor v2.0 Beta 4

Fixes:
- More revisions on editing/reset/applying preferences.
- Drag and drop tracks from the Library View should now replicate the 'Add to playback queue' stock option.

What's new:

- 'Send to playlist' context menu options.

Re: foo_queuecontents - View and edit queue

Reply #308
In the old version we could hide columns label completely, doesn't seem to be possible anymore?

Re: foo_queuecontents - View and edit queue

Reply #309
Queue Editor v2.0 Beta 5

- Show/hide column headers, @nikolai4ik.
- Keep queue when closing foobar2000 and save/restore context menu options, @Air KEN.
- 'Copy' context menu option.
- Misc fixes related to resetting and applying column configuration changes.
- Even more thoroughly tested.


Re: foo_queuecontents - View and edit queue

Reply #310
@da yuyu

> Keep queue when closing foobar2000 and save/restore context menu options

Thanks, But It disappears when I restart foobar. I don't think it's enabled. I may be using it incorrectly.



Should I click "restore" after restarting foobar? This is a "restore" function, right?
SHURE SRH1840, SENNHEISER HD660S2, Beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Ultrasone Performance 880, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, EDIFIER WH950NB, Bose QuietComfort 45, SONY WH-1000XM5 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: foo_queuecontents - View and edit queue

Reply #311
I had a quick glance at the code and saving the queue as JSON is.... odd. I'm too lazy to inspect deeply but it consider subsongs?

My implementation does because I save as fpl using...

Code: [Select]
try
{
playlist_loader::g_save_playlist(playlist_path, handles, fb2k::noAbort);
}
catch (...) {}

edit: code for restoring the fpl during on_init...

Code: [Select]
		void restore_playlist()
{
if (!is_file(playlist_path)) return;

pfc::string_list_impl list;
list.add_item(playlist_path);
static constexpr uint32_t flags = playlist_incoming_item_filter_v2::op_flag_no_filter | playlist_incoming_item_filter_v2::op_flag_delay_ui;
auto ptr = process_locations_notify::create([](metadb_handle_list_cref handles)
{
PlaybackQueueCallback::Scope scope;
auto plman = playlist_manager::get();
QueueList::add_handles_to_queue(plman, handles);
});

playlist_incoming_item_filter_v2::get()->process_locations_async(list, flags, nullptr, nullptr, nullptr, ptr);
}

Re: foo_queuecontents - View and edit queue

Reply #312
delete
SHURE SRH1840, SENNHEISER HD660S2, Beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Ultrasone Performance 880, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, EDIFIER WH950NB, Bose QuietComfort 45, SONY WH-1000XM5 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: foo_queuecontents - View and edit queue

Reply #313
@Air KEN

You are welcome, thanks for your feedback.

The save-on-exit option can be set in the preference panel.
Next to the show/hide header currently having some refresh issues, btw.
Maybe 'Save now' and 'Restore last' would have been more accurate.

Loading back the queue on restart is done manually using the restore option mentioned above. Need to test both Queue Viewer and Editor trying to restore the queue simultaneously... I am not very keen on testing that atm.

@mark2k3

Thank you for the code snippets,
done it in 20 lines of code : )

You are right about subsongs, they are not supported. And JSON, a bit awkward... but easy to edit.
I code and test the component mostly dragging tracks from the Library View into the queue... not sure if 'orphan tracks' is the right term. I am just recently meet the t_playback_queue_item structure:

struct t_playback_queue_item {
   metadb_handle_ptr m_handle;
   t_size m_playlist,m_item;
}

I couldn´t find a way to query the SDK about subsongs contained in that structure. I guess I still have to wrap my head around a lot of basic fb2k stuff!

Re: foo_queuecontents - View and edit queue

Reply #314
get_subsong_index is a metadb_handle method.

https://github.com/jscript-panel/foobar2000-sdk/blob/fb73cfaa76c126c91da49c8d07b79303db3a06f2/foobar2000/SDK/metadb_handle.h#L160-L161

But you really don't want to go down that route for this. :/

---

For adding handles to the queue, I noticed adding from Album list and the like will add the playlist/item indexes if those items happen to be in the active playlist as well. I want to replicate that same behaviour when restoring from playlist or drag/drop and since there doesn't appear to be any "proper" way of doing that, I have highly inefficient fugly code which searches the active playlist for every handle. I don't know how else it can be done. At least the queue is limited to 256 items so I've not had any issues reported about it.

Code: [Select]
void QueueList::add_handles_to_queue(const playlist_manager::ptr& plman, metadb_handle_list_cref handles)
{
const size_t playlistIndex = plman->get_active_playlist();

for (auto&& handle : handles)
{
size_t playlistItemIndex{};
if (plman->activeplaylist_find_item(handle, playlistItemIndex))
{
plman->queue_add_item_playlist(playlistIndex, playlistItemIndex);
}
else
{
plman->queue_add_item(handle);
}
}
}




Re: foo_queuecontents - View and edit queue

Reply #315
thanks @mark2k3... also for another component I am looking for kind of the opposite, creating a metadb_handle given a path to a .cue and subsong index.

About the drag/drop, active playlist selections also seem to play a role in picking duplicate track positions.
As you say, it is nice about the 256-item limitation. There is also that after all fetching, some tracks might silently vanish from the queue on playlist deletion. NEIN in Queue Viewer might be related to that?

Finally, I tried to prevent duplicating queue items on start, having both Queue Viewer and Editor installed with the restore option on. Checked the queue size on different init stages, to prevent loading the queue twice without luck.

Re: foo_queuecontents - View and edit queue

Reply #316
@Air KEN,
The 'Save and Restore' context submenu is now named 'Session queue' and contains 'Save now' and 'Restore last'.
The preference panel 'Save on exit' should now be fixed... it was using the 'Show column header' preference instead.
And finally, the 'Load on init' option has been added to the preference panel. Your feedback was spot on to fix/clarify this functionality, thanks again for that.

Queue Editor v2.0 Beta 6

What´s new:
- Subsong saved to session queue JSON file.
- Load queue when foobar2000 starts.
- Context menu Columns submenu available in hidden header configurations.

Fixes:
- Most issues related to refreshing/repainting column headers.
- 'Save on quit' preference option setting not applying.
- Panel border style (CUI).
- Reordering items crashing after playlist deletion.

Re: foo_queuecontents - View and edit queue

Reply #317
@da yuyu
Thank you for your valuable time and effort.

Context menu > Session queue > Save now / Restore last
Preferences > Tools > Queue Editor > Session queue: Load when fb2k starts / Save on exit Option




I don't know how to use it and the results, so I'll do some more testing.

foobar2000 menu > Playback > Flush playback > queue
    ↑ Is this also an option in Queue Editor?
SHURE SRH1840, SENNHEISER HD660S2, Beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Ultrasone Performance 880, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, EDIFIER WH950NB, Bose QuietComfort 45, SONY WH-1000XM5 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: foo_queuecontents - View and edit queue

Reply #318
@Air KEN

... not more than yours!   ???

All save and restore actions relates to the file <profile/configuration folder>foo_queue_editor.dll.dat.
It might help keeping it open in Notepad++ so that file updates can be easily reviewed.
The preference panel options are quite self explanatory ?
The context menu Session queue > 'Load now' and 'Save latest' do the same, but can be used at any moment, the preference panel options are the 'automated' versions.

Thanks for testing.

Re: foo_queuecontents - View and edit queue

Reply #319
...
foobar2000 menu > Playback > Flush playback > queue
    ↑ Is this also an option in Queue Editor?

I would say that the equivalent would be to select and remove all tracks in the component list.
A context menu 'Remove all' might be added in next releases...

Re: foo_queuecontents - View and edit queue

Reply #320
Quote
I would say that the equivalent would be to select and remove all tracks in the component list.
A context menu 'Remove all' might be added in next releases...
Thank you.
This is a Option of "Queue Viewer". I deleted "Queue Viewer" for TEST of "Queue Editor", but it seems to remain.
SHURE SRH1840, SENNHEISER HD660S2, Beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Ultrasone Performance 880, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, EDIFIER WH950NB, Bose QuietComfort 45, SONY WH-1000XM5 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: foo_queuecontents - View and edit queue

Reply #321
Option to stop after playing the last queue (Stop after queue).
Are there any plans to add this option?

Thanks.
SHURE SRH1840, SENNHEISER HD660S2, Beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Ultrasone Performance 880, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, EDIFIER WH950NB, Bose QuietComfort 45, SONY WH-1000XM5 (made a Upgrade/Balanced Cable by myself) Shall I write more?


Re: foo_queuecontents - View and edit queue

Reply #323
@grimes
Thanks, Of course I know that Component and use it.

This is a continuation of a previous request.
Reply #290 https://hydrogenaud.io/index.php/topic,73648.msg1035439.html#msg1035439
"Is it possible to add options such as Stop after queue or Keep queue?"

This is a request to be included together.
SHURE SRH1840, SENNHEISER HD660S2, Beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Ultrasone Performance 880, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, EDIFIER WH950NB, Bose QuietComfort 45, SONY WH-1000XM5 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: foo_queuecontents - View and edit queue

Reply #324
Final Queue Editor v2.0 is now available.

Change log:

- Fixes queue list header line on startup.
- Fixes Queue playlist feature selection on startup.
- Context menu shortcut to 'Flush playback queue'.
- Context menu shortcut to foo_stop_after_queue (requires Stop after queue).

- Updated foobar2000 SDK.
- License upgrade to GPLv3.