Why does "My Collection" not sort correctly?

If I go to “My Data” and then “My Collection” I can look my the various collections of music. A nice feature.

It is also really nice that I can click on the column headers to change the sort order.

QUESTION: Why is is when I click on the ARTIST column to sort by Artist it doesn’t sort correctly? Why is “The Beatles” under “T”?

Would be nice if that list could use the Sort Order from the MB database to get that correct. :wink:

2 Likes

if it is just The Beatles then it could be that the album artist is The Beatles and not Beatles The

Collection sorting is an embarrassment.

2 Likes

The problem is they’re sorted by artist credit, and artist credits don’t have sortnames.

We could probably sort by a combination of sortnames of all artists in the credit. That would mean the actual credited name is ignored though (so, all releases by “Puff Daddy”, “P. Diddy” and “Diddy” would all sort under “Diddy”). That doesn’t sound good to me (since it wouldn’t sort stuff where I’d expect it), but it might be good for some people.

3 Likes

Ah… one of those lost tickets.

Not sure I understand what you mean @reosarevok . What are “Artist Credits”? They still link to the same Artist name that is in the MB Database. So why can’t it do a lookup on that and pull the Artist Sort order out?

Surely there are not many example of people like Diddy who changes his name every few days? Personally on my shelf I would still put all his works together. Bit like with Pink Floyd - The Screaming Abdabs would be sitting next to the Pink Floyd albums.

And insn’t the example in the 2011 ticket about “The Beatles and Pink Floyd” not exist now? That would be two artists and the natural sort would place that under B for Beatles?

But I do understand that this is one of those “lost ticket requests” due to there being too many possible ways of getting a solution. I’ll drop the question. :wink:

So, a different question can replace this. Is there an “export collection to CSV” script anywhere? I can just about do what I need by copy \ pasting the web page and dropping it into a spread sheet. From that I can then create my own sort order. Just be more elegant if there is a proper tool for that.

And yes, I am trying to avoid having to learn Javascript and all that jazz just to grab a list that no doubt other people also make use of.

I’d like it better if we could customize the Collections list. We should be able to swap out columns so I could replace the artist credit column with the artist sort name column and you could keep it if you like.

The main thing I don’t like about the Collections page is it’s not “databasey” enough.

1 Like

Artist credits as in the artists credited for the release :slight_smile: In a collection of artists it would be trivial to sort by sort name (we don’t do it even there, if I’m honest, BUT it would be trivial to do so - maybe something I should look into!).

In a collection of releases, it’s less trivial, because of the credits. In fact, often it’s not even doable in any reasonable way. For classical music, for example, it would sort - whether with sortname or name - just by the name of the first composer on the cover, which might not even be particularly useful. For “The Beatles and Pink Floyd” it would sort under “Beatles, The”, which is probably what you want if you have it as part of your Beatles album collection, and not what you want if you have it as part of your Pink Floyd albums collection. A possible option would be to show it repeatedly, so it would show under the sort name for every artist in the credit, but that might be even more confusing :confused:

3 Likes

Ah… of course… I’ve noticed that kills many things around here. It works in such a different way that I can see why that would cause too much bickering.

I really was just after the very simple simple simple here. I mistakenly thought that as the column was sortable it could be expanded into something more useful via one database lookup. But I can see that any attempt at implementing that would lead to lots of people picking on the dev about how it didn’t exactly fit their exact needs…

Please lets pretend I never asked. :wink:

I’ll just stick with copy\pasting the page until I get around to learning how the API works and write something myself.

I mean, even the simplest “use the sort name for the first artist” probably wouldn’t make it worse than it is now, so we might still do that at some point :slight_smile:

You can do a search such as this one for my artist collection, if that’s of any use? :slight_smile: (you’d probably want release instead of artist since I imagine you want a release collection, I just don’t have those). That might actually be less useful than the website itself for copying-and-pasting as CSV though!

You could add a ticket to export a collection to CSV - I can see how that would be useful. No promises it’d get done anytime soon, but at least the interest would be somewhere we might find it in the future :slight_smile:

4 Likes

This is all I was looking at with this thread. Just one tiny little step from where we are now… A sneaky little step forward without the whole lot coming crashing down when large time consuming redesigns are then asked for and everything turns into a punch-up because the quiet majority actually likes seeing “The Beatles” under “T”. :rofl:

And I am a proper awkward bugger if I was asked what I really wanted. On my shelf “Tori Amos” is under “A” and “The Beatles” is under “B”. Classical gets its own shelf. With Audiobooks and Plays tucked on the end. How dare anyone else suggest there is any other way?

I’ll have a look at that later. It may give me a seed towards what I need. I’m used to hacking around other people’s code so I’ll see what I can create with items like this.

Or just keep to my copy\pasta solution from the current collections page… As mentioned on another thread, I like the KISS solution.

I landed on this thread because I needed to export my collection to CSV badly… and then I wrote this script for python 3.8.2 which does exactly this, and exports tables from any url for that matter. pip install bs4 and pip install requests before running it

import requests

import csv

from bs4 import BeautifulSoup as bs

link = input("Tables from URL will be converted to CSV files. Type or paste URL: ")

url = requests.get(link)

soup = bs(url.content, 'html.parser')
    
filename = input("Progressive suffixes to filenames will be generated for multiple tables on same page. CSV extension will be appended.  Save as: ")

pid = 1

for table in soup.find_all('table'):
    csvOut = open(filename + str(pid) + '.csv','w',encoding="utf-8",newline='')
    csv_write = csv.writer(csvOut)

    for tr in table.find_all('tr'):
        data = []
        
        for th in tr.find_all('th'):
            data.append(th.text.strip())
            
        if data:
            print("Inserting headers: {}".format(','.join(data)))
            csv_write.writerow(data)
            continue
        
        for td in tr.find_all('td'):
            data.append(td.text.strip())
            
        if data:
            print("Inserting data: {}".format(','.join(data)))
            csv_write.writerow(data)

    csvOut.close()
    pid = pid + 1