add utility to remove prod names from track titles

+ move code to handle args and print startup info to other files
+ update app version number
This commit is contained in:
geoffrey45
2023-02-17 18:25:32 +03:00
parent 29e766b60a
commit 509c22c736
8 changed files with 242 additions and 179 deletions
+8 -3
View File
@@ -61,16 +61,21 @@ class Track:
self.og_title = self.title
if self.artist is not None:
artists = utils.split_artists(self.artist)
new_title = self.title
if settings.EXTRACT_FEAT:
featured, new_title = utils.parse_feat_from_title(self.title)
original_lower = "-".join([a.lower() for a in artists])
artists.extend([a for a in featured if a.lower() not in original_lower])
self.title = new_title
if settings.REMOVE_PROD:
new_title = utils.remove_prod(new_title)
if self.og_title == self.album:
self.album = new_title
# if track is a single
if self.og_title == self.album:
self.album = new_title
self.title = new_title
self.artist_hashes = [utils.create_hash(a, decode=True) for a in artists]