Allow switching between old and new rename templates

Show a message dialog explaining that there is a new template format
Add a dynamic label to show the effect of a rename
Add tests for FileRenamer
Remove the filename parameter from the determine_name function
This commit is contained in:
Timmy Welch 2022-04-18 18:59:17 -07:00
parent 5d2989f4cb
commit 49839dc0cb

View File

@ -259,6 +259,15 @@ class GenericMetadata:
if not found:
self.credits.append(credit)
def get_primary_credit(self, role):
primary = ""
for credit in self.credits:
if (primary == "" and credit["role"].lower() == role.lower()) or (
credit["role"].lower() == role.lower() and credit["primary"]
):
primary = credit["person"]
return primary
def __str__(self):
vals = []
if self.is_empty: