diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-08-24 20:46:27 +0200 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-08-24 20:46:27 +0200 |
commit | e4f46487145be0bbcd2aa278388a1b4b3ef78f54 (patch) | |
tree | 4e0170664bdc651c782601544572170d20090239 /nephilim/common.py | |
parent | e7c01e7b53f02b24e6938d945e84453537f3fa31 (diff) |
song: convert to a subclass of dict.
also don't store whole song in Library and Playlist,
this saves a significant amount of memory.
Diffstat (limited to 'nephilim/common.py')
-rw-r--r-- | nephilim/common.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nephilim/common.py b/nephilim/common.py index 5c12225..1249ec7 100644 --- a/nephilim/common.py +++ b/nephilim/common.py @@ -72,10 +72,10 @@ def expand_tags(str, expanders): def generate_metadata_path(song, dir_tag, file_tag): """Generate dirname and (db files only) full file path for reading/writing metadata files (cover, lyrics) from $tags in dir/filename.""" - if QtCore.QDir.isAbsolutePath(song.filepath()): - dirname = os.path.dirname(song.filepath()) + if QtCore.QDir.isAbsolutePath(song['file']): + dirname = os.path.dirname(song['file']) filepath = '' - elif '://' in song.filepath(): # we are streaming + elif '://' in song['file']: # we are streaming dirname = '' filepath = '' else: |