0003553: Import media files from GEDCOM (part fix). 0005456: Default log level after installation results in disk being filled on import (part fix). Don't give error messages if the imported media file is an http URL (instead of a local file). Note that the double slash in 'http://" is still stored as a single slash.
svn: r18862
This commit is contained in:
parent
7e3415accb
commit
5800f46518
@ -6638,10 +6638,15 @@ class GedcomParser(UpdateCallback):
|
||||
url.set_type(gen.lib.UrlType.WEB_HOME)
|
||||
obj.add_url(url)
|
||||
else:
|
||||
(valid, path) = self.__find_file(filename, self.dir_path)
|
||||
if not valid:
|
||||
self.__add_msg(_("Could not import %s") % filename)
|
||||
path = filename.replace('\\', os.path.sep)
|
||||
# to allow import of references to URLs (especially for import from
|
||||
# geni.com), do not try to find the files if they are blatently URLs
|
||||
if filename[0:7] == "http://" or filename[0:8] == "https://":
|
||||
path = filename
|
||||
else:
|
||||
(valid, path) = self.__find_file(filename, self.dir_path)
|
||||
if not valid:
|
||||
self.__add_msg(_("Could not import %s") % filename)
|
||||
path = filename.replace('\\', os.path.sep)
|
||||
photo_handle = self.media_map.get(path)
|
||||
if photo_handle is None:
|
||||
photo = gen.lib.MediaObject()
|
||||
|
Loading…
Reference in New Issue
Block a user