MB Enhancements for classical music

Just a quick point re track title grouping. In Picard, Classical Extras attempts to do this for classical works (if you want to use track titles rather than work names) by applying the work structure to the titles. Where CSG has been followed this works perfectly. In other cases it works so long as a reasonably consistent approach to track titles - i.e. including the parent work name(s) - has been adopted. Obviously it is not a solution for non-work-related groups.

:blush: you’re right ! removing these items right away!

Actually there could be a very easy fix which do not require any scripting, using User Stylesheets. I’ve started to test it, it seems to work. I’ll put this in a separate topic “Quick fixes of MB UI at user level”

Indeed, when there are workarounds available we should promote them. This enables to focus development work on the most critical issues for which there are no workaround. I didn’t know about this script. I definitely need to test it!

I agree that the work search feature could be improved. When editing tracks/works relationships, the default match which uses the track title often doesn’t work due to difference of language, or of the tracks naming conventions. But it’s easy to address by replacing the default search text by the right keywords. For example: Bach "BWV 345", Leclair op. 2 no. 3
It’s not as efficient as having directly the right suggestion, but it’s quite efficient anyway.

Indeed, this toolbox seems very useful! it should definitely be pinned …

Did that. Will look through the rest of this post carefully when I have some more time. Some bits already have tickets (and are things I hope to eventually work on), some don’t but seem doable, some are currently very unlikely to happen except in the distant future (inheritance, which I’m not completely sold on personally tbh, and probably track grouping, which I’d love to have but does involve very significant changes).

Try “work name AND Bach” or whatnot for that :slight_smile: It’s admittedly harder for any artists whose artist name isn’t in the Latin script, but it’s useful for most of them.

1 Like

Possibility to copy artist linked to a recording, and paste him/her to another recordings together with all attributes. Especially when editing operas, it is pretty cumbersome to enter the same information on many recordings: artist name, “vocals”, type of vocals (tenor, soprano, …), “credited as” etc. Sometimes it is possible to apply a change for all relationships of the same artist on the page, but for large releases it does not work since the same artist may play different roles in different operas in the same release. It would be great if a reference together with all attributes could be copy-pasted.

Thanks, I’ve added this to the list.
But I’m wondering if there is not an existing workaround already …
If you have set the tracks artists relationships, you can then use Replace recording artists to set the recording artists based on the tracks artists relationships. It’s simple and easy … I’ve just tested it, it works great. Basically you set once the artists relationships on the tracks, then the script does all the work of setting the recording artists based on the tracks

When entering them you can batch-add them to only the selected recordings, but you probably know that :slight_smile: When editing existing ones though this is a problem, yes. Not only a classical-related issue, but probably more common in classical.

That’s a pretty simple change (@Bitmap wrote most of the required code as it is for the collapsible release events), and it’s something that has bugged me for a while but somehow I never thought about just fixing like that. So I just put a PR up for it - no promises on when it’ll get merged, but it will eventually get out there :slight_smile: I went for 4 artist credits, not 2, since I don’t mind the row being a bit “chunkier” and I think that gives a better quick idea than just 2 :slight_smile:

Huh, how often does this actually happen in your experience? My experience is that barely anyone enters aliases in the first place, much less change them :confused:

Actually, if we launch a clean-up of works names, it should happen quite a lot.
For two reasons:

  • when we clean-up work names, one of the recommendations would be to keep the old name as alias, unless it is very wrong. This point is important as we don’t want to throw away all the existing work that has been done in work naming. Just clean up to have consistent naming rules.
  • if we are consistent in naming works in a given language, there will be need to have translations in other languages

One more enhancement: when opening a release in “edit relationships” mode, have a possibility to collapse/expand each media (CD) separately, as well as all at once (“collapse all” / “expand all”). Currently collapsing/expanding is possible when viewing a release, but not when editing relationships.

I often edit releases with 40 and more CDs (“Complete Works of …”) where it is pretty inconvenient to have all CDs expanded. As an example, go to this one, click on “edit relationships” and enjoy :wink:

1 Like

This should be achievable through a user script … I’m not good at scripting, but this should be easy.

Here is a user script which does the trick. Not pretty, but it works.

