We got some imports with a missing `url` field generating some errors while trying to retrieve an existing entry with that url.
Introducing the `validateEntry` allow us to dismiss a message when it doesn't have an url (or other missing stuff in the future)
Objects are always passed by reference, so it doesn't make sense to
return an object which is passed by reference as it will always be the
same object. This change makes the code a bit more readable.
Instead of just say “Failed to save entry” we’ll save the entry at all cost and try to fetch content. If fetching content failed, the entry will still be saved at least, but without content.
At the moment only Readability & wallabag v2 import allow created_at import.
Pocket removed `time_added` field from their API v2 to v3...
And wallabag v1 doesn't export that value.
Instead of queing real Entry to process, we queue all the item to import from Pocket in a raw format.
Then, the worker retrieve that information, find / create the entry and save it.
graby will throw an Exception in some case (like a bad url, a restricted url or a secured pdf).
Import doesn't handle that case and break the whole import.
With that commit the import isn't stopped but the entry is just skipped.
Also, as a bonus, I've added extra test on WallabagImportV2 when the json is empty.
- convert english translation to translate key
- remove baggy template for login (never used since user isn't logged in and it'll use the default theme: material)
- fix tests about text in response (now checking translation key instead of translated text)
- remove all ugly `<div class="hidden">{{ form_rest(form) }}</div>`
- list services in /import
- add url to import service
- ImportBundle routing are now prefixed by /import
- optimize flush in each import (flushing each 20 contents)
- improve design of each import
- add more tests
For the moment, we won't do a queue system, just a plain synchronous import.
We also use ContentProxy to grab content for each article from Pocket.
Error from Pocket are now logged using the logger.
The ImportInterface need to be simple and not related to oAuth (not all import will use that method).