Beispiel #1
0
 def __init__(self, storage_id, lpath, other=None):
     Metadata.__init__(self, _('Unknown'), other=other)
     self.storage_id, self.lpath = storage_id, lpath
     self.lpath = self.path = self.lpath.replace(os.sep, '/')
     self.mtp_relpath = tuple([icu_lower(x) for x in self.lpath.split('/')])
     self.datetime = utcnow().timetuple()
     self.thumbail = None
Beispiel #2
0
 def __init__(self, storage_id, lpath, other=None):
     Metadata.__init__(self, _('Unknown'), other=other)
     self.storage_id, self.lpath = storage_id, lpath
     self.lpath = self.path = self.lpath.replace(os.sep, '/')
     self.mtp_relpath = tuple([icu_lower(x) for x in self.lpath.split('/')])
     self.datetime = utcnow().timetuple()
     self.thumbail = None
Beispiel #3
0
    def __init__(self):
        Metadata.__init__(self, '')
        self._new_book = False

        self.size = 0
        self.datetime = time.gmtime()
        self.path = ''  #the quitthyme book storage_id
        self.thumbnail = None

        self.quietthyme_id = -1
Beispiel #4
0
    def __init__(self):
        Metadata.__init__(self, '')

        self._new_book = False

        self.size = 0
        self.datetime = time.gmtime()
        self.path = '' #the quitthyme book storage_id
        self.thumbnail = None

        self.quietthyme_id = -1
Beispiel #5
0
    def __init__(self, prefix, lpath, size=None, other=None):
        from calibre.ebooks.metadata.meta import path_to_ext

        Metadata.__init__(self, '')

        self._new_book = False
        self.device_collections = []
        self.path = os.path.join(prefix, lpath)
        if os.sep == '\\':
            self.path = self.path.replace('/', '\\')
            self.lpath = lpath.replace('\\', '/')
        else:
            self.lpath = lpath
        self.mime = mime_type_ext(path_to_ext(lpath))
        self.size = size  # will be set later if None
        try:
            self.datetime = time.gmtime(os.path.getctime(self.path))
        except:
            self.datetime = time.gmtime()
        if other:
            self.smart_update(other)
Beispiel #6
0
    def __init__(self, prefix, lpath, size=None, other=None):
        from calibre.ebooks.metadata.meta import path_to_ext

        Metadata.__init__(self, '')

        self._new_book = False
        self.device_collections = []
        self.path = os.path.join(prefix, lpath)
        if os.sep == '\\':
            self.path = self.path.replace('/', '\\')
            self.lpath = lpath.replace('\\', '/')
        else:
            self.lpath = lpath
        self.mime = mime_type_ext(path_to_ext(lpath))
        self.size = size  # will be set later if None
        try:
            self.datetime = time.gmtime(os.path.getctime(self.path))
        except:
            self.datetime = time.gmtime()
        if other:
            self.smart_update(other)
 def __init__(self, title, author):
     if type(author) is list:
         Metadata.__init__(self, title, authors=author)
     else:
         Metadata.__init__(self, title, authors=[author])
 def __init__(self, title, author):
     Metadata.__init__(self, title, authors=[author])
Beispiel #9
0
 def __init__(self, title, author):
     if type(author) is list:
         Metadata.__init__(self, title, authors=author)
     else:
         Metadata.__init__(self, title, authors=[author])