Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* togg.py (remove_article): fix regexp.

  • Loading branch information...
commit 5044310044169783a0109d077501cda6cf93b544 1 parent 3ead71b
@stassats authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 togg.py
View
5 togg.py
@@ -149,7 +149,7 @@ def guess_from_tags(files):
music_dir = os.path.expanduser("~/music/")
def remove_article(string):
- return re.sub('^(the_)|(a_)', '', string)
+ return re.sub('^(the|a)_', '', string)
def make_filename(tags):
file_name = music_dir
@@ -233,7 +233,8 @@ def track_number(file_name, common=""):
for i in tags:
i.set_album()
- if any(tag.year != tags[0].year for tag in tags):
+ if any(not tags[0].year or tag.year != tags[0].year
+ for tag in tags):
for i in tags:
i.set_year()
Please sign in to comment.
Something went wrong with that request. Please try again.