macr0dev / Audiobooks.bundle

Plex metadata scraper for Audiobooks
600 stars 65 forks source link

MetadataSearchResult modified to be more descriptive #59

Open twojciac opened 3 years ago

twojciac commented 3 years ago

Updated MetadataSearchResult to show the book title, author, and publishing year rather than just the title. This should improve the end user's ability to find the correct match rather than providing just the title which may have multiple results by various authors.

djdembeck commented 2 years ago

This would be super helpful!

jt196 commented 2 years ago

Agreed - at the moment you have to cycle through the choices. Narrator would be helpful as well.

jt196 commented 2 years ago

@twojciac just having a little play around with this code. The problem with how you've written it (or how the Audiobook metadata agent works) is that when you save the metadata, the descriptive title is saved instead of the book title. So you end up with the description string description = '\"%s\" by %s [%s]' % (r['title'], r['artist'], r['year']) instead of just r['title'] in the name of the book.

*EDIT: I think this may have been as I hadn't removed the original results.Append(MetadataSearchResult(... line, just testing it and it seems to work.

jt196 commented 2 years ago

Don't have time to faff around with pulling etc, but if you want to get the narrator to display you should replace the line:

info.append({'id': itemId, 'title': title, 'year': year, 'date': date, 'score': score, 'thumb': thumb, 'artist' : author}) with info.append({'id': itemId, 'title': title, 'year': year, 'date': date, 'score': score, 'thumb': thumb, 'artist' : author, 'narrator': narrator})

and the line: description = '\"%s\" by %s [%s]' % (r['title'], r['artist'], r['year']) with description = '\"%s\" by %s [%s] narr: %s' % (r['title'], r['artist'], r['year'], r['narrator'])

djdembeck commented 2 years ago

This feature has already been implemented in the re-written fork: https://github.com/seanap/Audiobooks.bundle

jt196 commented 2 years ago

Apologies, wasn't aware there was an active fork. Will chuck in a feature request then.

jt196 commented 2 years ago

@djdembeck added a new feature request and the appropriate code for the rewrite.