Show FLAC extended tag in list view

Get answers about the current version of MediaMonkey for Windows

Moderator: Gurus

Peke
Posts: 18181
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Show FLAC extended tag in list view

Post by Peke »

Hi,
Additionally as it is not all that black for good example as you have DISCOGS extended tags available, so if Discogs plugin gets ported to MM5 it can easily take advantage of Discogs extended tags and improve Auto Tag.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Platonius
Posts: 37
Joined: Mon May 25, 2020 9:37 am

Re: Show FLAC extended tag in list view

Post by Platonius »

There is no way that MM easily support all of them especially as they are some app specific tags like Serato.
You're the only ones constantly talking about supporting every tag. None of the 3 people requesting this have ever asked for ALL possible tags to be supported and properly parsed into the corresponding data! We just want the custom tag(s) we use to be visible in the views.

I don't know how extended tags are implemented in MM5. I don't know at what point they are read from the file.
But I know they are read (hence the "extended tags" column) and there's code to split them (for the properties page, but even the "Extended Tags" column is already parsed). So the tags should already be available.

Say that I want the "RemixedBy" tag, or my own tag "VERIFY_RESULT" to be visible. All that's needed is to create a link between a column that can be used in the view and a single extended tag. Easiest by manually typing the tag. If it's not present - do nothing, otherwise print the contents. Doesn't even cost additional processing time or memory when it's not used if that's a concern.

I'm not asking for reverse-engineering Serato tags or whatever, and if somebody wants to print the Serato Base64 encoded strings - let them... I don't care.
Peke
Posts: 18181
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Show FLAC extended tag in list view

Post by Peke »

Hi,
Platonius wrote: Tue Aug 24, 2021 10:19 am You're the only ones constantly talking about supporting every tag. None of the 3 people requesting this have ever asked for ALL possible tags to be supported and properly parsed into the corresponding data! We just want the custom tag(s) we use to be visible in the views.
It is not a problem with you 3, but with whole concept of adding something Natively. Even single field need case checker, format case, UI, Translation, skins update, Check for supporting in other file types, ... and what if there is another 3 users want other tags, they would say if you made one support you can make few more. There is no end to that. NOTE that these fields are EXTENDED non-Standard fields.
Platonius wrote: Tue Aug 24, 2021 10:19 am I don't know how extended tags are implemented in MM5. I don't know at what point they are read from the file.
They are read on import in a way: Read file tags -> Extended tag found -> Read all as single special tag and write down.
Platonius wrote: Tue Aug 24, 2021 10:19 am But I know they are read (hence the "extended tags" column) and there's code to split them (for the properties page, but even the "Extended Tags" column is already parsed). So the tags should already be available.
They are read exactly as you pointed during rendering of properties dialog or by call from API on specific tag requested.
Platonius wrote: Tue Aug 24, 2021 10:19 am Say that I want the "RemixedBy" tag, or my own tag "VERIFY_RESULT" to be visible. All that's needed is to create a link between a column that can be used in the view and a single extended tag.
That is not true, you need to create script that will call MM API to fetch/read Your Specific Tag from all extended tags, Ask MM UI API to Create UI element in MM main scree, call registry to read positions, format, color, translation, then after you have all the info tell MM API to Render the UI (Which will call Chromium), format Information in UI usable info, tell Chromium to show it, Assign Mouse gestures, Keyboard shortcut, assign index for search engine, Sort the format in UI, .... and that is all is needed in order to show 5 letter text at right place in MM UI. Not talking about debugging wrong cases, corrupted data, invalid data, .... or even what is also needed to make writing support for same tag you only made for yourself and you can change/decide you do not like it anymore because you have found that other one would be better, which means all work invested is wasted. Now instead of all that you have column and once you open properties for track you can edit/change your own extended tag or decide that for yourself create plugin/addon which will format and do that for you when you select track.
Platonius wrote: Tue Aug 24, 2021 10:19 am Doesn't even cost additional processing time or memory when it's not used if that's a concern.
As I previously pointed you only count one track not bunch of tracks, which really takes literally <500ms to do that and you see the properties of track and can edit the tag (try to notice how long it takes to get into edit mode). All takes resources and takes time.

Have you tried to load 10k-15k of tracks in Tagscanner and see how long it takes to read all the custom tags, sort them and show them (Scan the physical files not query internal DB for the tags after they are already scanned). Even try to Drag and drop 1000 tracks to Tagscanner and see. No matter how MM is close to be perfect it will never be perfect for all users. Extended tags implementation was very requested feature in previous versions where MM simply skipped the tags. MM5 added reading of such tags, created tools and API calls so that anyone that really have need for them can easily make support for them self with as little fuzz as possible. We are always willing to help in terms of debugging, suggestions and improving API/Tools that are supplied in order to make that user make himself more perfect enviroment for its needs.

