Skip to content

Commit

Permalink
Fixed a bug when reading a mp3 tag not present would trigger a warning
Browse files Browse the repository at this point in the history
Now only failing to load the file will do so
  • Loading branch information
Lucas Fernandes Vieira committed Dec 19, 2018
1 parent 432458a commit f5116f0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

## Português
### Aviso
**Cuidado ao ler este readme, pois ele difere entre versões do programa. Veja sempre o arquivo readme incluído na release que você baixou. Este readme, em particular, é referente à versão 2.5-alpha9**
**Cuidado ao ler este readme, pois ele difere entre versões do programa. Veja sempre o arquivo readme incluído na release que você baixou. Este readme, em particular, é referente à versão 2.5**

**A versão atual é incompatível com o arquivo de configuração usado até a versão 2.4. Você terá que atualizar sua configuração manualmente, caso o arquivo seja de versões mais antigas. Veja o novo modelo em [configuração geral](#configuração-geral)**

Expand Down Expand Up @@ -318,7 +318,7 @@ Uma boa combinação é utilizar `run_continuously` juntamente com a inicializa
## English
### Warning
**Be careful when reading this readme because it differs between versions. Always read the readme file included in the release you downloaded. This particular readme refers to the version 2.5-alpha9**
**Be careful when reading this readme because it differs between versions. Always read the readme file included in the release you downloaded. This particular readme refers to the version 2.5**
**The current version is incompatible with the configuration file used until 2.4. You will need to update your configuration manually, if the file were from older versions. See the new model in [general configuration](#general-configuration)**
Expand Down
4 changes: 2 additions & 2 deletions _about.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
'''

name = "1D-Sync"
version = "2.5-alpha9"
build_date = "2018/12/11"
version = "2.5"
build_date = "2018/12/18"
codename = "Ghost River"
17 changes: 13 additions & 4 deletions _file.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,21 @@ def __init__(self):

def load(self, path):
try:
# a fail here will trigger a warning
self.file = eyed3.load(path)

self.title = self.file.tag.title
self.album = self.file.tag.album
self.artist = self.file.tag.artist
self.rating = math.ceil(self.file.tag.frame_set[b'POPM'][0].rating / 51)
try: self.title = self.file.tag.title
except: self.title = "<none>"

try: self.album = self.file.tag.album
except: self.album = "<none>"

try:self.artist = self.file.tag.artist
except: self.artist = "<none>"

# this frame set can be missing if the rating is unset
try: self.rating = math.ceil(self.file.tag.frame_set[b'POPM'][0].rating / 51)
except: self.rating = 0

self.loaded = True
return True
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Add option to use a faster but inaccurate comparison technique, it will compare filenames only (like the early versions)
* Fixed a bug when the program would try to validate a disabled sync, possibly logging the failure multiple times
* The email now contains the complete execution log
* Fixed a bug when trying to read a mp3 tag that wasn't present on the file will trigger a warning - now only failing to load the file will do so

2.4 - Fear of the Dark
This release focuses on making selection conditions more versatile by using a logical expression analyzer (a very simple one, don't expect too much) available as a separate project in https://github.com/1deterministic/Simple-Logical-Expression-Analyzer
Expand Down

0 comments on commit f5116f0

Please sign in to comment.