Add an option for simplifying series titles #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I use this bundle in combination with Kometa for generating collections from my series, and I noticed an issue recently. For some reason, some books are getting tagged with "<series title> Series" while others are getting tagged with just "<series title>". This generally wouldn't matter as long as every book within a series gets tagged with the same value (all just series title or all series title series). However, I've found that in a few cases, sometimes books within the same series are getting tagged with both formats.
For example, for the series Solo Leveling, books 1-5 are getting tagged with "Series: Solo Leveling" while books 6-8 are getting tagged with "Series: Solo Leveling Series":
I found the same thing happening with one book in "The Beginning After the End"
This is probably just an issue with Audible's tagging themselves, but I figured that an easy solution to this problem would just be to universally trim " Series" from the end of series titles. It really doesn't add any value to the name of the series, and by removing it, we can be more consistent with how books are tagged.
However, I didn't want to force this option on anyone, so I figured it would be a valid use case for a new preference in the agent settings:
I wasn't sure where the best place would be to put this logic (API response parsing from Audnexus, or inside the
add_series_to_moods
function or something like that), so I just added it to the API response parsing, as that should cover it in all use cases (moods + sort title). But let me know if you think it's not placed well.And in general, let me know if this is a setting you think makes sense for this project! I'm using it in my local instance of the bundle either way, I just figured this could help other people.