fix FS#9796 - playlist resume from plugins didnt work

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20101 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2009-02-25 05:41:31 +00:00
parent 194fe0e6f0
commit 7f77dd8c26

View file

@ -477,11 +477,21 @@ static int update_dir(void)
/* load tracks from specified directory to resume play */
void resume_directory(const char *dir)
{
int dirfilter = *tc.dirfilter;
int ret;
#ifdef HAVE_TAGCACHE
bool id3db = *tc.dirfilter == SHOW_ID3DB;
#endif
if (ft_load(&tc, dir) < 0)
/* make sure the dirfilter is sane. The only time it should be possible
* thats its not is when resume playlist is called from a plugin
*/
#ifdef HAVE_TAGCACHE
if (!id3db)
#endif
*tc.dirfilter = global_settings.dirfilter;
ret = ft_load(&tc, dir);
*tc.dirfilter = dirfilter;
if (ret < 0)
return;
lastdir[0] = 0;