mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Hound
This commit is contained in:
parent
5e7e6e3fdf
commit
c0ee519dba
2 changed files with 9 additions and 6 deletions
|
|
@ -779,7 +779,6 @@ class MediaInfoFile(object):
|
||||||
feed_dir = os.path.dirname(path)
|
feed_dir = os.path.dirname(path)
|
||||||
feed_ext = os.path.splitext(feed_basename)[1][1:].lower()
|
feed_ext = os.path.splitext(feed_basename)[1][1:].lower()
|
||||||
|
|
||||||
|
|
||||||
with maintained_temp_file_path(".clip") as tmp_path:
|
with maintained_temp_file_path(".clip") as tmp_path:
|
||||||
self.log.info("Temp File: {}".format(tmp_path))
|
self.log.info("Temp File: {}".format(tmp_path))
|
||||||
self._generate_media_info_file(tmp_path, feed_ext, feed_dir)
|
self._generate_media_info_file(tmp_path, feed_ext, feed_dir)
|
||||||
|
|
@ -827,9 +826,11 @@ class MediaInfoFile(object):
|
||||||
|
|
||||||
# make sure partial input basename is having correct extensoon
|
# make sure partial input basename is having correct extensoon
|
||||||
if not partialname:
|
if not partialname:
|
||||||
raise AttributeError("Wrong input attributes. Basename - {}, Ext - {}".format(
|
raise AttributeError(
|
||||||
feed_basename, feed_ext
|
"Wrong input attributes. Basename - {}, Ext - {}".format(
|
||||||
))
|
feed_basename, feed_ext
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
# get all related files
|
# get all related files
|
||||||
files = [
|
files = [
|
||||||
|
|
@ -860,7 +861,8 @@ class MediaInfoFile(object):
|
||||||
# convert to multiple collections
|
# convert to multiple collections
|
||||||
_continues_colls = collection.separate()
|
_continues_colls = collection.separate()
|
||||||
for _coll in _continues_colls:
|
for _coll in _continues_colls:
|
||||||
coll_to_text = self._format_collection(_coll, len(number_from_path))
|
coll_to_text = self._format_collection(
|
||||||
|
_coll, len(number_from_path))
|
||||||
self.log.debug("__ coll_to_text: {}".format(coll_to_text))
|
self.log.debug("__ coll_to_text: {}".format(coll_to_text))
|
||||||
if search_number_pattern in coll_to_text:
|
if search_number_pattern in coll_to_text:
|
||||||
return coll_to_text
|
return coll_to_text
|
||||||
|
|
|
||||||
|
|
@ -984,7 +984,8 @@ def get_sequence_pattern_and_padding(file):
|
||||||
return None, None
|
return None, None
|
||||||
found = sorted(list(set(foundall[0])))[-1]
|
found = sorted(list(set(foundall[0])))[-1]
|
||||||
|
|
||||||
padding = int(re.findall(r"\d+", found)[-1]) if "%" in found else len(found)
|
padding = int(
|
||||||
|
re.findall(r"\d+", found)[-1]) if "%" in found else len(found)
|
||||||
return found, padding
|
return found, padding
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue