Mercurial > audlegacy
diff src/audacious/playlist.c @ 2636:517d13842fe7 trunk
[svn] improve support for static playlist.
- Playlist.attribute has been introduced. if loading playlist file is marked as static playlist, this value would be set.
- now user can specify whether save as a static playlist or not.
- thanks to Playlist.attribute, meaningful mtime in a static playlist will be preserved.
author | yaz |
---|---|
date | Wed, 21 Mar 2007 02:13:02 -0700 |
parents | c079e507869a |
children | 420ce282920d |
line wrap: on
line diff
--- a/src/audacious/playlist.c Wed Mar 21 01:59:48 2007 -0700 +++ b/src/audacious/playlist.c Wed Mar 21 02:13:02 2007 -0700 @@ -197,9 +197,9 @@ return TRUE; if (entry->tuple == NULL || entry->tuple->mtime > 0 || entry->tuple->mtime == -1) - modtime = playlist_get_mtime(entry->filename); + modtime = playlist_get_mtime(entry->filename); else - modtime = 0; /* URI -nenolod */ + modtime = 0; /* URI -nenolod */ if (entry->decoder == NULL) entry->decoder = input_check_file(entry->filename, FALSE); @@ -2484,7 +2484,8 @@ for (node = playlist->entries; node; node = g_list_next(node)) { entry = node->data; - if(entry->tuple && (entry->tuple->length > -1)) { + if(playlist->attribute & PLAYLIST_STATIC || + (entry->tuple && entry->tuple->length > -1 && entry->tuple->mtime != -1)) { update_playlistwin = TRUE; continue; } @@ -2534,7 +2535,8 @@ entry = node->data; - if(entry->tuple && (entry->tuple->length > -1)) { + if(playlist->attribute & PLAYLIST_STATIC || + (entry->tuple && entry->tuple->length > -1 && entry->tuple->mtime != -1)) { update_playlistwin = TRUE; continue; }