X-Git-Url: https://diplodocus.org/git/flac-archive/blobdiff_plain/d8b1024f3b57a8619fa0e07029e9205e760a84d7..3e8794c0d39a363cd6da9f6a29e0b07fb8ede9ea:/flac2mp3 diff --git a/flac2mp3 b/flac2mp3 index 5ebc873..1e29ad0 100755 --- a/flac2mp3 +++ b/flac2mp3 @@ -1,6 +1,6 @@ #! /usr/bin/env python2.4 -''' +""" =head1 NAME B - transcode FLAC file to MP3 files @@ -48,7 +48,7 @@ Written by Eric Gillespie . =cut -''' #' # python-mode is sucks +""" import re, sys, traceback from optparse import OptionParser @@ -153,7 +153,8 @@ class Tags(object): self._global = {} self._tags = {} def __len__(self): - return len(self._tags) + # All files have at least one track. + return max(1, len(self._tags)) def get(self, key, track=None): key = key.upper() try: @@ -182,8 +183,8 @@ class Tags(object): tags[key].append(value) def get_tags(fn): - '''Return the ARTIST, ALBUM, and DATE tags followed by the TITLE tags - in the file FN.''' + """Return the ARTIST, ALBUM, and DATE tags followed by the TITLE tags + in the file FN.""" tags = Tags()