anansi-project / comicinfo

ComicInfo.xml's new home
https://anansi-project.github.io/docs/category/comicinfo
MIT License
136 stars 8 forks source link

New element: SeriesSort #4

Open gotson opened 2 years ago

gotson commented 2 years ago

Where does this comes from?

Discussions on Mylar's Discord.

What is the rationale for adding support for this element?

The current Title Series cannot provide a proper sort order for series with a leading article. In English language those would be A, An, or The.

Having this field would remove may potential guess work in the consuming applications. The different languages of the publications also make the task harder, as each and every language has different rules for handling articles.

Is the element already handled by any application or tool?

No, but Mylar already computes a sortname by removing The from the series name.

Komga already has a field for sort title too, and could import this if it exists.

gotson commented 2 years ago

@majora2007 what do you think about this one? Does Kavita has a sort title field?

majora2007 commented 2 years ago

We do, I will add support for this as well. Feel free to merge it.

majora2007 commented 2 years ago

How does this work? Does it apply only to individual issues or does it aggregate up to the Series if they are all the same?

gotson commented 2 years ago

How does this work? Does it apply only to individual issues or does it aggregate up to the Series if they are all the same?

This is related to the existing Title Series element, which represents the name of the series.

What Komga does at the moment is this:

The Series and Volume tags will be used to overwrite the title of the Series, in the form <Series> (<Volume>), or just <Series> if the Volume tag is not present or if the Volume is 1. If multiple values are present, the most frequent value from all books will be used.

But of course it depends on the consuming application's data model. Komga doesn't store the series name at book level, but only at the upper level (the series object). Other applications could deal with this differently.

I would suggest that consuming applications should treat this in the same way they treat the Title Series element.

gotson commented 2 years ago

@evilhero is that something that could make its way in mylar? Since you already have a sort name without the?

lordwelch commented 2 years ago

I think it might be better to make this an attribute and not specifically an element as it allows better grouping especially if localized titles #6 is added. Side note Batman in most languages is still Batman also I could not find a series actually called "The Batman"

<Series>The Batman</Series>
<TitleSort>Batman</TitleSort>
<LocalizedTitle>The Batman</LocalizedTitle>
<LocalizedTitleScript>English</LocalizedTitleScript>

vs

<Series lang="eng" sort="Batman">The Batman</Series>
gotson commented 2 years ago

I think it might be better to make this an attribute and not specifically an element as it allows better grouping especially if localized titles #6 is added. Side note Batman in most languages is still Batman also I could not find a series actually called "The Batman"

<Series>The Batman</Series>
<TitleSort>Batman</TitleSort>
<LocalizedTitle>The Batman</LocalizedTitle>
<LocalizedTitleScript>English</LocalizedTitleScript>

vs

<Series lang="eng" sort="Batman">The Batman</Series>

You made me realize the big mistake I made, this whole thing is about the series name, not the book name, so it should be SeriesSort and not TitleSort !

I like your idea about using attributes, but on the other hand we are also trying to keep the schema in the same spirit as the existing one, in order not to have too many different ways of doing things depending on the elements.

majora2007 commented 2 years ago

Just following up on this, are we good to go ahead with SeriesSort tag? I want to implement support in Kavita.

gotson commented 2 years ago

Just following up on this, are we good to go ahead with SeriesSort tag? I want to implement support in Kavita.

there's no planned support for providers yet, so that would be for manual editing?

majora2007 commented 2 years ago

Yeah, I know many of my users are manually editing their metadata when ComicVine doesn't have it or MangaTagger. I have support to read the tag already in Kavita. We have a user tool, like comic-tagger, that writes the field out already.

gotson commented 2 years ago

Can you share the exact spec of this new tag you read and write already? A few forms have been mentioned above.

And what's the tool already writing it?

majora2007 commented 2 years ago

I'm reading it exactly as Series works, so: `

Adventure Time

via

`

The tool that is writing it is Manga-Manager: https://github.com/ThePromidius/Manga-Manager/releases/tag/v0.4.1

(I'm not sure if the release has it, as the developer is in our discord and building it alongside community needs)

The reason why I would like it in the spec is that I have added support based on above conversation and I want to eventually allow metadata to be saved in the file (from our DB). I also have many users asking for something along the lines of this, so that they can have "The Batman" sort as "Batman".

gotson commented 2 years ago

I'm in favor of this. Do you want to send a PR with the changes, and we can approve on that?