diff --git a/php/servers/sources.php b/php/servers/sources.php index 2b0d294..6a482cf 100644 --- a/php/servers/sources.php +++ b/php/servers/sources.php @@ -99,11 +99,15 @@ } $url = $room_entry['url']; - $tags = $room_entry['tags']; + $tag_string = $room_entry['tags']; + $nsfw = isset($room_entry['nsfw']) && $room_entry['nsfw'] == "1"; $room_id = url_get_room_id($url); - $this->tags[$room_id] = explode(',', $tags); + $this->tags[$room_id] = explode(',', $tag_string); + if ($nsfw) { + $this->tags[$room_id] = array_unique(["nsfw", ...$this->tags[$room_id]]); + } } SDIRCommunitySource::sdir_report_errors($entry_missing_url, $entry_missing_tags);