X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/6961095b797229842e1465ff3670625d11e95167..f4604d0d467ae510f8167d3109e6fd05f57f1cde:/server/rescan.c diff --git a/server/rescan.c b/server/rescan.c index 71b998a..8f2419c 100644 --- a/server/rescan.c +++ b/server/rescan.c @@ -1,6 +1,6 @@ /* * This file is part of DisOrder - * Copyright (C) 2005-2008 Richard Kettlewell + * Copyright (C) 2005-2011 Richard Kettlewell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -233,8 +233,11 @@ static int recheck_track_tid(struct recheck_state *cs, return 0; } } - /* see if the track has evaporated */ - if(check(c->module, c->root, path) == 0) { + /* see if the track has evaporated or no longer has a player */ + for(n = 0; (n < config->player.n + && fnmatch(config->player.s[n].s[0], t->track, 0) != 0); ++n) + ; + if(n >= config->player.n || check(c->module, c->root, path) == 0) { D(("obsoleting %s", t->track)); if((err = trackdb_obsolete(t->track, tid))) return err;