How to register a widget/panel element?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: How to register a widget/panel element?

Re: How to register a widget/panel element?

by PetrCBR » Sat Jun 13, 2026 3:52 pm

Check maincontent.js for

Code: Select all

    // Here you can register any custom panels user can use in customized layout (must be registered before initializeTabs!!)
    uitools.getDocking().registerDockableControl('LyricsWindow', '', 'Lyrics', 'lyricsWindow', '', 'left,right');

Re: How to register a widget/panel element?

by wutzin » Sat Jun 13, 2026 2:31 pm

This is how far I've gotten:

So far, I managed to use the AI addon generator to write an extension that inserts a "Playlists:..." section into the Track-Info panel:

Image

Unfortunately, I'm stuck - it inserts the Playlist-Info sometimes multiple times (depending on the layout of the Track-Info panel), and I haven't been able to query actual track data, so the playlist names shown are just static dummy data :(

How to register a widget/panel element?

by wutzin » Sat Jun 13, 2026 1:28 pm

Hi,

In the right side panel, I want to display what playlists a selected/playing file is a member of. This is vital information for users who actually organize their music in playlists, but going into file properties and then switching tabs just to check if you have added a particular song to a given playlist is not really user-friendly.

So I thought I could
a) hack the Track-Info widget to include not only regular metadata of a track, but also its playlist memberships
OR
b) register a new "Playlist-Memberships" widget, that I can then add to my right panel to display playlist memberships

Using approach a) and the AI plugin generator, I have managed to successfully insert dummy html content in the track-info window, but it shows up twice and in the wrong places and crashes as soon as I try to query and insert actual track data and it's really hard to trouble-shoot because I don't know the structure/classes of the track-info html widget.

So I thought approach b) of registering a completely separate widget might be the cleaner approach. But I have found no info on how to do this - and the AI plugin generator also hasn't managed in many attempts to even get a dummy entry to show up in the view configuration dialogue.

Any help regarding either approach would be appreciated. Or should I instead just submit a feature request (introduce playlist classifications as a column in library view and/or as option in the extended track-info view (where you select which track metadata to include).?

Top