Skip to content

Commit

Permalink
fix: The bank field of PSSI ANLZ tag can also have a value of 0 (#108)
Browse files Browse the repository at this point in the history
This fixes an issue where the XOR mask was applied to un-garbled PSSI tags.
  • Loading branch information
dylanljones committed Dec 11, 2023
1 parent 2f13a93 commit 9067fcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyrekordbox/anlz/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def _parse(self, data: bytes):
# Check if the file is garbled (only on exported files)
# For this we check the validity of mood and bank
# Mood: High=1, Mid=2, Low=3
# Bank: 1-8
# Bank: 0-8
mood = Int16ub.parse(tag_data[18:20])
bank = Int16ub.parse(tag_data[28:30])
if 1 <= mood <= 3 and 1 <= bank <= 8:
if 1 <= mood <= 3 and 0 <= bank <= 8:
logger.debug("PSSI is not garbled!")
else:
logger.debug("PSSI is garbled!")
Expand Down

0 comments on commit 9067fcd

Please sign in to comment.