-
Notifications
You must be signed in to change notification settings - Fork 35
Restored and updated the api toggle + added a download option for poster images #183
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
Conversation
The settings screen where you can toggle each API per media type is now fully automatic and works for each media type that has more than 1 API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does look better, thanks :)
This reverts commit 98e96b1.
I reverted the earlier fix for "MALAPI Manga" with the space in it's name because it didn't work well, to ensure compatibility I think spaces shouldn't be allowed in API names. I've added a conversion from If you prefer me to try to make it work with the space instead I can try that again. Otherwise it should be fully functional now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some few more minor things.
- Replaced interpolated string to a new function getDisabledMediaTypes() - Added override for every API with the plugin settings for disabled media types - Added _disabledMediaTypes for API's even if they are the only provider of a media type - Replaced static apiMediaTypes to a dynamic version
Use MediaType[] instead of string[], changed variables to lowercase
I'm adding a small bug fix for an unrelated issue: #188 where pressing cancel still creates the selected media entry, please let me know if you'd prefer it as a separate PR. |
changed steam to a vertical poster to fit the other posters and upgraded the quality of omdb from SX300 to SX600
Plugin will no longer download a poster if it already exists, to avoid unnecessary downloads and in case the user has modified the saved image themselves
The new download option would close #150, it is toggleable and defaults to false so if users prefer keeping the url they don't have to change anything, if users want to download then they can enter a path and turn on the button Posters are saved as Users can also choose to embed the image in their note with this dataview: The poster resolution has been upgraded from a width of 300px to 600px and the steam posters are now vertical rather than horizontal to fit in with the rest of the posters. Edit: Users that turn on the toggle can simply reload the metadata for the note and it will download the image, no need to create a new note and copy it over. |
if (mediaTypeModel.image && typeof mediaTypeModel.image === 'string' && mediaTypeModel.image.startsWith('http')) { | ||
if (this.settings.imageDownload) { | ||
try { | ||
const imageurl = mediaTypeModel.image; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would extract this into a separate method.
Looks good, thanks :) |
This will allow users to choose which API to use per media type, speeding up the requests and also getting rid of missing API key errors by simply disabling that API if they're not interested in using it.
In this updated version the settings are now dynamically added rather than manually.
The API toggles are grouped per media type and look like this:
