# MB Enhancements for classical music

**URL:** <https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114>\
**Category:** Classical\
**Tags:** ui, development\
**Created:** [January 21, 2020, 9:21pm UTC](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114 "2020-01-21T21:21:43Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Algwyn](https://community.metabrainz.org/user_avatar/community.metabrainz.org/algwyn/32/29242_2.png) [@Algwyn](https://community.metabrainz.org/u/Algwyn)\
**Post date:** [January 26, 2020, 2:07pm UTC](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114/21 "2020-01-26T14:07:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Algwyn](https://community.metabrainz.org/user_avatar/community.metabrainz.org/algwyn/32/29242_2.png) [@Algwyn](https://community.metabrainz.org/u/Algwyn)\
**Post date:** [January 27, 2020, 10:50pm UTC](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114/22 "2020-01-27T22:50:08Z")

</div>

> [@alex\_s7](#):
>
> Works like a charm, thank you!

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

---

<div class="post-metadata">

**Author:** ![alex\_s7](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/a/e79b87/32.png) [@alex\_s7](https://community.metabrainz.org/u/alex_s7)\
**Post date:** [January 28, 2020, 5:05pm UTC](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114/23 "2020-01-28T17:05:44Z")

</div>

> [@Algwyn](#):
>
> Small improvement: I fixed the column width of the media row

Tested. Works even better!

---

<div class="post-metadata">

**Author:** ![alex\_s7](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/a/e79b87/32.png) [@alex\_s7](https://community.metabrainz.org/u/alex_s7)\
**Post date:** [January 28, 2020, 7:47pm UTC](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114/24 "2020-01-28T19:47:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Algwyn](https://community.metabrainz.org/user_avatar/community.metabrainz.org/algwyn/32/29242_2.png) [@Algwyn](https://community.metabrainz.org/u/Algwyn)\
**Post date:** [January 28, 2020, 8:43pm UTC](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114/25 "2020-01-28T20:43:46Z")

</div>

> [@alex\_s7](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Algwyn](https://community.metabrainz.org/user_avatar/community.metabrainz.org/algwyn/32/29242_2.png) [@Algwyn](https://community.metabrainz.org/u/Algwyn)\
**Post date:** [January 30, 2020, 8:37am UTC](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114/26 "2020-01-30T08:37:46Z")

</div>

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](https://musicbrainz.org/doc/Style/Classical) / [Track](https://musicbrainz.org/doc/Style/Classical/Track) / [Title](https://musicbrainz.org/doc/Style/Classical/Track/Title)" guidelines.

> [@](#):
>
> When the release’s printed tracklist groups tracks that are part of a work together under a heading for the overall work title (with the printed track titles being movement or part titles), then add the overall work title (as listed in the heading) to all tracks from the work, separated with a colon.

It works best when credits are displayed at the bottom.

> **Userscript to display tracks groups**
>
> ```auto
> // ==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.

---

<div class="post-metadata">

**Author:** ![jesus2099](https://community.metabrainz.org/user_avatar/community.metabrainz.org/jesus2099/32/36_2.png) [@jesus2099](https://community.metabrainz.org/u/jesus2099)\
**Post date:** [November 18, 2020, 11:23pm UTC](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114/27 "2020-11-18T23:23:08Z")

</div>

> [@Algwyn](#):
>
> > [@highstrung](#):
> >
> > For grouping tracks, there is an existing ticket [MBS-6680](https://tickets.metabrainz.org/browse/MBS-6680) .
> 
> Thanks also to point out this ticket. It has been opened since 2012! Let’s vote on it to increase its priority.

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

> <https://tickets.metabrainz.org/browse/MBS-11236>

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](https://community.metabrainz.org/uploads/default/original/3X/9/0/900b668d6232178d20611108374750d0056c538b.png)](https://tickets.metabrainz.org/browse/MBS-11236)

The time freed by implementing a smaller feature could be then spent on Collection Highlighting [MBS-3491](https://tickets.metabrainz.org/browse/MBS-3491). 😜

[Previous page](https://community.metabrainz.org/t/mb-enhancements-for-classical-music/460114.md?page=1)
