-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart Truncating #10
Comments
@runecalico Feel free to pitch in here if you have any ideas on how to do this in reliable way |
My thoughts are that, in theory, my requirements if I was using the TagSystem are the following:
The big problem to me isn't entirely the "is it greater then 240", but that we want to try various permutations on the BasePath and/or PathName until it is less then 240. it has been a long time since I last changed my tagging configuration .. but I suspect that integer comparisons are not currently supported by the tagging system, which might make it difficult to do something like "is the final path greater then 240", unless you add a built-in tag, that evaluates the PathName/FileName value every time it's invoked and returns a true/false that could be used in the current tagging which does have a ternary operator. Something like this (This probably would still need tweaking)
I'll do some testing to see if it's possible to do this right now, which if works would still likely be cumbersome. |
Well .. it can be done using the current Tagging System .. but it is ugly, cumbersome, not intuitive and kinda limited (but does work)
|
I verified this works using episodes from |
yeah, using the tagging system is a possibility, but kinda annoying and everyone has to do it themselves. I guess adding your changes to the default tagging system (and also giving users the hint to add these parts to it) might be the easiest and most consistent way to solve this Your changes would also work identically in my tagging system as mine is very similar to yours (apart from the seperate path for english things) |
Perhaps something more "automatic" for those not using the tagging system? As anyone not using the tagging system is implicitly accepting whatever default naming scheme aniAdd is going to create, so having a cascading decision tree from longest to shortest to avoid truncation would be fine. Whereas those using the tagging system .. are on their own .. but then anyone using the tagging system is likely very opinionated on what they want for names of both the files and directories :) |
I'll have to modify the tagging I included here as I found a new stupidly long anime name to play with "The Misfit of Demon King Academy History's Strongest Demon King Reincarnates and Goes to School with His Descendants II (2024)" I barely have enough length to even write the episode # and file info (I'm a big fan of the file info, as i do further pruning/sorting on that) |
oh wow, that name is a mouthful 🤣
or something, this way you could ensure consistent episode/show name length (that is, all episodes of the same series have the same prefix) and also ensure that the path length is a maximum of "whatever-you-need" |
This is the current way to do that (not exactly simple, or easy to understand)
|
wow, if you didn't name the functions |
I do not feel strongly about the names .. |
When the full path of the renamed file is > 240 characters the filename currently get's truncated in order to fit that limit.
In some cases this can lead to the episode number being removed from the filename (which results in all episodes of the same series with which that happens to have the same name). this completely defeats the purpose of this tools.
Ideas for solution:
Support a new result-tag in the tagsystem (e.g.
FinalEpisodeNumber
) which, if set by the tagsystem, will be used to make sure to always keep that part in the resulting filename. It's also has to be made sure that if we truncate the anime name (in an episode), that all episodes get truncated the same way. This will be very difficult to do.Last point could be fixed by Implementing a max length for anime names (foldername/part of the filename before episode number) so that the chance of this happening is a lot lower.
The text was updated successfully, but these errors were encountered: