Skip to content

Conversation

@Guarde
Copy link

@Guarde Guarde commented Dec 9, 2023

This has been bothing me for way too long so I decided to change it

@WWRS
Copy link
Collaborator

WWRS commented Dec 9, 2023

What's the rationale behind making it mandatory? It should still be fine to auto-generate, right?

@Guarde
Copy link
Author

Guarde commented Dec 9, 2023

The reason is that while they are used in the backend for the most part, they should still be related to the chart for readability.
Additionally they are used for file or folder names in some cases so TootBender is only accepting trackrefs that are 64 characters or less and only contain A-z, 1-9, -, _ and whitespaces

@WWRS
Copy link
Collaborator

WWRS commented Dec 9, 2023

Are there issues if the trackref is nonunique? (E.g. if two charts are made for Adele - Hello and both are called hello.) Should there be an indicator on the page about this?

@Guarde
Copy link
Author

Guarde commented Dec 10, 2023

Yeah, if there's 2 charts with the same trackRef, TrombLoader will only load one of them.
Not sure you need to make a page for that ho

@WWRS
Copy link
Collaborator

WWRS commented Dec 10, 2023

In that case, I think I would still prefer the trackRef to be automatically generated unless the user types something in. This basically guarantees we'll never have a situation where two charts just can't be loaded at the same time.

I may still not entirely understand what the readability concern is. Who needs to read this and why? What would be the benefit to the reader to be able to understand what the trackRef means?

@Guarde
Copy link
Author

Guarde commented Dec 10, 2023

Having duplicates will not be a concern since the bot checks the trackRef of an uploaded track against all existing charts and rejects it if the trackRef already exists.
And readability is just a nice thing to have to be honest.
It's good to know which trackRef corresponds to which chart without having to look it up.
Especially since some mods, including TrombLoader refer to songs via their trackRef

[Debug :TrombLoader] Found custom chart: 0.896035540881212

@WWRS
Copy link
Collaborator

WWRS commented Dec 10, 2023

How would you feel about doing something like randomnumber_customname? Off the top of my head, I know Osu does a similar thing: uid - song name.

In this case, we most likely would be adding a checkbox for whether to prefix with a random number.

@Guarde
Copy link
Author

Guarde commented Dec 10, 2023

Sure, that would work!
Seems needlessly complicated tho.
I don't see an issue with just entering a trackref tbh

@Guarde
Copy link
Author

Guarde commented Dec 10, 2023

If you wanna go all the way to make it convenient tho, you could generate a trackref from the song title (or short name) they entered
just make sure to only include A-Z, 0-9, _ , - and spaces

@WWRS WWRS merged commit 1f738e8 into TC-Chart-Converter:main Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants