File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- DEFAULT_BASE = ""
1
+ DEFAULT_BASE = None
2
2
DEFAULT_SKIP = False
3
3
DEFAULT_OUTPUT = None
4
4
DEFAULT_FORMAT = "vtt"
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ def format_time(secs):
119
119
return ("0%s.000" % delta )[:12 ]
120
120
121
121
metadata = ["WEBVTT\n \n " ]
122
- prefix = self .base or os .path .relpath (self .thumbnail_dir )
122
+ prefix = self .base if self . base is not None else os .path .relpath (self .thumbnail_dir )
123
123
route = os .path .join (prefix , extract_name (self .filepath ) + ".png" )
124
124
route = pathlib .Path (route ).as_posix ()
125
125
@@ -157,8 +157,8 @@ def generate(self):
157
157
with Progress ("Saving thumbnail metadata at '%s'" % self .metadata_path ):
158
158
for frame , start , * _ in self .thumbnails ():
159
159
frame = os .path .join (self .thumbnail_dir , os .path .basename (frame ))
160
- base = os .path .join (self .base , os .path .basename (self .thumbnail_dir ))
161
- prefix = base if self .base else os .path .relpath (self .thumbnail_dir )
160
+ base = os .path .join (self .base or "" , os .path .basename (self .thumbnail_dir ))
161
+ prefix = base if self .base is not None else os .path .relpath (self .thumbnail_dir )
162
162
route = os .path .join (prefix , os .path .basename (frame ))
163
163
route = pathlib .Path (route ).as_posix ()
164
164
thumbnail_data = {
You can’t perform that action at this time.
0 commit comments