Skip to content

Commit

Permalink
Improve output of -z
Browse files Browse the repository at this point in the history
in ctrl.collection_ctrl_cli.update_tracks_from_brainz.
  • Loading branch information
JOJ0 committed Apr 2, 2022
1 parent 556f929 commit a613271
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions discodos/ctrls.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,14 +1010,16 @@ def _warn_skipped(m): # prints skipped-message and processed-count
else:
print("Recording MBID: {}".format(rec_mbid))

print("Key: {}, Chords Key: {}, BPM: {}".format(
key, chords_key, bpm))
print("Key: {} | Chords Key: {} | BPM: {}".format(
key if key else '---',
chords_key if chords_key else '---',
bpm if bpm else '---')
)

# update release table
ok_release = self.collection.update_release_brainz(discogs_id,
release_mbid, bmatch.release_match_method)
if ok_release:
print('Release table updated successfully.')
log.info('Release table updated successfully.')
added_release += 1
else:
Expand All @@ -1031,7 +1033,6 @@ def _warn_skipped(m): # prints skipped-message and processed-count

if ok_rec:
if rec_mbid: added_rec += 1
print('Track table updated successfully.')
log.info('Track table updated successfully.')
if key: added_key += 1
if chords_key: added_chords_key += 1
Expand Down
2 changes: 1 addition & 1 deletion discodos/model_brainz.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _get_accousticbrainz(self, urlpart):
except requests.exceptions.HTTPError as errh:
log.debug("fetching AcousticBrainz MBID: %s (HTTPError)", errh)
if "Not found" in errh.response.text:
log.warning("AcousticBrainz doesn't have this recording yet. Consider submitting it!")
log.warning("AcousticBrainz missing recording. Consider submitting it!")
return None
except requests.exceptions.ConnectionError as errc:
log.error("fetching AcousticBrainz MBID: %s (ConnectionError)", errc)
Expand Down

0 comments on commit a613271

Please sign in to comment.