コード例 #1
0
ファイル: index.py プロジェクト: TheFungineer/rainwave
 def post(self):
     info.attach_info_to_request(self,
                                 extra_list=self.get_cookie("r5_list"),
                                 live_voting=True)
     self.append("stream_filename",
                 config.get_station(self.sid, "stream_filename"))
     self.append("station_list", config.station_list)
     self.append("relays", config.public_relays[self.sid])
コード例 #2
0
ファイル: index.py プロジェクト: Sicno/rainwave
	def get(self):
		info.attach_info_to_request(self, all_lists=True)
		self.append("api_info", { "time": int(time.time()) })
		self.render("index.html", request=self,
					site_description=self.locale.translate("station_description_id_%s" % self.sid),
					revision_number=config.build_number,
					api_url=config.get("api_external_url_prefix"),
					cookie_domain=config.get("cookie_domain"),
					locales=api.locale.locale_names_json)
コード例 #3
0
ファイル: index.py プロジェクト: Reani/rainwave
	def get(self):
		info.attach_info_to_request(self, playlist=True, artists=True)
		self.append("api_info", { "time": int(time.time()) })
		self.render("beta_index.html", request=self,
					site_description=self.locale.translate("station_description_id_%s" % self.sid),
					jsfiles=jsfiles,
					revision_number=config.get("revision_number"),
					api_url=config.get("api_external_url_prefix"),
					cookie_domain=config.get("cookie_domain"))
コード例 #4
0
 def get(self):
     info.attach_info_to_request(self, playlist=True, artists=True)
     self.append("api_info", {"time": int(time.time())})
     self.render("beta_index.html",
                 request=self,
                 site_description=self.locale.translate(
                     "station_description_id_%s" % self.sid),
                 jsfiles=jsfiles,
                 revision_number=config.get("revision_number"),
                 api_url=config.get("api_external_url_prefix"),
                 cookie_domain=config.get("cookie_domain"))
コード例 #5
0
 def get(self):
     info.attach_info_to_request(self, all_lists=True)
     self.append("api_info", {"time": int(time.time())})
     self.render("index.html",
                 request=self,
                 site_description=self.locale.translate(
                     "station_description_id_%s" % self.sid),
                 revision_number=config.build_number,
                 api_url=config.get("api_external_url_prefix"),
                 cookie_domain=config.get("cookie_domain"),
                 locales=api.locale.locale_names_json)
コード例 #6
0
ファイル: index.py プロジェクト: Sicno/rainwave
	def get(self):
		info.attach_info_to_request(self, extra_list=self.get_cookie("r4_active_list"))
		self.append("api_info", { "time": int(time.time()) })
		self.render("r4_index.html", request=self,
					site_description=self.locale.translate("station_description_id_%s" % self.sid),
					revision_number=config.build_number,
					jsfiles=self.jsfiles,
					api_url=config.get("api_external_url_prefix"),
					cookie_domain=config.get("cookie_domain"),
					locales=api.locale.locale_names_json,
					relays=config.public_relays_json[self.sid],
					stream_filename=config.get_station(self.sid, "stream_filename"),
					station_list=config.station_list_json)
コード例 #7
0
ファイル: index.py プロジェクト: rmcauley/rwbackend
	def get(self):
		info.attach_info_to_request(self)
		self.set_header("Content-Type", "text/plain")
		self.render("index.html", user=self.user, info=tornado.escape.json_encode(self.info), sid=self.sid)
		
# @handle_url("authtest_beta")
# class BetaIndex(MainIndex):
	# def get(self):
		# if self.user.data['group_id'] not in (5, 4, 8, 12, 15, 14, 17):
			# self.send_error(403)
		# else:
			# info.attach_info_to_request(self)
			# self.set_header("Content-Type", "text/plain")
			# self.render("index.html", user=self.user, info=tornado.escape.json_encode(self.info), sid=self.sid)
コード例 #8
0
ファイル: index.py プロジェクト: MagnusVortex/rainwave
	def get(self):
		self.mobile = self.request.headers.get("User-Agent").lower().find("mobile") != -1 or self.request.headers.get("User-Agent").lower().find("android") != -1
		info.attach_info_to_request(self, extra_list=self.get_cookie("r4_active_list"))
		self.append("api_info", { "time": int(time.time()) })
		self.render(self.page_template, request=self,
					site_description=self.locale.translate("station_description_id_%s" % self.sid),
					revision_number=config.build_number,
					jsfiles=self.jsfiles,
					api_url=config.get("api_external_url_prefix"),
					cookie_domain=config.get("cookie_domain"),
					locales=api.locale.locale_names_json,
					relays=config.public_relays_json[self.sid],
					stream_filename=config.get_station(self.sid, "stream_filename"),
					station_list=config.station_list_json,
					apple_home_screen_icon=config.get_station(self.sid, "apple_home_screen_icon"),
					mobile=self.mobile)
