bdbenim / stash-empornium

A userscript and backend server to help with uploading to EMP.
The Unlicense
10 stars 4 forks source link

Mod: Making release titles more compatible to parsing #49

Closed dsrtusr88 closed 11 months ago

dsrtusr88 commented 11 months ago

The default title_default = [{studio}] {performers} - {title} ({date})[{resolution}] is a fairly non-standard release title format. Would like to propose a few tweaks.

New config option: replace spaces with periods = false|true

New config variables: titleslug (Site Title's becomes SiteTitles 2ddate (2023-10-14 becomes 23.10.14)

Change config option title_default = {titleslug} {2ddate} {title} {performers} {codec} {resolution} remove commas between multiple performers [Blender Institute] Big Buck Bunny, Frank, Rinky, Gimera - Big Buck Bunny (2008-05-10)[1080p] becomes BlenderInstitute.08.05.10.Big.Buck.Bunny.Big.Buck.Bunny.Frank.Rinky.Gimera.x264.1080p

bdbenim commented 11 months ago

I haven't seen this format much personally, but I don't see why it can't be added. Ideally if we're going to add this, I'd like to find a way to extend it in an even more generic/customizable way to support any release title format the user may desire.

I suspect that the title_default could be modified to use jinja templating, and with some tweaks to the variables that are supplied (maybe not even necessary) the user should have a lot more control over how the title string is formatted. The current code just uses basic python format strings which are pretty limited, but jinja (which comes with Flask and is used by the presentation templates already) is extremely powerful by comparison by making loops, if statements, and other string manipulation functions available directly to the user.

preshow6237 commented 11 months ago

It's good to have flexibility in the title format for sure. But I don't think that what you're proposing specifically has any value.

It doesn't follow scene rules (or any other convention) around xxx naming (not that the majority of what's uploaded is scene). It also reduces readability, and is outside of usual (informal) emp conventions around titling. I think that if this is implemented, it should be either as a generic "oh you can configure the title format" kinda way, or something that's specifically following a defined "standard". The issue with a "standard" is that there's not very many of them in the 3x world.

I've talked with thezak48 before, who is one of the developers for whisparr and he laments much of how unparseable emp content is because of the choice of titling formats. I think it'd be important to seek opinions from tool creators, and more knowledgeable folk before including any "stock" naming options.

As a side note, I despise any suggestion to alter the date format from yyyy-mm-dd, they're impossible to determine whether it's mm-dd-yy, dd-mm-yy, yy-mm-dd, or yy-dd-mm.