From f652ae2be38e74796ed63ba72e23fcb632818118 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 19 Oct 2014 12:12:20 +0200 Subject: restructure room site to produce a unique room/player/formats page --- lib/helper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/helper.php b/lib/helper.php index 5ae027b..6139a18 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -12,7 +12,9 @@ function link_room($room) function link_player($room, $format, $translated = false) { - return rawurlencode($room).'/'.rawurlencode($format).'/'.($translated ? 'translated/' : ''); + $isDefaultFormat = in_array($format, array('hq', 'video')); + + return rawurlencode($room).'/'.($isDefaultFormat ? '' : rawurlencode($format).'/').($translated ? 'translated/' : ''); } function baseurl() -- cgit v1.2.3