Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6ca011202 | ||
|
|
114c2572a4 | ||
|
f64b362603
|
|||
|
2fd7910194
|
|||
|
c2e53072f7
|
|||
|
c2986f3b14
|
|||
|
57854169f4
|
@@ -1,21 +1,5 @@
|
|||||||
blinker==1.7.0
|
# Include all production requirements
|
||||||
Brotli==1.1.0
|
-r requirements.txt
|
||||||
cachetools==5.3.3
|
|
||||||
click==8.1.7
|
# Development requirements
|
||||||
defusedxml==0.7.1
|
pytest>=6.2.1
|
||||||
Flask==3.0.2
|
|
||||||
gevent==24.2.1
|
|
||||||
greenlet==3.0.3
|
|
||||||
iniconfig==2.0.0
|
|
||||||
itsdangerous==2.1.2
|
|
||||||
Jinja2==3.1.4
|
|
||||||
MarkupSafe==2.1.5
|
|
||||||
packaging==24.0
|
|
||||||
pluggy==1.4.0
|
|
||||||
PySocks==1.7.1
|
|
||||||
pytest==8.1.1
|
|
||||||
stem==1.8.2
|
|
||||||
urllib3==2.2.2
|
|
||||||
Werkzeug==3.0.3
|
|
||||||
zope.event==5.0
|
|
||||||
zope.interface==6.2
|
|
||||||
|
|||||||
@@ -1,17 +1,8 @@
|
|||||||
blinker==1.7.0
|
Flask>=1.0.3
|
||||||
Brotli==1.1.0
|
gevent>=1.2.2
|
||||||
cachetools==5.3.3
|
Brotli>=1.0.7
|
||||||
click==8.1.7
|
PySocks>=1.6.8
|
||||||
defusedxml==0.7.1
|
urllib3>=1.24.1
|
||||||
Flask==3.0.2
|
defusedxml>=0.5.0
|
||||||
gevent==24.2.1
|
cachetools>=4.0.0
|
||||||
greenlet==3.0.3
|
stem>=1.8.0
|
||||||
itsdangerous==2.1.2
|
|
||||||
Jinja2==3.1.4
|
|
||||||
MarkupSafe==2.1.5
|
|
||||||
PySocks==1.7.1
|
|
||||||
stem==1.8.2
|
|
||||||
urllib3==2.2.2
|
|
||||||
Werkzeug==3.0.3
|
|
||||||
zope.event==5.0
|
|
||||||
zope.interface==6.2
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ def error_page(e):
|
|||||||
elif (exc_info()[0] == util.FetchError
|
elif (exc_info()[0] == util.FetchError
|
||||||
and exc_info()[1].code == '404'
|
and exc_info()[1].code == '404'
|
||||||
):
|
):
|
||||||
error_message = ('Error: The page you are looking for isn\'t here. ¯\_(ツ)_/¯')
|
error_message = ('Error: The page you are looking for isn\'t here.')
|
||||||
return flask.render_template('error.html',
|
return flask.render_template('error.html',
|
||||||
error_code=exc_info()[1].code,
|
error_code=exc_info()[1].code,
|
||||||
error_message=error_message,
|
error_message=error_message,
|
||||||
|
|||||||
@@ -11,17 +11,10 @@ import subprocess
|
|||||||
def app_version():
|
def app_version():
|
||||||
def minimal_env_cmd(cmd):
|
def minimal_env_cmd(cmd):
|
||||||
# make minimal environment
|
# make minimal environment
|
||||||
env = {}
|
env = {k: os.environ[k] for k in ['SYSTEMROOT', 'PATH'] if k in os.environ}
|
||||||
for k in ['SYSTEMROOT', 'PATH']:
|
env.update({'LANGUAGE': 'C', 'LANG': 'C', 'LC_ALL': 'C'})
|
||||||
v = os.environ.get(k)
|
|
||||||
if v is not None:
|
|
||||||
env[k] = v
|
|
||||||
|
|
||||||
env['LANGUAGE'] = 'C'
|
out = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=env).communicate()[0]
|
||||||
env['LANG'] = 'C'
|
|
||||||
env['LC_ALL'] = 'C'
|
|
||||||
out = subprocess.Popen(
|
|
||||||
cmd, stdout=subprocess.PIPE, env=env).communicate()[0]
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
subst_list = {
|
subst_list = {
|
||||||
@@ -31,24 +24,21 @@ def app_version():
|
|||||||
}
|
}
|
||||||
|
|
||||||
if os.system("command -v git > /dev/null 2>&1") != 0:
|
if os.system("command -v git > /dev/null 2>&1") != 0:
|
||||||
subst_list
|
return subst_list
|
||||||
else:
|
|
||||||
if call(["git", "branch"], stderr=STDOUT,
|
if call(["git", "branch"], stderr=STDOUT, stdout=open(os.devnull, 'w')) != 0:
|
||||||
stdout=open(os.devnull, 'w')) != 0:
|
return subst_list
|
||||||
subst_list
|
|
||||||
else:
|
describe = minimal_env_cmd(["git", "describe", "--tags", "--always"])
|
||||||
# version
|
|
||||||
describe = minimal_env_cmd(["git", "describe", "--always"])
|
|
||||||
git_revision = describe.strip().decode('ascii')
|
git_revision = describe.strip().decode('ascii')
|
||||||
# branch
|
|
||||||
branch = minimal_env_cmd(["git", "branch"])
|
branch = minimal_env_cmd(["git", "branch"])
|
||||||
git_branch = branch.strip().decode('ascii').replace('* ', '')
|
git_branch = branch.strip().decode('ascii').replace('* ', '')
|
||||||
|
|
||||||
subst_list = {
|
subst_list.update({
|
||||||
"version": __version__,
|
|
||||||
"branch": git_branch,
|
"branch": git_branch,
|
||||||
"commit": git_revision
|
"commit": git_revision
|
||||||
}
|
})
|
||||||
|
|
||||||
return subst_list
|
return subst_list
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const player = new Plyr(document.getElementById('js-video-player'), {
|
const playerOptions = {
|
||||||
// Learning about autoplay permission https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/autoplay#syntax
|
// Learning about autoplay permission https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/autoplay#syntax
|
||||||
autoplay: autoplayActive,
|
autoplay: autoplayActive,
|
||||||
disableContextMenu: false,
|
disableContextMenu: false,
|
||||||
@@ -117,5 +117,20 @@
|
|||||||
tooltips: {
|
tooltips: {
|
||||||
controls: true,
|
controls: true,
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const player = new Plyr(document.getElementById('js-video-player'), playerOptions);
|
||||||
|
|
||||||
|
// disable double click to fullscreen
|
||||||
|
// https://github.com/sampotts/plyr/issues/1370#issuecomment-528966795
|
||||||
|
player.eventListeners.forEach(function(eventListener) {
|
||||||
|
if(eventListener.type === 'dblclick') {
|
||||||
|
eventListener.element.removeEventListener(eventListener.type, eventListener.callback, eventListener.options);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add .started property, true after the playback has been started
|
||||||
|
// Needed so controls won't be hidden before playback has started
|
||||||
|
player.started = false;
|
||||||
|
player.once('playing', function(){this.started = true});
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -37,3 +37,41 @@ e.g. Firefox playback speed options */
|
|||||||
max-height: 320px;
|
max-height: 320px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Custom styles similar to youtube
|
||||||
|
*/
|
||||||
|
.plyr__controls {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__progress__container {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__controls .plyr__controls__item:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__controls .plyr__controls__item.plyr__volume {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__controls .plyr__controls__item.plyr__progress__container {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__progress input[type="range"] {
|
||||||
|
margin-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* End custom styles
|
||||||
|
*/
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None,
|
|||||||
cleanup_func(response) # release_connection for urllib3
|
cleanup_func(response) # release_connection for urllib3
|
||||||
content = decode_content(
|
content = decode_content(
|
||||||
content,
|
content,
|
||||||
response.getheader('Content-Encoding', default='identity'))
|
response.headers.get('Content-Encoding', default='identity'))
|
||||||
|
|
||||||
if (settings.debugging_save_responses
|
if (settings.debugging_save_responses
|
||||||
and debug_name is not None
|
and debug_name is not None
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__version__ = '0.2.20'
|
__version__ = 'v0.3.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user