Fixes loading remote books

- saves remote_id correctly
- loads remote books for incoming statuses
This commit is contained in:
Mouse Reeve
2020-10-30 17:04:10 -07:00
parent 72219ace77
commit 203e526a83
8 changed files with 57 additions and 5 deletions

View File

@ -73,6 +73,14 @@ class Connector(AbstractConnector):
def get_remote_id_from_data(self, data):
try:
key = data['key']
except KeyError:
raise ConnectorException('Invalid book data')
return '%s/%s' % (self.books_url, key)
def is_work_data(self, data):
return bool(re.match(r'^[\/\w]+OL\d+W$', data['key']))