griff / metaz

Two letters better than MetaX
https://metaz.maven-group.org/
MIT License
411 stars 56 forks source link

Rewritten versions of search plugins #229

Closed griff closed 4 years ago

griff commented 4 years ago

This contains new versions of TheTVDB and The Movie DB plugins rewritten in Swift and using URLSession.

The new TheTVDB plugin also uses the newer version 3 of their API since the one we were using before has been sorta deprecated and has more downtime.

When rewriting The Movie DB plugin I also added support for fetching metadata about TV shows to the plugin.

I decided to keep the old versions of the plugins around since these new plugins are built completely from scratch and so may have bugs not found in the old versions.

I have also included fixed for default sorting of the files list (#207) and a bug in the posters code that would store a NSStateMarker in MetaEdits when a search result had an empty images array (#96 / #79)

@jmcintyre I have created this as a PR and put you as the reviewer in case you want to have a look at it or if clashes with what you are doing before going ahead and releasing it into the wild.

griff commented 4 years ago

@jmcintyre If you don't have any comments or hangups for this you can just press the merge button when you see this.

jmcintyre commented 4 years ago

The bundle id for atomic parsley no longer matches the bindle id searched for in AtomicParsleyPlugin.mm. This is causing me crashes until I make them match. After that, it seemed to work. Unfortunately I don't have any more time this evening to test deeper. I'll try to do so in the morning.

jmcintyre commented 4 years ago

I did have a couple more minutes and found something else. In the past, when you double click on a result in the search list, it both fills the data into the fields in the UI and checks the save checkboxes. Currently, it only fills in the fields (no checking the boxes).

griff commented 4 years ago

@jmcintyre I have pushed new changes that fixes the code in AtomicParsleyPlugin.m by using the class to find the bundle instead of using the identifier.

As for the double clicking (Apply Results) it only works after posters are loaded (and that is not something I believe I have changed). There was some bugs in the poster code that I have tried to fix but that was regarding when the posters array is empty.

But since posters haven't worked for TheTVDB for some time until now you might not have noticed that double clicking only works after the poster is loaded. Or maybe the new image loader is slower than the old one (since it doesn't cancel unneeded image loads) and that is why you are seeing the problem.

griff commented 4 years ago

@jmcintyre I did some double checking and the image loading was slowed down by it not supporting cancel of images from old search results. So I went back and implemented a cancel using a weak reference so that if the RemoteData object has been deallocated before the async DispatchQueue gets to that item it simply exits without loading the actual data.

jmcintyre commented 4 years ago

Looks good