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
22DEFAULT_SKIP = False
33DEFAULT_OUTPUT = None
44DEFAULT_FORMAT = "vtt"
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ def format_time(secs):
119119 return ("0%s.000" % delta )[:12 ]
120120
121121 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 )
123123 route = os .path .join (prefix , extract_name (self .filepath ) + ".png" )
124124 route = pathlib .Path (route ).as_posix ()
125125
@@ -157,8 +157,8 @@ def generate(self):
157157 with Progress ("Saving thumbnail metadata at '%s'" % self .metadata_path ):
158158 for frame , start , * _ in self .thumbnails ():
159159 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 )
162162 route = os .path .join (prefix , os .path .basename (frame ))
163163 route = pathlib .Path (route ).as_posix ()
164164 thumbnail_data = {
You can’t perform that action at this time.
0 commit comments