MCPcopy Index your code
hub / github.com/tiny-pilot/tinypilot / requires_https

Method requires_https

app/db/settings.py:30–42  ·  view source on GitHub ↗

Retrieves the setting whether HTTPS connections are required. If there is no setting in the database, it defaults to True. Returns: bool.

(self)

Source from the content-addressed store, hash-verified

28 [should_be_required, _ROW_ID])
29
30 def requires_https(self):
31 """Retrieves the setting whether HTTPS connections are required.
32
33 If there is no setting in the database, it defaults to True.
34
35 Returns:
36 bool.
37 """
38 cursor = self._db_connection.execute(
39 'SELECT requires_https FROM settings WHERE id=?', [_ROW_ID])
40 # Reminder: the `requires_https` column is of type integer.
41 raw_value = _fetch_single_value(cursor, 1)
42 return raw_value > 0 # Convert integer value to bool.
43
44 def get_streaming_mode(self):
45 """Retrieves the preferred streaming mode for the remote screen.

Calls 1

_fetch_single_valueFunction · 0.85