コード例 #9
0
	def post(self):
		info.attach_info_to_request(self, live_voting=True)
		self.append("build_version", config.build_number)
		self.append("locale", self.locale.code)
		self.append("locales", api.locale.locale_names)
		self.append("cookie_domain", config.get("cookie_domain"))
		self.append("on_init", [])
		self.append("on_measure", [])
		self.append("on_draw", [])
		self.append("websocket_host", config.get("websocket_host"))
		self.append("stream_filename", config.get_station(self.sid, "stream_filename"))
		self.append("station_list", config.station_list)
		self.append("relays", config.public_relays[self.sid])
		if self.is_mobile:
			self.append("mobile", True)
		else:
			self.append("mobile", False)
コード例 #10
0
ファイル: index.py プロジェクト: Abchrisabc/rainwave
	def post(self):
		info.attach_info_to_request(self, live_voting=True)
		self.append("build_version", config.build_number)
		self.append("locale", self.locale.code)
		self.append("locales", api.locale.locale_names)
		self.append("cookie_domain", config.get("cookie_domain"))
		self.append("on_init", [])
		self.append("on_measure", [])
		self.append("on_draw", [])
		self.append("websocket_host", config.get("websocket_host"))
		self.append("stream_filename", config.get_station(self.sid, "stream_filename"))
		self.append("station_list", config.station_list)
		self.append("relays", config.public_relays[self.sid])
		if self.is_mobile:
			self.append("mobile", True)
		else:
			self.append("mobile", False)
コード例 #11
0
 def get(self):
     info.attach_info_to_request(
         self, extra_list=self.get_cookie("r4_active_list"))
     self.append("api_info", {"time": int(time.time())})
     self.render("r4_index.html",
                 request=self,
                 site_description=self.locale.translate(
                     "station_description_id_%s" % self.sid),
                 revision_number=config.build_number,
                 jsfiles=self.jsfiles,
                 api_url=config.get("api_external_url_prefix"),
                 cookie_domain=config.get("cookie_domain"),
                 locales=api.locale.locale_names_json,
                 relays=config.public_relays_json[self.sid],
                 stream_filename=config.get_station(self.sid,
                                                    "stream_filename"),
                 station_list=config.station_list_json)
コード例 #12
0
ファイル: index.py プロジェクト: Dinir/rainwave
 def get(self):
     self.mobile = self.request.headers.get("User-Agent").lower().find(
         "mobile") != -1 or self.request.headers.get(
             "User-Agent").lower().find("android") != -1
     info.attach_info_to_request(
         self, extra_list=self.get_cookie("r4_active_list"))
     self.append("api_info", {"time": int(time.time())})
     self.render(self.page_template,
                 request=self,
                 site_description=self.locale.translate(
                     "station_description_id_%s" % self.sid),
                 revision_number=config.build_number,
                 jsfiles=self.jsfiles,
                 api_url=config.get("api_external_url_prefix"),
                 cookie_domain=config.get("cookie_domain"),
                 locales=api.locale.locale_names_json,
                 relays=config.public_relays_json[self.sid],
                 stream_filename=config.get_station(self.sid,
                                                    "stream_filename"),
                 station_list=config.station_list_json,
                 mobile=self.mobile)
コード例 #13
0
ファイル: index.py プロジェクト: Siqo53/rainwave
 def post(self):
     info.attach_info_to_request(self, extra_list=self.get_cookie("r4_active_list"))
     self.append("stream_filename", config.get_station(self.sid, "stream_filename"))
     self.append("station_list", config.station_list)
     self.append("relays", config.public_relays[self.sid])
コード例 #14
0
ファイル: index.py プロジェクト: rmcauley/rainwave
 def post(self):
     info.attach_info_to_request(self, live_voting=True)
     self.append("stream_filename", config.get_station(self.sid, "stream_filename"))
     self.append("station_list", config.station_list)
     self.append("relays", config.public_relays[self.sid])