mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'fix_tolino_mimetype' of https://github.com/beedaddy/calibre
This commit is contained in:
commit
3d092909d6
@ -716,7 +716,7 @@ class KOBO(USBMS):
|
|||||||
# for calibre's reference
|
# for calibre's reference
|
||||||
path = self._main_prefix + path + '.kobo'
|
path = self._main_prefix + path + '.kobo'
|
||||||
# print "Path: " + path
|
# print "Path: " + path
|
||||||
elif (ContentType == "6" or ContentType == "10") and MimeType == 'application/x-kobo-epub+zip':
|
elif (ContentType == "6" or ContentType == "10") and (MimeType == 'application/x-kobo-epub+zip' or (MimeType == 'application/epub+zip' and self.isTolinoDevice())):
|
||||||
if path.startswith("file:///mnt/onboard/"):
|
if path.startswith("file:///mnt/onboard/"):
|
||||||
path = self._main_prefix + path.replace("file:///mnt/onboard/", '')
|
path = self._main_prefix + path.replace("file:///mnt/onboard/", '')
|
||||||
else:
|
else:
|
||||||
@ -2173,7 +2173,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
def path_from_contentid(self, ContentID, ContentType, MimeType, oncard, externalId=None):
|
def path_from_contentid(self, ContentID, ContentType, MimeType, oncard, externalId=None):
|
||||||
path = ContentID
|
path = ContentID
|
||||||
|
|
||||||
if not (externalId or MimeType == 'application/octet-stream'):
|
if not (externalId or MimeType == 'application/octet-stream' or (self.isTolinoDevice() and MimeType == 'audio/mpeg')):
|
||||||
return super().path_from_contentid(ContentID, ContentType, MimeType, oncard)
|
return super().path_from_contentid(ContentID, ContentType, MimeType, oncard)
|
||||||
|
|
||||||
if oncard == 'cardb':
|
if oncard == 'cardb':
|
||||||
@ -2182,6 +2182,8 @@ class KOBOTOUCH(KOBO):
|
|||||||
if (ContentType == "6" or ContentType == "10"):
|
if (ContentType == "6" or ContentType == "10"):
|
||||||
if (MimeType == 'application/octet-stream'): # Audiobooks purchased from Kobo are in a different location.
|
if (MimeType == 'application/octet-stream'): # Audiobooks purchased from Kobo are in a different location.
|
||||||
path = self._main_prefix + KOBO_ROOT_DIR_NAME + '/audiobook/' + path
|
path = self._main_prefix + KOBO_ROOT_DIR_NAME + '/audiobook/' + path
|
||||||
|
elif (MimeType == 'audio/mpeg' and self.isTolinoDevice()):
|
||||||
|
path = self._main_prefix + KOBO_ROOT_DIR_NAME + '/audiobook/' + path
|
||||||
elif path.startswith("file:///mnt/onboard/"):
|
elif path.startswith("file:///mnt/onboard/"):
|
||||||
path = self._main_prefix + path.replace("file:///mnt/onboard/", '')
|
path = self._main_prefix + path.replace("file:///mnt/onboard/", '')
|
||||||
elif path.startswith("file:///mnt/sd/"):
|
elif path.startswith("file:///mnt/sd/"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user