From 96c199e95a18e4c6bb97d89c709b51091bbdde1b Mon Sep 17 00:00:00 2001 From: Evgeny S Date: Sat, 3 Jun 2017 22:30:04 +0300 Subject: [PATCH] Update metadata.rs Turns out unreleased tracks can have no forbidden and allowed lists at all, take care of that. --- src/metadata.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/metadata.rs b/src/metadata.rs index 03877af7..c4eb3997 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -38,6 +38,7 @@ fn parse_restrictions<'s, I>(restrictions: I, country: &str, catalogue: &str) -> } } + (has_forbidden || has_allowed) && (!has_forbidden || !countrylist_contains(forbidden.as_str(), country)) && (!has_allowed || countrylist_contains(allowed.as_str(), country)) }