Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add replacement for source file name #264

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions namer/comparison_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def as_dict(self, config: NamerConfig):
'performers': ', '.join(map(lambda p: p.name, filter(lambda p: p.role == 'Female', self.performers))) if self.performers else None,
'all_performers': ', '.join(map(lambda p: p.name, self.performers)) if self.performers else None,
'ext': self.original_parsed_filename.extension if self.original_parsed_filename else None,
'source_file_name': self.original_parsed_filename.source_file_name if self.original_parsed_filename else None,
'trans': self.original_parsed_filename.trans if self.original_parsed_filename else None,
'vr': vr,
'resolution': res_str,
Expand Down
1 change: 1 addition & 0 deletions namer/name_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class PartialFormatter(string.Formatter):
'act',
'ext',
'trans',
'source_file_name',
'uuid',
'vr',
'type',
Expand Down
1 change: 1 addition & 0 deletions namer/namer.cfg.default
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ name_parser = {_site}{_sep}{_optional_date}{_ts}{_name}{_dot}{_ext}
# * 'all_performers' - comma seperated list of all performers
# * 'act' - an act, parsed from original file name, don't use.
# * 'ext' - original file's extension, you should keep this.
# * 'source_file_name' - original file name
# * 'video_codec' - video codec of file, like h264
# * 'audio_codec' - audio codec of file, like acc
# * 'trans' - 'TS', or 'ts' if detected in original file name.
Expand Down
Loading