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

Tag album tracks with overall album DR score #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 4 additions & 3 deletions dr14tmeter/tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ def write_dr_tags(self, dr):
self.dir_name = dr.dir_name

for item in dr.res_list:
self.read_track_new(item)
self.read_track_new(item,dr)

def get_file_ext_code(self):
return self._ext

def read_track_new(self, item):
def read_track_new(self, item, dr):

(f, ext) = os.path.splitext(item['file_name'])
ext = ext.lower()
Expand Down Expand Up @@ -84,9 +84,10 @@ def read_track_new(self, item):
audio.tags.add(TXXX(encoding=3, desc=u"DR", text=[str(item["dr14"])]))
else:
audio["DR"] = [str(item["dr14"])]
audio["ALBUM_DR"] = [str(dr.dr14)]

audio.save()

self._ext = self.formats.index(ext)

return True
return True