-
Notifications
You must be signed in to change notification settings - Fork 19
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
Custom tags for first author name/asin #39
Comments
I'm not opposed to doing so. I have a few questions about how this would be implemented.
|
I'm pretty new to this, but from what I can tell there is only ever one author with an asin key/value pair in the list of authors dic. That's the case even if the audiobook has multiple authors. Maybe 'first author' isn't the right way to think about this. But either way -- I'm pretty sure this primary/first author always appears first in the list of authors dic. Perhaps you'll want to build in logic to check for existence of the author asin key/value (with a default of none), and not build that logic around the actual order of authors in the dic. That way, it won't matter if there is an edge case for primary/first authors appearing later in the list. I also don't think there's much value in creating custom tags for the other (second, third etc. authors). You won't get an associated asin value for those authors from the same audiobook api request. And like I said, I think the main benefit here is to get some proper logic to sort books/albums, which you can do with just the first/primary authors asin. I don't have a super large library but do already have some audiobooks with the same author name (but they're in-fact different authors). |
So perhaps primary author may be a better name for it. I understand what you mean now when you said that only one of the authors has an asin. Would you be interested in raising a PR? Otherwise, I can look at supporting this in a couple of weeks. |
Sure, there is start here. Haven't tested at all. But I can take a closer look next weekend. |
Sounds good. Btw, you may want to rebase off the latest main branch, as I've made some changes to support uploads to PyPI as well as pep8 compliant formatting. |
I'd see utility in creating a couple of custom tags to store the first/primary author's name and their asin. Similar to what is discussed here.
Shouldn't be a huge lift, as the authors dic returned by api.audnex.us actually includes an asin for the first author, even if the audiobook has multiple authors. Taking a quick look at the code, and the structure is also handled by the plugin parser. But doesn't seem like the data is stored anywhere.
Clearly, this doesn't conform to the standard set of tags. But creating a couple of custom tags (e.g. FIRSTAUTHOR and FIRSTAUTHORASIN) would allow paths to be structured as:
which feels like the right way to organize by unique authors to me.
Handy reference below for an authors dic on a multi-author title, which is returned via this request.
The text was updated successfully, but these errors were encountered: