Testing #30
@@ -3,7 +3,7 @@ from django.http import HttpResponse
|
|||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
import os
|
import os
|
||||||
import psycopg2
|
#import psycopg2
|
||||||
from apps.cloudmanager.db_interaction import DB_generation,Check_server_supposed_XXX,Give_current_weekday,Give_current_hour
|
from apps.cloudmanager.db_interaction import DB_generation,Check_server_supposed_XXX,Give_current_weekday,Give_current_hour
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import psycopg2
|
#import psycopg2
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.views.decorators.http import require_POST
|
from django.views.decorators.http import require_POST
|
||||||
from apps.kubernetes_connection import apps as kubernetes_connection
|
from apps.kubernetes_connection import apps as kubernetes_connection
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import requests
|
import requests
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from apps.betaserie.utils import betaserieUtils
|
from apps.betaserie.utils import betaserieUtils
|
||||||
|
import random
|
||||||
|
|
||||||
def full_testing(url_website):
|
def full_testing(url_website):
|
||||||
status = "unknown"
|
status = "unknown"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from .models import StreamingRedirectData
|
|||||||
from .utils import randomEpisode,followingEpisode
|
from .utils import randomEpisode,followingEpisode
|
||||||
from apps.betaserie.utils import betaserieUtils
|
from apps.betaserie.utils import betaserieUtils
|
||||||
|
|
||||||
|
|
||||||
betaserie = betaserieUtils()
|
betaserie = betaserieUtils()
|
||||||
|
|
||||||
|
|
||||||
@@ -28,24 +29,18 @@ def streamingRedirect(request,alias):
|
|||||||
|
|
||||||
betaserieShowId = streaming_object.values('betaserieShowId')[0]['betaserieShowId']
|
betaserieShowId = streaming_object.values('betaserieShowId')[0]['betaserieShowId']
|
||||||
|
|
||||||
print(url_prefix)
|
print("Last episode seen:")
|
||||||
|
print("Season: "+str(season))
|
||||||
print(season)
|
print("Episode: "+str(episode))
|
||||||
print(episode)
|
|
||||||
|
|
||||||
|
|
||||||
print(seasonInformation)
|
print(seasonInformation)
|
||||||
|
|
||||||
value = str(streaming_object.values('url_example'))
|
|
||||||
print(value)
|
|
||||||
|
|
||||||
url_example = str(streaming_object.values('url_example')[0]['url_example'])
|
randomViewing = streaming_object.values('randomViewing')[0]['randomViewing']
|
||||||
print(url_example)
|
print("randomViewing: "+str(randomViewing))
|
||||||
|
|
||||||
randomViewing =str(streaming_object.values('randomViewing')[0]['randomViewing'])
|
if (randomViewing == True):
|
||||||
print(randomViewing)
|
|
||||||
|
|
||||||
if (randomViewing == False):
|
|
||||||
print('show set to random')
|
print('show set to random')
|
||||||
boolean_restart = True;
|
boolean_restart = True;
|
||||||
while (boolean_restart):
|
while (boolean_restart):
|
||||||
@@ -53,15 +48,13 @@ def streamingRedirect(request,alias):
|
|||||||
episode_number = "S"+str(season)+"E"+str(episode)
|
episode_number = "S"+str(season)+"E"+str(episode)
|
||||||
|
|
||||||
episode_id,episode_seen = betaserie.identify_episode(betaserieShowId,episode_number)
|
episode_id,episode_seen = betaserie.identify_episode(betaserieShowId,episode_number)
|
||||||
|
print("episode_seen: "+str(episode_seen))
|
||||||
|
|
||||||
if not(episode_seen):
|
if not(episode_seen):
|
||||||
boolean_restart = False
|
boolean_restart = False
|
||||||
else:
|
else:
|
||||||
print("episode "+str(episode)+" from season "+str(season)+" already seen")
|
print("episode "+str(episode)+" from season "+str(season)+" already seen")
|
||||||
|
|
||||||
|
|
||||||
#tests
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print('show set to following episode')
|
print('show set to following episode')
|
||||||
season,episode,lastEpisode = followingEpisode(season,episode,seasonInformation,maximumNumberSeason)
|
season,episode,lastEpisode = followingEpisode(season,episode,seasonInformation,maximumNumberSeason)
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
.djangoql-completion {
|
||||||
|
position: absolute;
|
||||||
|
display: none;
|
||||||
|
border: solid 1px #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: white;
|
||||||
|
background: var(--body-bg, white);
|
||||||
|
min-width: 183px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-completion .active {
|
||||||
|
background-color: #79aec8;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-completion ul {
|
||||||
|
padding: 2px 0;
|
||||||
|
margin: 0;
|
||||||
|
max-height: 295px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-completion li {
|
||||||
|
list-style: none;
|
||||||
|
padding: 4px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-completion li:hover {
|
||||||
|
background-color: #c4e9fa;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-completion li i {
|
||||||
|
font-size: 0.9em;
|
||||||
|
color: #ccc;
|
||||||
|
float: right;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-completion .syntax-help {
|
||||||
|
padding: 4px 10px 6px 10px;
|
||||||
|
margin: 0;
|
||||||
|
border-top: solid 1px #ccc;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Pure CSS loading icon. Credit: https://loading.io/css/
|
||||||
|
*/
|
||||||
|
.djangoql-loading {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-loading:after {
|
||||||
|
-moz-animation: djangoql-loading 1.2s linear infinite;
|
||||||
|
-ms-animation: djangoql-loading 1.2s linear infinite;
|
||||||
|
-webkit-animation: djangoql-loading 1.2s linear infinite;
|
||||||
|
animation: djangoql-loading 1.2s linear infinite;
|
||||||
|
border: 2px solid #aaa;
|
||||||
|
border-color: #aaa transparent #aaa transparent;
|
||||||
|
border-radius: 50%;
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
height: 12px;
|
||||||
|
left: 50%;
|
||||||
|
margin: -8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
width: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes djangoql-loading {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*# sourceMappingURL=completion.css.map*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["webpack:///./node_modules/djangoql-completion/dist/completion.css"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,aAAa;EACb,sBAAsB;EACtB,kBAAkB;EAClB,iBAAiB;EACjB,iCAAiC;EACjC,gBAAgB;EAChB,eAAe;AACjB;;AAEA;EACE,yBAAyB;EACzB,YAAY;AACd;;AAEA;EACE,cAAc;EACd,SAAS;EACT,iBAAiB;EACjB,cAAc;AAChB;;AAEA;EACE,gBAAgB;EAChB,iBAAiB;EACjB,eAAe;AACjB;;AAEA;EACE,yBAAyB;EACzB,YAAY;AACd;;AAEA;EACE,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,0BAA0B;EAC1B,SAAS;EACT,0BAA0B;EAC1B,kBAAkB;AACpB;;AAEA;;CAEC;AACD;EACE,cAAc;EACd,kBAAkB;AACpB;;AAEA;EACE,qDAAqD;EACrD,oDAAoD;EACpD,wDAAwD;EACxD,gDAAgD;EAChD,sBAAsB;EACtB,+CAA+C;EAC/C,kBAAkB;EAClB,YAAY;EACZ,cAAc;EACd,YAAY;EACZ,SAAS;EACT,YAAY;EACZ,kBAAkB;EAClB,QAAQ;EACR,WAAW;AACb;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;AACF","file":"css/completion.css","sourcesContent":[".djangoql-completion {\n position: absolute;\n display: none;\n border: solid 1px #ccc;\n border-radius: 4px;\n background: white;\n background: var(--body-bg, white);\n min-width: 183px;\n font-size: 13px;\n}\n\n.djangoql-completion .active {\n background-color: #79aec8;\n color: white;\n}\n\n.djangoql-completion ul {\n padding: 2px 0;\n margin: 0;\n max-height: 295px;\n overflow: auto;\n}\n\n.djangoql-completion li {\n list-style: none;\n padding: 4px 10px;\n cursor: pointer;\n}\n\n.djangoql-completion li:hover {\n background-color: #c4e9fa;\n color: black;\n}\n\n.djangoql-completion li i {\n font-size: 0.9em;\n color: #ccc;\n float: right;\n font-style: normal;\n}\n\n.djangoql-completion .syntax-help {\n padding: 4px 10px 6px 10px;\n margin: 0;\n border-top: solid 1px #ccc;\n font-size: inherit;\n}\n\n/*\nPure CSS loading icon. Credit: https://loading.io/css/\n*/\n.djangoql-loading {\n display: block;\n position: relative;\n}\n\n.djangoql-loading:after {\n -moz-animation: djangoql-loading 1.2s linear infinite;\n -ms-animation: djangoql-loading 1.2s linear infinite;\n -webkit-animation: djangoql-loading 1.2s linear infinite;\n animation: djangoql-loading 1.2s linear infinite;\n border: 2px solid #aaa;\n border-color: #aaa transparent #aaa transparent;\n border-radius: 50%;\n content: \" \";\n display: block;\n height: 12px;\n left: 50%;\n margin: -8px;\n position: absolute;\n top: 50%;\n width: 12px;\n}\n\n@keyframes djangoql-loading {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n"],"sourceRoot":""}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#changelist #toolbar form textarea#searchbar {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-toggle {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djangoql-help {
|
||||||
|
display: inline-block;
|
||||||
|
float: right;
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.djangoql-help {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.djangoql-help {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix::after {
|
||||||
|
content: "";
|
||||||
|
clear: both;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
code {
|
||||||
|
background-color: rgba(27, 31, 35, 0.05);
|
||||||
|
padding: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: rgba(27, 31, 35, 0.05);
|
||||||
|
padding: 5px 40px;
|
||||||
|
margin: 0 0 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 89 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,113 @@
|
|||||||
|
(function (DjangoQL) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function parseQueryString() {
|
||||||
|
var qs = window.location.search.substring(1);
|
||||||
|
var result = {};
|
||||||
|
var vars = qs.split('&');
|
||||||
|
var i;
|
||||||
|
var l = vars.length;
|
||||||
|
var pair;
|
||||||
|
var key;
|
||||||
|
for (i = 0; i < l; i++) {
|
||||||
|
pair = vars[i].split('=');
|
||||||
|
key = decodeURIComponent(pair[0]);
|
||||||
|
if (key) {
|
||||||
|
if (typeof result[key] !== 'undefined') {
|
||||||
|
if (({}).toString.call(result[key]) !== '[object Array]') {
|
||||||
|
result[key] = [result[key]];
|
||||||
|
}
|
||||||
|
result[key].push(decodeURIComponent(pair[1]));
|
||||||
|
} else {
|
||||||
|
result[key] = decodeURIComponent(pair[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Replace standard search input with textarea and add completion toggle
|
||||||
|
DjangoQL.DOMReady(function () {
|
||||||
|
// use '-' in the param name to prevent conflicts with any model field name
|
||||||
|
var QLParamName = 'q-l';
|
||||||
|
var QLEnabled;
|
||||||
|
var QLEnabledInURL;
|
||||||
|
var QLInput;
|
||||||
|
var QLToggle;
|
||||||
|
var QLPlaceholder = 'Advanced search with Query Language';
|
||||||
|
var originalPlaceholder;
|
||||||
|
var textarea;
|
||||||
|
var input = document.querySelector('input[name=q]');
|
||||||
|
var djangoQL;
|
||||||
|
|
||||||
|
if (!input) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
originalPlaceholder = input.placeholder;
|
||||||
|
|
||||||
|
QLEnabledInURL = parseQueryString()[QLParamName];
|
||||||
|
if (QLEnabledInURL === 'on') {
|
||||||
|
QLEnabled = true;
|
||||||
|
} else if (QLEnabledInURL === 'off') {
|
||||||
|
QLEnabled = false;
|
||||||
|
} else {
|
||||||
|
QLEnabled = Boolean(DjangoQL._toggleOnByDefault);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCompletionToggle(e) {
|
||||||
|
if (e.target.checked) {
|
||||||
|
djangoQL.enableCompletion();
|
||||||
|
QLInput.value = 'on';
|
||||||
|
textarea.placeholder = QLPlaceholder;
|
||||||
|
textarea.focus();
|
||||||
|
djangoQL.popupCompletion();
|
||||||
|
} else {
|
||||||
|
djangoQL.disableCompletion();
|
||||||
|
QLInput.value = 'off';
|
||||||
|
textarea.placeholder = originalPlaceholder;
|
||||||
|
textarea.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DjangoQL._enableToggle) {
|
||||||
|
QLInput = document.querySelector('input[name=' + QLParamName + ']');
|
||||||
|
if (!QLInput) {
|
||||||
|
QLInput = document.createElement('input');
|
||||||
|
QLInput.type = 'hidden';
|
||||||
|
input.parentNode.insertBefore(QLInput, input);
|
||||||
|
}
|
||||||
|
QLInput.name = QLParamName;
|
||||||
|
QLInput.value = QLEnabled ? 'on' : 'off';
|
||||||
|
|
||||||
|
QLToggle = document.createElement('input');
|
||||||
|
QLToggle.type = 'checkbox';
|
||||||
|
QLToggle.checked = QLEnabled;
|
||||||
|
QLToggle.className = 'djangoql-toggle';
|
||||||
|
QLToggle.title = QLPlaceholder;
|
||||||
|
QLToggle.onchange = onCompletionToggle;
|
||||||
|
input.parentNode.insertBefore(QLToggle, input);
|
||||||
|
} else {
|
||||||
|
QLEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea = document.createElement('textarea');
|
||||||
|
textarea.value = input.value;
|
||||||
|
textarea.id = input.id;
|
||||||
|
textarea.name = input.name;
|
||||||
|
textarea.rows = 1;
|
||||||
|
textarea.placeholder = QLEnabled ? QLPlaceholder : originalPlaceholder;
|
||||||
|
textarea.setAttribute('maxlength', 2000);
|
||||||
|
input.parentNode.insertBefore(textarea, input);
|
||||||
|
|
||||||
|
input.parentNode.removeChild(input);
|
||||||
|
textarea.focus();
|
||||||
|
|
||||||
|
djangoQL = new DjangoQL({
|
||||||
|
completionEnabled: QLEnabled,
|
||||||
|
introspections: 'introspect/',
|
||||||
|
syntaxHelp: 'djangoql-syntax/',
|
||||||
|
selector: 'textarea[name=q]',
|
||||||
|
autoResize: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}(window.DjangoQL));
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
(function (DjangoQL) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
DjangoQL._enableToggle = true;
|
||||||
|
DjangoQL._toggleOnByDefault = true;
|
||||||
|
}(window.DjangoQL));
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
(function (DjangoQL) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
DjangoQL._toggleOnByDefault = false;
|
||||||
|
}(window.DjangoQL));
|
||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
django
|
django
|
||||||
xrequests
|
psycopg2
|
||||||
|
#xrequests
|
||||||
kubernetes
|
kubernetes
|
||||||
ruamel.yaml
|
ruamel.yaml
|
||||||
pyyaml
|
pyyaml
|
||||||
|
|||||||
Reference in New Issue
Block a user