mirror of
https://gitlab.sectorq.eu/jaydee/imported_video.git
synced 2025-12-14 10:34:53 +01:00
build
This commit is contained in:
@@ -95,6 +95,23 @@ def modify_creation_date(path,src_file):
|
||||
accessed = create_date["accessed"]
|
||||
)
|
||||
|
||||
def export_gps(_DEV,_SOURCE_DIR,_DAY_DIRS):
|
||||
for _DAY_DIR in _DAY_DIRS:
|
||||
if ops == "win":
|
||||
_FULL_PATH = _SOURCE_DIR + "\\" + _DEV + "\\" + _DAY_DIR + "\\"
|
||||
else:
|
||||
_FULL_PATH = _SOURCE_DIR + "/" + _DEV + "/" + _DAY_DIR + "/"
|
||||
for filename in os.listdir(_FULL_PATH):
|
||||
if _FILTER:
|
||||
if _PATERN in filename:
|
||||
pass
|
||||
else:
|
||||
continue
|
||||
if filename.endswith(".MP4") and not filename.startswith("G"):
|
||||
myCmd = f"gopro2gpx -s {filename} {filename.replace('.MP4', '')}"
|
||||
print(myCmd)
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
|
||||
def flip_videos(_DEV,_SOURCE_DIR,_DAY_DIRS):
|
||||
print("Flipping")
|
||||
for _DAY_DIR in _DAY_DIRS:
|
||||
@@ -417,4 +434,6 @@ if _ACTION == "all":
|
||||
flip_videos(_DEV, _SOURCE_DIR,_DAY_DIRS)
|
||||
join_videos(_DEV, _SOURCE_DIR,_DAY_DIRS)
|
||||
if _ACTION == "get_metadata":
|
||||
modify_creation_date("/media/nas/nas-photo/imported/gopro9_1/2025-06-02", "GH010256.MP4")
|
||||
modify_creation_date("/media/nas/nas-photo/imported/gopro9_1/2025-06-02", "GH010256.MP4")
|
||||
if _ACTION == "export_gps":
|
||||
export_gps(_DEV, _SOURCE_DIR,_DAY_DIRS)
|
||||
Reference in New Issue
Block a user