chiark / gitweb /
plugins/tracklength-gstreamer.c: Rewrite to use `GstDiscoverer'.
[disorder] / server / rescan.c
index 71b998ad948798a13ce358045c77b83e5c8e46ec..bd163b4b148726bf7afbb9e7bfa3f8be946dd3cb 100644 (file)
@@ -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
@@ -75,7 +75,7 @@ static void checkabort(void) {
     exit(0);
   }
   if(signalled) {
-    disorder_info("received signal %d", signalled);
+    disorder_info("received signal %ju", (uintmax_t)signalled);
     trackdb_abort_transaction(global_tid);
     exit(0);
   }
@@ -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;