For example see MonkeyRok, LyricsViewer, Song Information Panel Plugins that do similar thing in MM4 and none of main MM devs were made it. MM5 opens things further, especially as it uses more common tools to create that can be also used not just in MM, but on whole WEB, or to expand Browsers like EGDE, Chrome, Firefox, .... or apps in MACOS, Linux, Android, iOS.
ImageImageImage

Why not trying by yourself, we and our community are more than willing to help you archive your goal, but majority of work and invested time is yours for your own needs and will stay yours for life. Seeing not 3 but several thousand of user use your plugin/script for 15+ years means something and accomplished. MM is a swiss knife, but like swiss knife it can't weld steel or laser cut.

We really care, but we unfortunately we can't make all. At least we try to supply means and tools in order that someone can make his/hers life better (if in time make some other user life better I think it is Win Win).
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Platonius
Posts: 37
Joined: Mon May 25, 2020 9:37 am

Re: Show FLAC extended tag in list view

Post by Platonius »

I already started checking add-on code yesterday, but it's difficult to get my head around the way it's set-up. Also because I can't find a good starting point as far as existing add-ons. And JS isn't my primary language (but I know my way around C/C++/C#/Ada/Powershell/Python, so it should come... sometime...).

But at least the "Hello World" sample script works :wink:
Peke
Posts: 18181
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Show FLAC extended tag in list view

Post by Peke »

Platonius wrote: Wed Aug 25, 2021 2:56 am I already started checking add-on code yesterday, but it's difficult to get my head around the way it's set-up. Also because I can't find a good starting point as far as existing add-ons. And JS isn't my primary language (but I know my way around C/C++/C#/Ada/Powershell/Python, so it should come... sometime...).

But at least the "Hello World" sample script works :wink:
Only thing I can tell is welcome and see you in dev part of forum where you can threw more questions to us.
Feel free to ask anything there, we can figure out space where you swim the best at.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Anamon
Posts: 77
Joined: Sat Jul 21, 2007 4:38 am
Location: Switzerland
Contact:

Re: Show FLAC extended tag in list view

Post by Anamon »

Hi,

I know this is an old thread, but just in case anyone is finding this through Google while trying to answer the same question (I did).

I also wanted the kind of sorting and filtering capabilities given to Custom tags, but applied to some Extended tags which are written by other software I use. The conclusion was that I needed to write my own script either way. One option probably would've been to actually extend the columns and filters to support the new fields, but I wasn't sure how complicated and performant that might turn out to be. So I went for a simpler solution: I wrote a small script which simply copies the Extended tags I'm interested in into MediaMonkey Custom tags I prepared for that purpose. This works fine for me because I don't let external software overwrite my file tags, so I basically just have to run this script once on the files I import into MediaMonkey, and I got everything I need.

In case this would work for somebody else, here's the script I quickly hacked together, liberally adapted from the stock "swap artist/title" example script. It should be easy enough to figure out where to fill in the Extended tags you need, and how to map them to the Custom tags 1-10:

Code: Select all

actions.copyAnamonTags = {
    title: _('Copy Anamon tags'),
    hotkeyAble: true,
    icon: 'synchronize',
    disabled: uitools.notMediaListSelected,
    visible: window.uitools.getCanEdit,
    execute: async function () {
        var list = await uitools.getSelectedTracklist().whenLoaded();
        if (list.count === 0) {
            return;
        }

        var msg = sprintf(_('Are you sure that you want to modify %d files ?'), list.count);
        messageDlg(msg, 'Confirmation', ['btnYes', 'btnNo'], {
            defaultButton: 'btnNo',
            title: _('Copy Anamon tags'),
        }, function (result) {
            if (result.btnID === 'btnYes') {
                list.forEach(function (itm) {
                    itm.getExtendedTagsAsync().then(function (extendedTags) {
                        const tagArray = JSON.parse(extendedTags)
                        const catalogNumber = tagArray.find(tag => tag.title === 'CATALOGNUMBER');
                        const releaseTime = tagArray.find(tag => tag.title === 'RELEASETIME');
                        const source = tagArray.find(tag => tag.title === 'SOURCE');

                        itm.beginUpdate();
                        if (!!catalogNumber && !!catalogNumber.value) {
                            itm.custom2 = catalogNumber.value;
                        }
                        if (!!releaseTime && !!releaseTime.value) {
                            itm.custom1 = releaseTime.value;
                        }
                        if (!!source && !!source.value) {
                            itm.custom3 = source.value;
                        }
                        itm.endUpdate();
                    });
                });
                list.commitAsync();
            }
        });
    }
}

window._menuItems.editTags.action.submenu.push({
    action: actions.copyAnamonTags,
    order: 30,
    grouporder: 10
});
Post Reply