unknown
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!python3
|
||||
#!python
|
||||
|
||||
# set mtime for handbrake mp4 files from filename
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
from pathlib import Path
|
||||
import datetime as dt
|
||||
import piexif
|
||||
from collections import defaultdict
|
||||
import re
|
||||
import os
|
||||
|
||||
@@ -23,10 +21,10 @@ def rename(old, new):
|
||||
else:
|
||||
print(f"skipped {old.name}, {new.name}, already exists")
|
||||
|
||||
src = Path(r'D:\Videos')
|
||||
# src = Path(r'D:\Videos')
|
||||
|
||||
for raw in src.glob("*.m4v"):
|
||||
mo = re.match("(?P<author>[^-]*)-(?P<dt>\S*)-(?P<model>[^-]*)(-\S+)?.m4v", raw.name)
|
||||
for raw in src.glob("*.mp4"):
|
||||
mo = re.match("(?P<author>[^-]*)-(?P<dt>\S*)-(?P<model>[^-]*)(-\S+)?.mp4", raw.name)
|
||||
if mo is None:
|
||||
print(f"skipped {raw.name}, no match")
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user