// ==UserScript==
// @name         MusicBrainz UI: Make tracks collapsible in Release "Edit Relationships"
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Make  tracks collapsible in Release "Edit Relationships"
// @author       You
// @grant        none
// @include      http*://*musicbrainz.org/release/*/edit-relationships
//// ==/UserScript==

/* global $ */

$(document).ready(function(){
    $('#content>p:first-of-type').after('<p id="collapsibleEnabler"><a>Click here to enable collapsible media</a></p>');
    $('#collapsibleEnabler').click(function(){
        $('.subh td').each(function(){
            $(this).css("width", $(this).width());
        });
        $('#tracklist tr:not(.subh)').slideToggle();
        $('.subh  td:first-child').append('<span class="collapse-mark collapsed"><a>▶</a></span>');
        $('.subh').click(function(){
            $(this).nextUntil('tr.subh').slideToggle();
            $(this).children().find("span.collapse-mark").toggleClass('collapsed expanded');
            $(this).children().find("span.collapsed a").replaceWith('<a>▶</a>');
            $(this).children().find("span.expanded a").replaceWith('<a>▼</a>');
        });
        $('#collapsibleEnabler').hide();
    });
});

[edited: managed to get the user script to work]
[edited: fixed the issue of column width of media row changing when collapsing the tracks]
[edited: fixed the issue of batch-add button disappearing, and added :arrow_forward:/▼ marks to indicate collapsible status]

1 Like

Works like a charm, thank you!

You’re welcome! I wish all the other issues were that easy to fix!

Small improvement: I fixed the column width of the media row, which was changing when tracks were collapsed.

Tested. Works even better!

I was too fast. Unfortunately there is one problem which currently reduces usability of the script: when collapsible media are activated, the button to batch-add relationships disappear. Normally it is located just above the list of media.

That’s fixed. Just needed to be a bit more specific when hiding table rows!
And to make it pretty, I’ve added a marker to indicate whether the media is collapsed or not.

1 Like

Here is a small script to display track groups, using an analysis of track titles to identify the track groups titles.
It should work well for releases which follows the " Classical / Track / Title" guidelines.

It works best when credits are displayed at the bottom.

Userscript to display tracks groups
// ==UserScript==
// @name         MusicBrainz UI: Display Tracks Groups
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @include      http*://*musicbrainz.org/release/*
// @exclude      http*://*musicbrainz.org/release/add
// @exclude      http*://*musicbrainz.org/release/*/*
// @exclude      http*://*musicbrainz.org/release/*/*
// @grant        none
// ==/UserScript==

/* global $ */

$(document).ready(function(){
    $('div.annotation').after('<p id="tracksgroupsEnabler"><a>Click here to display Tracks Groups</a></p>');
    $('#tracksgroupsEnabler a').click(function(){
        $('#content .tbl.medium').each(function(){
            var trackGroupLevel = 0;
            var currentTrackGroupTitle = '';
            $(this).children().find('tr').not('.subh').each(function(){
                var trackTitle = $(this).children().find('.mp bdi').html();
                if (trackTitle !== undefined) {
                    var trackTitleSplit = trackTitle.match(/(.*?)\s*:\s*(.*)\s*/);
                    if (trackTitleSplit !== null) {
                        var [,trackGroupTitle, movementTitle] = trackTitleSplit;
                        if (trackGroupTitle !== currentTrackGroupTitle){
                            currentTrackGroupTitle = trackGroupTitle;
                            $(this).before("<tr style='background-color: #c8c8c8;'><td></td><td colspan='4'><strong>" + currentTrackGroupTitle + "</strong></td></tr>");
                        }
                        $(this).children().find('.mp bdi').html(movementTitle);
                    }
                }
            });
        });
        // $('#tracksgroupsEnabler').hide();
    });
});

It’s a rough script, to be tested. Let me know what you think about it.

1 Like

Sorry to bump this topic but I proposed a lighter approach to this feature:

It would be a simple visual header like we have already for the Data Tracks and being just a visual feature (like on Discogs), it would not need as much thinking and complexity as the full MBS-6680 experience.

image

The time freed by implementing a smaller feature could be then spent on Collection Highlighting MBS-3491. :stuck_out_tongue_winking_eye: