+
+ /* Reject tracks played within the last 8 hours */
+ if((s = kvp_get(prefs, "played_time"))) {
+ last = atoll(s);
+ now = time(0);
+ if(now < last + 8 * 3600) /* TODO configurable */
+ return 0;
+ }
+
+ /* We'll need tags for a number of things */
+ track_tags = parsetags(kvp_get(prefs, "tags"));
+
+ /* Reject tracks with prohibited tags */
+ if(prohibited_tags && tag_intersection(track_tags, prohibited_tags))
+ return 0;
+
+ /* Reject tracks that lack required tags */
+ if(*required_tags && !tag_intersection(track_tags, required_tags))
+ return 0;
+