Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ def extract_points(self) -> T.Sequence[geo.Point]:
return []

def extract_make(self) -> T.Optional[str]:
model = self.extract_model()
if model:
return "GoPro"

# make sure self.pointsFound is updated
_ = self.extract_points()
# If no points were found, assume this is not a GoPro
return "GoPro" if self.pointsFound else None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from ... import geo
from ...geotag import geotag_images_from_gpx_file
from .base_parser import BaseParser
from .generic_video_parser import GenericVideoParser


class GpxParser(BaseParser):
Expand All @@ -23,7 +24,9 @@ def extract_points(self) -> T.Sequence[geo.Point]:
return points

def extract_make(self) -> T.Optional[str]:
return None
parser = GenericVideoParser(self.videoPath, self.options, self.parserOptions)
return parser.extract_make()

def extract_model(self) -> T.Optional[str]:
return None
parser = GenericVideoParser(self.videoPath, self.options, self.parserOptions)
return parser.extract_model()
Loading