summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2014-12-20 01:38:07 +0100
committerRasmus Steinke <rasi@xssn.at>2014-12-20 01:38:07 +0100
commit063f67326a199b7fb4043b4e678d824dcd7e75be (patch)
tree881e757109ace7440f328b75440dd2ae7a97e6ad
parent83a257ce4fa5dcd38a0c73588f81937593e1c7b1 (diff)
downloadmppc-063f67326a199b7fb4043b4e678d824dcd7e75be.tar.gz
mppc-063f67326a199b7fb4043b4e678d824dcd7e75be.tar.bz2
fixed lastcache
-rwxr-xr-xmppc10
1 files changed, 5 insertions, 5 deletions
diff --git a/mppc b/mppc
index 6a93fb0..92eebe0 100755
--- a/mppc
+++ b/mppc
@@ -210,15 +210,15 @@ def lastCache(args):
try:
for element in client.find('albumartist', artist):
content.add(tuple(element[f] for f in fields))
- for element in sorted(content, key=lambda elem: elem[0]):
- if element[1:] not in seen:
- line = element[1:]
- fh.write(os.getenv('seperator').join(line)+"\n")
- seen.add(line)
except KeyError:
errors.add(element['file'])
except TypeError:
errors2.add(element['file'])
+ for element in sorted(content, key=lambda elem: elem[0], reverse=True):
+ if element[1:] not in seen:
+ line = element[1:]
+ fh.write(os.getenv('seperator').join(line)+"\n")
+ seen.add(line)
for line in sorted(errors, key=str.lower):
print("Missing tags for file: "+line, file=sys.stderr)
for line in sorted(errors2, key=str.lower):