This PR supports a variety of changes to Media support, mostly having to do with embedded OBJE tag lines.
- Support v5.5.1 OBJE/FORM/MEDI tag on embedded OBJE
- Change OBJE/BLOB tag from "not understood" to "Recognized but not supported"
- Detect multiple FILEs in a single embedded OBJE >> v5.5.1 feature not supported
- Changed OBJE/FORM/TYPE to internationalize the data (same as SourceMediaType)
- Corrected XREF/OBJE/FORM to correctly save and use its value (was a typo in original code) and to accept any case.
- Added test for missing title on embedded OBJE, and use filename if missing.
- Added test for missing FILE on XREF style OBJE, with warning like the embedded OBJE.
- Support _PRIM tag to handle primary photo for Legacy Family Tree, Ancestral Quest, Family Origins, MyHeritage Family Tree Builder, and others.
- Some of these changes would have required making patches to six different nearly identical pieces of code. So I combined the similar methods and the two functions they called into a single function.
- Added function to check for a subordinate line with a specific tag, and report unexpected lines as not understood. Used that function in OBJE/REFN/TYPE and OBJE/_PRIM processing.
- Test files imp_FTM_PHOTO.ged and imp_MediaTest.ged have been updated to include testing on these changes.
Backport of some changes from master:
Minor textual changes:
GRAMPS > Gramps
place_displayer > _pd
__object_ > __media_
object_parse_tbl > media_parse_tbl
__find_object_handle > __find_media_handle
__find_or_create_object > __find_or_create_media
build_media_object > build_media
and a few pylint related spacing changes
Sorting of Sources bug9475
Change "class xxx(object)" to "class xxx"
Use "with open" instead of "try: except:"
change "raise NotImplemented" to "raise NotImplementedError()"
Original code used readline() when file was in binary mode; this works
only if file contains '\n', true only for CRLF and LF line endings.
Switched to file text mode with correct encoding and universal newline
support.