def add_photos_by_uri(self, uris): log.debug('Adding photos by uri') l = windows_check() and 8 or 7 filenames = [urllib.url2pathname(uri[l:]) for uri in uris if \ uri.startswith('file://')] self.add_photos(filenames)
def add_photo_by_uri(self, uri): if uri.startswith('file://'): l = windows_check() and 8 or 7 self.add_photo(urllib.url2pathname(uri[l:]))