From d5b28a3bd044ecca1a7f224c8e4cc13c7da98f43 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Fri, 10 Feb 2017 01:34:30 +0100 Subject: [PATCH] Needed to do some small fixes for new request response from plex. Look in plexSearch.py for TODO --- .gitignore | 3 +- html/css/style.css | 87 +++++++++++--------- html/searchDisplay.html | 11 +-- plex/__pycache__/__init__.cpython-34.pyc | Bin 143 -> 143 bytes plex/__pycache__/plexMovies.cpython-34.pyc | Bin 2081 -> 2081 bytes plex/__pycache__/plexSearch.cpython-34.pyc | Bin 1846 -> 1869 bytes plex/__pycache__/tmdb.cpython-34.pyc | Bin 2202 -> 2202 bytes plex/plexSearch.py | 9 +- status/__pycache__/__init__.cpython-34.pyc | Bin 145 -> 145 bytes status/__pycache__/cpuTemp.cpython-34.pyc | Bin 836 -> 836 bytes status/__pycache__/diskusage.cpython-34.pyc | Bin 1062 -> 1062 bytes status/__pycache__/uptime.cpython-34.pyc | Bin 973 -> 973 bytes 12 files changed, 64 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index b3a73e8..390eb4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -v1/flask +plex/__pycache__/ +status/__pycache__/ diff --git a/html/css/style.css b/html/css/style.css index 8906ff5..dc93469 100644 --- a/html/css/style.css +++ b/html/css/style.css @@ -1,45 +1,58 @@ -.onoffswitch { - position: relative; width: 85px; - -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none; +/* The switch - the box around the slider */ +.switch { + position: relative; + display: inline-block; + width: 60px; + height: 34px; } -.onoffswitch-checkbox { - display: none; + +/* Hide default HTML checkbox */ +.switch input {display:none;} + +/* The slider */ +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + -webkit-transition: .4s; + transition: .4s; } -.onoffswitch-label { - display: block; overflow: hidden; cursor: pointer; - border: 2px solid #FFFFFF; border-radius: 20px; + +.slider:before { + position: absolute; + content: ""; + height: 26px; + width: 26px; + left: 4px; + bottom: 4px; + background-color: white; + -webkit-transition: .4s; + transition: .4s; } -.onoffswitch-inner { - display: block; width: 200%; margin-left: -100%; - transition: margin 0.3s ease-in 0s; + +input:checked + .slider { + background-color: #2196F3; } -.onoffswitch-inner:before, .onoffswitch-inner:after { - display: block; float: left; width: 50%; height: 32px; padding: 0; line-height: 32px; - font-size: 12px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; - box-sizing: border-box; + +input:focus + .slider { + box-shadow: 0 0 1px #2196F3; } -.onoffswitch-inner:before { - content: "Movies"; - padding-left: 9px; - background-color: #21D278; color: #FFFFFF; + +input:checked + .slider:before { + -webkit-transform: translateX(26px); + -ms-transform: translateX(26px); + transform: translateX(26px); } -.onoffswitch-inner:after { - content: "Shows"; - padding-right: 9px; - background-color: #EEEEEE; color: #999999; - text-align: right; + +/* Rounded sliders */ +.slider.round { + border-radius: 34px; } -.onoffswitch-switch { - display: block; width: 23px; margin: 4.5px; - background: #FFFFFF; - position: absolute; top: 0; bottom: 0; - right: 49px; - border: 2px solid #FFFFFF; border-radius: 20px; - transition: all 0.3s ease-in 0s; -} -.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { - margin-left: 0; -} -.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { - right: 0px; + +.slider.round:before { + border-radius: 50%; } \ No newline at end of file diff --git a/html/searchDisplay.html b/html/searchDisplay.html index 7d9c1f0..8078918 100644 --- a/html/searchDisplay.html +++ b/html/searchDisplay.html @@ -8,13 +8,10 @@ -
- - -
+

diff --git a/plex/__pycache__/__init__.cpython-34.pyc b/plex/__pycache__/__init__.cpython-34.pyc index 13aa652cac1052aefc5e4f929c3fdf3d88539f71..7ebded1cad51a2c5a8bc5ac94b4c186c99704328 100644 GIT binary patch delta 14 VcmeBY>}OcS1lRxo delta 14 VcmeBY>}OQ9S<+p<#ij`q&Wa7Uj)?v delta 15 WcmZ1|uuy>Q9S<+p;>?X~(i{LL<^*5> diff --git a/plex/__pycache__/plexSearch.cpython-34.pyc b/plex/__pycache__/plexSearch.cpython-34.pyc index f5a8fa90dd1ecbee53052741a37ff034d5843fc1..b7bc0951ef58ad36f33f3fbe309c4fd6a42fd731 100644 GIT binary patch delta 278 zcmdnScb1Rq9S<+pd(OELtsEP<8d(_cPwruHlPh6ns9|NuVqs`zU}$D!U<7ek8B*97 zvY8l)Zcl!|Vqvq9p@y9yi;ba#ouP&UqzI(0u%4lYlOcr*tPaSAsNg_VQCL4Ygf+tQ z7E5tPez_*+E#~5qqFdYrIjI#+iN&d*K|V!H3=9mnSPP0W^Ga^9WEJP<-Qq4TNh~QX zj!(`{Nu7L;wO!j7sH9i{NH8$6F$ys9GVw7AF$ys8Gx9L9F$pqq0ckNHmSQT>n%u|c oC?E?|StJM|L_vhsTP#_{`FWGSvbJmL0_BS3fCK|0 z8>0XtFB2c55EDNm4aYC^AdAY niNDWL^H delta 15 WcmbOwI7^W29S<*8=gf_4Q#b%8f&}9L diff --git a/plex/plexSearch.py b/plex/plexSearch.py index 406765d..3ff407f 100755 --- a/plex/plexSearch.py +++ b/plex/plexSearch.py @@ -3,7 +3,7 @@ # @Author: KevinMidboe # @Date: 2017-02-08 14:00:04 # @Last Modified by: KevinMidboe -# @Last Modified time: 2017-02-08 22:50:17 +# @Last Modified time: 2017-02-10 01:31:43 from requests import get @@ -42,6 +42,12 @@ def getShowInfo(item): return {"title":title, "year":year, "seasons":seasons, "episodes":episodes, "rating":rating, "art":art, "thumb":thumb} +## MAJOR TODO +# Seems to be a change in the return obj. +# This looks way more like json. Need to re-write all this. +# IDEA: Send the size and resolution for comaprison +# No this is for a admin page. OR maybe a github project for +# people wanting to update movies. MAJOR IDEA HERE NOW! :D def plexSearch(query): requestType = "search?" requestQuery = "query=" + str(query) @@ -49,6 +55,7 @@ def plexSearch(query): url = plexBaseURL + requestType + requestQuery response = get(url, headers=header) + print(response.json()) if response.status_code == 200: resContent = response.json() diff --git a/status/__pycache__/__init__.cpython-34.pyc b/status/__pycache__/__init__.cpython-34.pyc index d32e0738767bc74c1fa8df173ee658f4cafce8bd..45ebdc3166dc3f8e8b0da1bb026b2da465227e6f 100644 GIT binary patch delta 14 VcmbQpIFXU<9S<+prF9e8x&a}L1l|Au delta 14 VcmbQpIFXU<9S<*8RnA1VZU7$51VjJ; diff --git a/status/__pycache__/cpuTemp.cpython-34.pyc b/status/__pycache__/cpuTemp.cpython-34.pyc index 39e86a9972f8a67eb80b698f3c12f923079bd938..deffc4004c51bca1f06da7a461d32248ba76ba04 100644 GIT binary patch delta 74 zcmX@Yc7%=X9S<+p<#ij`elapeO=e^&VdR}$##F(`KlweAs0u#=1H&zj`1riU+|>B^ RB32-`h!>UMo2B^ RA~qnmh!2(EpRB delta 15 WcmZ3+v5bT59S<+p!px0q3M>F7oCH|_ diff --git a/status/__pycache__/uptime.cpython-34.pyc b/status/__pycache__/uptime.cpython-34.pyc index 27193e881cca416e378880cf93214249e36d6a89..aa763cbd8abe06c358c005a09996c2881d111a90 100644 GIT binary patch delta 15 XcmX@hewLl>9S<+p<#ij`jxz%QE|>+v delta 15 WcmX@hewLl>9S<+p;>?X~$C&{v9|cVS