Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Calibre plugins for [CrossPoint Reader](https://github.com/crosspoint-reader).

### CrossPoint Reader

A wireless device plugin that uploads EPUB files to CrossPoint Reader over WebSocket. The plugin auto-discovers devices on the local network via UDP broadcast.
A wireless device plugin that uploads EPUB and XTC files to CrossPoint Reader over WebSocket. The plugin auto-discovers devices on the local network via UDP broadcast.

See [crosspoint_reader/README.md](crosspoint_reader/README.md) for protocol details and configuration.

Expand Down
Binary file removed crosspoint_reader-v0.1.1.zip
Binary file not shown.
Binary file added crosspoint_reader-v0.1.5.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion crosspoint_reader/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CrossPoint Reader Calibre Plugin

This plugin adds CrossPoint Reader as a wireless device in Calibre. It uploads
EPUB files over WebSocket to the CrossPoint web server.
EPUB and XTC files over WebSocket to the CrossPoint web server.

Protocol:
- Connect to ws://<host>:<port>/
Expand Down
10 changes: 5 additions & 5 deletions crosspoint_reader/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class CrossPointDevice(DeviceConfig, DevicePlugin):
description = 'CrossPoint Reader wireless device'
supported_platforms = ['windows', 'osx', 'linux']
author = 'CrossPoint Reader'
version = (0, 1, 4)
version = (0, 1, 5)

# Invalid USB vendor info to avoid USB scans matching.
VENDOR_ID = [0xFFFF]
PRODUCT_ID = [0xFFFF]
BCD = [0xFFFF]

FORMATS = ['epub']
ALL_FORMATS = ['epub']
FORMATS = ['epub', 'xtc']
ALL_FORMATS = ['epub', 'xtc']
SUPPORTS_SUB_DIRS = True
MUST_READ_METADATA = False
MANAGES_DEVICE_PRESENCE = True
Expand Down Expand Up @@ -151,7 +151,7 @@ def save_settings(self, config_widget):
config_widget.save()

def _list_files_recursive(self, path='/'):
"""Return a flat list of (lpath, size) for all EPUB files on device."""
"""Return a flat list of (lpath, size) for all EPUB and XTC files on device."""
results = []
try:
entries = self._http_get_json('/api/files', params={'path': path})
Expand All @@ -168,7 +168,7 @@ def _list_files_recursive(self, path='/'):
entry_path = path + '/' + name
if entry.get('isDirectory'):
results.extend(self._list_files_recursive(entry_path))
elif entry.get('isEpub'):
elif entry.get('isEpub') or entry.get('isXTC'):
results.append((entry_path, entry.get('size', 0)))
return results

Expand Down