libsaria: Change cache_func() argument order
I want to pass the file object last, I just think it looks better.
This commit is contained in:
parent
797063c492
commit
0f1b5550aa
|
@ -48,7 +48,7 @@ class LastFmRequest(dict):
|
|||
else:
|
||||
return None
|
||||
|
||||
def lfm_cache_album(file, artist, album, title):
|
||||
def lfm_cache_album(artist, album, title, file):
|
||||
req = LastFmRequest("album.getInfo")
|
||||
req["album"] = album
|
||||
req["artist"] = artist
|
||||
|
|
|
@ -22,9 +22,9 @@ def make_cache_path(artist, album, file):
|
|||
os.makedirs(cache_path)
|
||||
return join(cache_path, file)
|
||||
|
||||
def read_cache(artist, album, title, cache_func, cache_path):
|
||||
def fill_cache(artist, album, title, cache_func, cache_path):
|
||||
f = open(cache_path, 'w')
|
||||
cache_func(f, artist, album, title)
|
||||
cache_func(artist, album, title, f)
|
||||
f.close()
|
||||
if not file_exists(cache_path):
|
||||
os.remove(cache_path)
|
||||
|
|
Loading…
Reference in New Issue