From e4fef8297e5de01efe838e6c536f7412abce08cc Mon Sep 17 00:00:00 2001 From: dazedcrazy Date: Wed, 16 May 2018 18:33:43 +0100 Subject: [PATCH 1/2] contextmenu changes --- resources/lib/context_entry.py | 2 +- .../script-emby-connect-login-manual.xml | 145 --------- .../1080i/script-emby-connect-login.xml | 179 ----------- .../script-emby-connect-server-manual.xml | 154 ---------- .../1080i/script-emby-connect-server.xml | 280 ------------------ .../1080i/script-emby-connect-users.xml | 198 ------------- ...by-context.xml => script-plex-context.xml} | 14 +- resources/skins/default/media/logo-white.png | Bin 2078 -> 0 bytes .../{emby-bg-fade.png => plex-bg-fade.png} | Bin .../media/{emby-icon.png => plex-icon.png} | Bin resources/skins/default/media/plex-logo.png | Bin 0 -> 6172 bytes ...{emby-separator.png => plex-separator.png} | Bin .../skins/default/media/qrcode_disclaimer.png | Bin 7694 -> 0 bytes 13 files changed, 8 insertions(+), 964 deletions(-) delete mode 100644 resources/skins/default/1080i/script-emby-connect-login-manual.xml delete mode 100644 resources/skins/default/1080i/script-emby-connect-login.xml delete mode 100644 resources/skins/default/1080i/script-emby-connect-server-manual.xml delete mode 100644 resources/skins/default/1080i/script-emby-connect-server.xml delete mode 100644 resources/skins/default/1080i/script-emby-connect-users.xml rename resources/skins/default/1080i/{script-emby-context.xml => script-plex-context.xml} (92%) delete mode 100644 resources/skins/default/media/logo-white.png rename resources/skins/default/media/{emby-bg-fade.png => plex-bg-fade.png} (100%) rename resources/skins/default/media/{emby-icon.png => plex-icon.png} (100%) create mode 100644 resources/skins/default/media/plex-logo.png rename resources/skins/default/media/{emby-separator.png => plex-separator.png} (100%) delete mode 100644 resources/skins/default/media/qrcode_disclaimer.png diff --git a/resources/lib/context_entry.py b/resources/lib/context_entry.py index fa5fd414..b38b27ae 100644 --- a/resources/lib/context_entry.py +++ b/resources/lib/context_entry.py @@ -115,7 +115,7 @@ class ContextMenu(object): # Addon settings options.append(OPTIONS['Addon']) context_menu = context.ContextMenu( - "script-emby-context.xml", + "script-plex-context.xml", Addon('plugin.video.plexkodiconnect').getAddonInfo('path'), "default", "1080i") diff --git a/resources/skins/default/1080i/script-emby-connect-login-manual.xml b/resources/skins/default/1080i/script-emby-connect-login-manual.xml deleted file mode 100644 index 57e4a88a..00000000 --- a/resources/skins/default/1080i/script-emby-connect-login-manual.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - 200 - 0 - dialogeffect - - - Background fade - 100% - 100% - emby-bg-fade.png - - - - 600 - 35% - 20% - - Background box - white.png - 600 - 480 - - - - 485 - False - - Error box - white.png - 100% - 50 - - - - Error message - white - font10 - center - center - 50 - - - - - Emby logo - logo-white.png - keep - 120 - 49 - 30 - 25 - - - - 500 - 50 - - Please sign in - - white - font12 - top - center - 100% - 100 - - - - 150 - - Username - - ffa6a6a6 - font10 - top - - - - separator - 102% - 0.5 - 66 - -10 - emby-separator.png - - - - - Password - 225 - - Password label - - ffa6a6a6 - font10 - top - - - - separator - 102% - 0.5 - 66 - -10 - emby-separator.png - - - - - Buttons - 335 - - Sign in - box.png - box.png - - font10 - ffa6a6a6 - white - center - 100% - 50 - 201 - - - - Cancel - box.png - box.png - - font10 - ffa6a6a6 - white - center - 100% - 50 - 55 - 200 - - - - - - \ No newline at end of file diff --git a/resources/skins/default/1080i/script-emby-connect-login.xml b/resources/skins/default/1080i/script-emby-connect-login.xml deleted file mode 100644 index cb69387c..00000000 --- a/resources/skins/default/1080i/script-emby-connect-login.xml +++ /dev/null @@ -1,179 +0,0 @@ - - - 200 - 0 - dialogeffect - - - Background fade - 100% - 100% - emby-bg-fade.png - - - - 600 - 35% - 15% - - Background box - white.png - 600 - 700 - - - - 705 - False - - Error box - white.png - 100% - 50 - - - - Error message - white - font10 - center - center - 50 - - - - - Emby logo - logo-white.png - 160 - 49 - 30 - 25 - - - - 500 - 50 - - Sign in emby connect - - white - font12 - top - 115 - - - - 190 - - Username email - - ffa6a6a6 - font10 - top - - - - separator - 102% - 0.5 - 66 - -10 - emby-separator.png - - - - - Password - 275 - - Password label - - ffa6a6a6 - font10 - top - - - - separator - 102% - 0.5 - 66 - -10 - emby-separator.png - - - - - Buttons - 385 - - Sign in - box.png - box.png - - font10 - ffa6a6a6 - white - center - 100% - 50 - 201 - - - - Cancel - box.png - box.png - - font10 - ffa6a6a6 - white - center - 100% - 50 - 55 - 200 - - - - - Disclaimer - 510 - - Disclaimer label - - font10 - ff464646 - true - top - 340 - 100% - - - - - Scan me - - font12 - ff0b8628 - top - 200 - 120 - 230 - - - - qrcode - qrcode_disclaimer.png - 140 - 140 - 10 - 360 - - - - - - - \ No newline at end of file diff --git a/resources/skins/default/1080i/script-emby-connect-server-manual.xml b/resources/skins/default/1080i/script-emby-connect-server-manual.xml deleted file mode 100644 index 27e50037..00000000 --- a/resources/skins/default/1080i/script-emby-connect-server-manual.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - 200 - 0 - dialogeffect - - - Background fade - 100% - 100% - emby-bg-fade.png - - - - 600 - 35% - 20% - - Background box - white.png - 600 - 525 - - - - 530 - False - - Error box - white.png - 100% - 50 - - - - Error message - white - font10 - center - center - 50 - - - - - Emby logo - logo-white.png - keep - 120 - 49 - 30 - 25 - - - - 500 - 50 - - Connect to server - - white - font12 - top - center - 100% - 100 - - - - 150 - - Host - - ffa6a6a6 - font10 - top - - - - separator - 102% - 0.5 - 66 - -10 - emby-separator.png - - - - Host example - - ff464646 - font10 - top - 70 - - - - - Port - 275 - - Port label - - ffa6a6a6 - font10 - top - - - - separator - 102% - 0.5 - 66 - -10 - emby-separator.png - - - - - Buttons - 380 - - Connect - box.png - box.png - - font10 - ffa6a6a6 - white - center - 100% - 50 - 201 - - - - Cancel - box.png - box.png - - font10 - ffa6a6a6 - white - center - 100% - 50 - 55 - 200 - - - - - - \ No newline at end of file diff --git a/resources/skins/default/1080i/script-emby-connect-server.xml b/resources/skins/default/1080i/script-emby-connect-server.xml deleted file mode 100644 index bc751e8c..00000000 --- a/resources/skins/default/1080i/script-emby-connect-server.xml +++ /dev/null @@ -1,280 +0,0 @@ - - - 205 - 0 - dialogeffect - - - Background fade - 100% - 100% - emby-bg-fade.png - - - - 450 - 38% - 15% - - Background box - white.png - 450 - 710 - - - - Emby logo - logo-white.png - keep - 120 - 49 - 30 - 25 - - - - User info - 70 - 350 - 50 - - User image - userflyoutdefault.png - keep - center - 100% - 70 - 40 - - - - Busy animation - center - 23 - 100% - 105 - False - fading_circle.png - keep - conditional - - - - Welcome user - white - font12 - center - top - 120 - 100% - 50 - - - - separator - 102% - 0.5 - 165 - -10 - emby-separator.png - - - - Select server - ffa6a6a6 - - font10 - center - top - 170 - 100% - 50 - - - - - 290 - 100% - 184 - - Connect servers - 0 - 100% - 100% - 10 - 55 - 155 - 205 - 206 - 205 - 206 - 155 - 60 - 250 - - - 45 - 45 - - Network - keep - network.png - StringCompare(ListItem.Property(server_type),network) - - - Wifi - keep - wifi.png - StringCompare(ListItem.Property(server_type),wifi) - - - - - 300 - 40 - 55 - font10 - center - ff838383 - ListItem.Label - - - - - 45 - 45 - - Network - keep - network.png - StringCompare(ListItem.Property(server_type),network) - - - Wifi - keep - wifi.png - StringCompare(ListItem.Property(server_type),wifi) - - - - - 300 - 40 - 55 - font10 - center - white - ListItem.Label - Control.HasFocus(155) - - - 300 - 40 - 55 - font10 - center - ff838383 - ListItem.Label - !Control.HasFocus(155) - - - - - - 395 - 10 - 5 - 100% - 155 - 60 - 60 - box.png - box.png - box.png - false - - - - 100% - 220 - - 45 - 150 - - True - Sign in Connect - box.png - box.png - - font10 - ffa6a6a6 - white - center - 350 - 50 - 50 - 155 - 206 - - - - Manually add server - box.png - box.png - - font10 - ffa6a6a6 - white - center - 55 - 350 - 50 - 50 - 205 - 155 - 201 - - - - Cancel - box.png - box.png - - font10 - ffa6a6a6 - white - center - 110 - 350 - 50 - 50 - 206 - - - - - 100% - False - - Message box - white.png - 100% - 50 - 20 - - - - Message - white - font10 - center - center - 50 - 20 - - - - - - - \ No newline at end of file diff --git a/resources/skins/default/1080i/script-emby-connect-users.xml b/resources/skins/default/1080i/script-emby-connect-users.xml deleted file mode 100644 index 0acd2b32..00000000 --- a/resources/skins/default/1080i/script-emby-connect-users.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - 155 - 0 - dialogeffect - - - Background fade - 100% - 100% - emby-bg-fade.png - - - - 715 - 32% - 20% - - Background box - white.png - 100% - 525 - - - - Emby logo - logo-white.png - keep - 120 - 49 - 30 - 25 - - - - Please sign in - - white - font12 - top - center - 80 - 100% - - - - 100 - 620 - 245 - 50 - - Select User - 0 - 100% - 40 - 155 - 155 - 200 - 60 - horizontal - 250 - - - 150 - - User image - ff888888 - ListItem.Icon - keep - 100% - 150 - - - - Background label - white.png - 100% - 50 - 150 - - - - 100% - center - 50 - 150 - font10 - white - ListItem.Label - - - - - - 150 - - User image - ListItem.Icon - keep - 100% - 150 - Control.HasFocus(155) - - - User image - ff888888 - ListItem.Icon - keep - 100% - 150 - !Control.HasFocus(155) - - - - Background label - white.png - 100% - 50 - 150 - Control.HasFocus(155) - - - Background label - white.png - 100% - 50 - 150 - !Control.HasFocus(155) - - - - 100% - center - 50 - 150 - font10 - white - ListItem.Label - - - - - - - 100% - 615 - 5 - 155 - 60 - 60 - box.png - box.png - box.png - false - horizontal - - - - 615 - 325 - 100% - - - Manual Login button - box.png - box.png - - center - 100% - 50 - 35 - font10 - ffa6a6a6 - white - 201 - 155 - - - - Cancel - box.png - box.png - - font10 - ffa6a6a6 - white - center - 100% - 50 - 90 - 200 - - - - - - - \ No newline at end of file diff --git a/resources/skins/default/1080i/script-emby-context.xml b/resources/skins/default/1080i/script-plex-context.xml similarity index 92% rename from resources/skins/default/1080i/script-emby-context.xml rename to resources/skins/default/1080i/script-plex-context.xml index df4f0588..380f2a9a 100644 --- a/resources/skins/default/1080i/script-emby-context.xml +++ b/resources/skins/default/1080i/script-plex-context.xml @@ -8,7 +8,7 @@ Background fade 100% 100% - emby-bg-fade.png + plex-bg-fade.png @@ -22,12 +22,12 @@ - Emby logo - emby-icon.png + Plex logo + plex-logo.png keep - 30 + 34 20 - 370 + -285 @@ -36,7 +36,7 @@ keep 34 20 - 285 + 370 @@ -45,7 +45,7 @@ 0.5 70 -5 - emby-separator.png + plex-separator.png diff --git a/resources/skins/default/media/logo-white.png b/resources/skins/default/media/logo-white.png deleted file mode 100644 index c4cf11a339ec332b2b29d290ede3236af7d0bb9a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2078 zcmbW2dpHx`AIB$^%g->kNUMJx@>1_xt_*^E=NupYxp8dB4y3Jm-(|iFYK}0i{)? z0RR9HheeaN=C-Y2At}BUCq`cF1OUV+j(9R=Yq{}18mY=*Yv)J&yW}7F7W}pUYX71C zi|ZfZ-|zaB{2!JdY5X+)%;6{bi(qqe)4IfrTz%|(y$7`LAiffPn5}D9W=Z5?%{WHS zXBzw(FIYT2@_t1a-0Xk1mvOV>s!OfY$8U>$!XEZ$LBUAg{oyRnIye5(*x08x{lZ?> zK=Oy>9Z_3v?fM6aa2#Nt;jwmO81(s-inM4^rVJK)Z12W9abpru30RcK*gMUMS`>_S z`<;|n7#wJ+L5RZH4NYsY$X^ly@DsNTU>Piq&kvAv+yrl*7m zeef_n6u+(q7NlGZ93EWaNZz5h*YDk>FWg36*9B8qGA<{esKz4j9YeRAv1kSnvq%f4 zj0lc1zng%&Tk`cxjnp#sbl(0$NAK+zjjXStQ2-#*a=6?sS%awZoVMan&a*;9-imnb}{)I{;xR0Z|J=xgAk|qlBf#bd$&<*F(~uv zK(JB8{kX9_;dGalSQ&9Xx*3ss+L<0Y&XxUYIuRLB>E);KQtN8Q?ykl{-qH5Llo&Bl zR??|Nbd*%94b1(!!rV8d?KKMp0X37}Lc#3pY}!Wl&8GB6%S^;0V^9)ZY{UMfO7WKf zGr)ctT#Ueba^w6#^)v%ae#aYPX-G}IP)kLd@u>^1V~LXj`OmWB^e$W7cI@4~TTj%% zN_R#z$3{#XvF9<`cUIPt834cY)nB=~fe1dIq-i{PS#jDrL~Q_V-1&qal;ni^=6S%{ zY*5}vnngW`hWHe-jBw=%?t>16?kefN4^|vuC!QuEI!PYN>4hs6mYq-$K+zS`oc;Mu zdQ+bKWCXP|IpLx)#y7S*FFgsJYK@a`k%kZ^#_wWYczQw1m4ko~vyF_eaOiL6!&u<0 ziK!@EO7}gk?GK!ZTFr-bO7(@&lC_PtAm)8j+CM* z*rBYJeCEOX%}s7Id^)l8h@3wYthkVjMy+{14Q6sVlCi74RWqV-q;HO_D_vo=@B`xl zn{Ich+f*kp#)?}7ERL!A{IMQr*NkAaz0oMGRs&Av{w}ld3c)?1^U~SE?o8ddm5SQTtV%GZh zp>?l83DIBVyUfoeSdCUEilx>)jDOnZ{O2xJ^(X=Du}}Re(6rbAMXRfqtxS9PfUIV&8K%>r9;c<1)0@9TqiD&$qY-q~Ct zSFm96h7orbTpnW4fB?6I*(P6k(Ko-Z4}%V%AWe~FeL6X2s2CY@g2{m?dmP`Aw|y9< zEn#?>=j1nAB=g2? z@a%On=?XpEQX4ea1pMs7z+ni7XzYWpql%e!)O_@QxUi4mV@lHnpS+>UpsylHqTZu2ewVbA@0(>F}61&#J?Kd~scW~%O@WcapzVV}qk z3F|x~MMZf{4TNc`oCq)7`YQLxZIAov+GVcYAhK#)ZXb;d7d>dz&7Il*sRz1A)f|Z| zjzwT-t<4_6ctVSNZQsU`N(H_KIt)o13H+>{oBXR5Y}4*-WDpi59^ Gqy7tcn@nr~ diff --git a/resources/skins/default/media/emby-bg-fade.png b/resources/skins/default/media/plex-bg-fade.png similarity index 100% rename from resources/skins/default/media/emby-bg-fade.png rename to resources/skins/default/media/plex-bg-fade.png diff --git a/resources/skins/default/media/emby-icon.png b/resources/skins/default/media/plex-icon.png similarity index 100% rename from resources/skins/default/media/emby-icon.png rename to resources/skins/default/media/plex-icon.png diff --git a/resources/skins/default/media/plex-logo.png b/resources/skins/default/media/plex-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..7c824d35e28c52319ada468b2e8b811a6aa270fd GIT binary patch literal 6172 zcmbVQ2|Sc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J_9T5md>5uLVkBn8sw% zXb<9Zpk6%L)29yqiB!KHm+A_VlLv<^OZgP3lD+0c)%H{%sCwpO(kvMEh*xVpkpKPY8HCbG+k>=dKP?f!nf5l z6&=V930(lH7c456S#>h$TI#)dz^JDcBrL489#5>-$L?<>eTR|; zHlxt+e*h`{Z!e*UoNpJ@-w)M;i{_G!$y!QC4dmD!nx)Aap8RJY`gZt@p{i zMe8hL=P9NlH6D0HZaqz-w@!w^`Q*}Lk>$_Yus&JrZqszGttO#zQbVyKCS4m9 z!t~D~+IBdC_GyV0w7d5zT6M4}2YUmP%+#}%=^HR8?6KUxY-Mu9G6M>bq^?BWx5#^m zUq-8ox4OH6+c!1(lC(jDN%F%rhdmTI;%1GCLQz^WN_-Zr*^^8|Q-%8?Myn6|Nzl6v&Gio$CL{ zlz$aq=G+~P)VkSwHM4NR)>5)~O#jGS9DdEI?$Zw@WO<4ug_XvG$`I1yh@bz!T*69u_A(Dx=!41qg0sixWm(# zZPvyL#uGs!k#3%{7?7%ALoh^$&KqWa)8gmv+~lr3&ZOs-(_|cxT@(w8i(y&avN{6ho$Hl7gE=7_?WK7 zihvy}nzbyK-8>pe`A6CazOALi-}f>3BM!g%?>s|evb=SFUsQd!GPLDy0z6^{;hxUY z@Hc8fK5oTBHq2TcXP~^2O1!5_ootue8n>LWUaZ Date: Thu, 17 May 2018 04:01:40 +0100 Subject: [PATCH 2/2] contextmenu changes --- resources/lib/{dialogs => }/context.py | 0 resources/lib/context_entry.py | 24 +-- resources/lib/dialogs/__init__.py | 6 - resources/lib/dialogs/loginconnect.py | 136 ---------------- resources/lib/dialogs/loginmanual.py | 145 ------------------ resources/lib/dialogs/serverconnect.py | 145 ------------------ resources/lib/dialogs/servermanual.py | 145 ------------------ resources/lib/dialogs/usersconnect.py | 104 ------------- .../default/1080i/script-plex-context.xml | 4 +- .../media/{plex-bg-fade.png => bg-fade.png} | Bin .../{plex-separator.png => separator.png} | Bin 11 files changed, 5 insertions(+), 704 deletions(-) rename resources/lib/{dialogs => }/context.py (100%) delete mode 100644 resources/lib/dialogs/__init__.py delete mode 100644 resources/lib/dialogs/loginconnect.py delete mode 100644 resources/lib/dialogs/loginmanual.py delete mode 100644 resources/lib/dialogs/serverconnect.py delete mode 100644 resources/lib/dialogs/servermanual.py delete mode 100644 resources/lib/dialogs/usersconnect.py rename resources/skins/default/media/{plex-bg-fade.png => bg-fade.png} (100%) rename resources/skins/default/media/{plex-separator.png => separator.png} (100%) diff --git a/resources/lib/dialogs/context.py b/resources/lib/context.py similarity index 100% rename from resources/lib/dialogs/context.py rename to resources/lib/context.py diff --git a/resources/lib/context_entry.py b/resources/lib/context_entry.py index b38b27ae..994913fc 100644 --- a/resources/lib/context_entry.py +++ b/resources/lib/context_entry.py @@ -6,10 +6,10 @@ from xbmcaddon import Addon import xbmc import xbmcplugin import xbmcgui +import context import plexdb_functions as plexdb from utils import window, settings, dialog, language as lang -from dialogs import context import PlexFunctions as PF from PlexAPI import API import playqueue as PQ @@ -96,18 +96,7 @@ class ContextMenu(object): options.append(OPTIONS['PMS_Play']) if self.kodi_type in v.KODI_VIDEOTYPES: options.append(OPTIONS['Transcode']) - # userdata = self.api.userdata() - # if userdata['Favorite']: - # # Remove from emby favourites - # options.append(OPTIONS['RemoveFav']) - # else: - # # Add to emby favourites - # options.append(OPTIONS['AddFav']) - # if self.kodi_type == "song": - # # Set custom song rating - # options.append(OPTIONS['RateSong']) - # Refresh item - # options.append(OPTIONS['Refresh']) + # Delete item, only if the Plex Home main user is logged in if (window('plex_restricteduser') != 'true' and window('plex_allows_mediaDeletion') == 'true'): @@ -137,14 +126,7 @@ class ContextMenu(object): self._PMS_play() elif selected == OPTIONS['Extras']: self._extras() - # elif selected == OPTIONS['Refresh']: - # self.emby.refreshItem(self.item_id) - # elif selected == OPTIONS['AddFav']: - # self.emby.updateUserRating(self.item_id, favourite=True) - # elif selected == OPTIONS['RemoveFav']: - # self.emby.updateUserRating(self.item_id, favourite=False) - # elif selected == OPTIONS['RateSong']: - # self._rate_song() + elif selected == OPTIONS['Addon']: xbmc.executebuiltin( 'Addon.OpenSettings(plugin.video.plexkodiconnect)') diff --git a/resources/lib/dialogs/__init__.py b/resources/lib/dialogs/__init__.py deleted file mode 100644 index 92c6f42a..00000000 --- a/resources/lib/dialogs/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# Dummy file to make this directory a package. -# from serverconnect import ServerConnect -# from usersconnect import UsersConnect -# from loginconnect import LoginConnect -# from loginmanual import LoginManual -# from servermanual import ServerManual diff --git a/resources/lib/dialogs/loginconnect.py b/resources/lib/dialogs/loginconnect.py deleted file mode 100644 index db7c39cc..00000000 --- a/resources/lib/dialogs/loginconnect.py +++ /dev/null @@ -1,136 +0,0 @@ -# -*- coding: utf-8 -*- - -################################################################################################## - -import logging -import os - -import xbmcgui -import xbmcaddon - -from utils import language as lang - -################################################################################################## - -log = logging.getLogger("EMBY."+__name__) -addon = xbmcaddon.Addon('plugin.video.emby') - -ACTION_PARENT_DIR = 9 -ACTION_PREVIOUS_MENU = 10 -ACTION_BACK = 92 -SIGN_IN = 200 -CANCEL = 201 -ERROR_TOGGLE = 202 -ERROR_MSG = 203 -ERROR = { - 'Invalid': 1, - 'Empty': 2 -} - -################################################################################################## - - -class LoginConnect(xbmcgui.WindowXMLDialog): - - _user = None - error = None - - - def __init__(self, *args, **kwargs): - - xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) - - def set_connect_manager(self, connect_manager): - self.connect_manager = connect_manager - - def is_logged_in(self): - return True if self._user else False - - def get_user(self): - return self._user - - - def onInit(self): - - self.user_field = self._add_editcontrol(725, 385, 40, 500) - self.setFocus(self.user_field) - self.password_field = self._add_editcontrol(725, 470, 40, 500, password=1) - self.signin_button = self.getControl(SIGN_IN) - self.remind_button = self.getControl(CANCEL) - self.error_toggle = self.getControl(ERROR_TOGGLE) - self.error_msg = self.getControl(ERROR_MSG) - - self.user_field.controlUp(self.remind_button) - self.user_field.controlDown(self.password_field) - self.password_field.controlUp(self.user_field) - self.password_field.controlDown(self.signin_button) - self.signin_button.controlUp(self.password_field) - self.remind_button.controlDown(self.user_field) - - def onClick(self, control): - - if control == SIGN_IN: - # Sign in to emby connect - self._disable_error() - - user = self.user_field.getText() - password = self.password_field.getText() - - if not user or not password: - # Display error - self._error(ERROR['Empty'], lang(30608)) - log.error("Username or password cannot be null") - - elif self._login(user, password): - self.close() - - elif control == CANCEL: - # Remind me later - self.close() - - def onAction(self, action): - - if (self.error == ERROR['Empty'] - and self.user_field.getText() and self.password_field.getText()): - self._disable_error() - - if action in (ACTION_BACK, ACTION_PARENT_DIR, ACTION_PREVIOUS_MENU): - self.close() - - def _add_editcontrol(self, x, y, height, width, password=0): - - media = os.path.join(addon.getAddonInfo('path'), 'resources', 'skins', 'default', 'media') - control = xbmcgui.ControlEdit(0, 0, 0, 0, - label="User", - font="font10", - textColor="ff525252", - focusTexture=os.path.join(media, "button-focus.png"), - noFocusTexture=os.path.join(media, "button-focus.png"), - isPassword=password) - control.setPosition(x, y) - control.setHeight(height) - control.setWidth(width) - - self.addControl(control) - return control - - def _login(self, username, password): - - result = self.connect_manager.loginToConnect(username, password) - if result is False: - self._error(ERROR['Invalid'], lang(33009)) - return False - else: - self._user = result - return True - - def _error(self, state, message): - - self.error = state - self.error_msg.setLabel(message) - self.error_toggle.setVisibleCondition('True') - - def _disable_error(self): - - self.error = None - self.error_toggle.setVisibleCondition('False') diff --git a/resources/lib/dialogs/loginmanual.py b/resources/lib/dialogs/loginmanual.py deleted file mode 100644 index 7db1adcf..00000000 --- a/resources/lib/dialogs/loginmanual.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- - -################################################################################################## - -import logging -import os - -import xbmcgui -import xbmcaddon - -import read_embyserver as embyserver -from utils import language as lang - -################################################################################################## - -log = logging.getLogger("EMBY."+__name__) -addon = xbmcaddon.Addon('plugin.video.emby') - -ACTION_PARENT_DIR = 9 -ACTION_PREVIOUS_MENU = 10 -ACTION_BACK = 92 -SIGN_IN = 200 -CANCEL = 201 -ERROR_TOGGLE = 202 -ERROR_MSG = 203 -ERROR = { - 'Invalid': 1, - 'Empty': 2 -} - -################################################################################################## - - -class LoginManual(xbmcgui.WindowXMLDialog): - - _user = None - error = None - username = None - - - def __init__(self, *args, **kwargs): - - self.emby = embyserver.Read_EmbyServer() - xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) - - def is_logged_in(self): - return True if self._user else False - - def set_server(self, server): - self.server = server - - def set_user(self, user): - self.username = user or {} - - def get_user(self): - return self._user - - def onInit(self): - - self.signin_button = self.getControl(SIGN_IN) - self.cancel_button = self.getControl(CANCEL) - self.error_toggle = self.getControl(ERROR_TOGGLE) - self.error_msg = self.getControl(ERROR_MSG) - self.user_field = self._add_editcontrol(725, 400, 40, 500) - self.password_field = self._add_editcontrol(725, 475, 40, 500, password=1) - - if self.username: - self.user_field.setText(self.username) - self.setFocus(self.password_field) - else: - self.setFocus(self.user_field) - - self.user_field.controlUp(self.cancel_button) - self.user_field.controlDown(self.password_field) - self.password_field.controlUp(self.user_field) - self.password_field.controlDown(self.signin_button) - self.signin_button.controlUp(self.password_field) - self.cancel_button.controlDown(self.user_field) - - def onClick(self, control): - - if control == SIGN_IN: - # Sign in to emby connect - self._disable_error() - - user = self.user_field.getText() - password = self.password_field.getText() - - if not user: - # Display error - self._error(ERROR['Empty'], lang(30613)) - log.error("Username cannot be null") - - elif self._login(user, password): - self.close() - - elif control == CANCEL: - # Remind me later - self.close() - - def onAction(self, action): - - if self.error == ERROR['Empty'] and self.user_field.getText(): - self._disable_error() - - if action in (ACTION_BACK, ACTION_PARENT_DIR, ACTION_PREVIOUS_MENU): - self.close() - - def _add_editcontrol(self, x, y, height, width, password=0): - - media = os.path.join(addon.getAddonInfo('path'), 'resources', 'skins', 'default', 'media') - control = xbmcgui.ControlEdit(0, 0, 0, 0, - label="User", - font="font10", - textColor="ff525252", - focusTexture=os.path.join(media, "button-focus.png"), - noFocusTexture=os.path.join(media, "button-focus.png"), - isPassword=password) - control.setPosition(x, y) - control.setHeight(height) - control.setWidth(width) - - self.addControl(control) - return control - - def _login(self, username, password): - - result = self.emby.loginUser(self.server, username, password) - if not result: - self._error(ERROR['Invalid'], lang(33009)) - return False - else: - self._user = result - return True - - def _error(self, state, message): - - self.error = state - self.error_msg.setLabel(message) - self.error_toggle.setVisibleCondition('True') - - def _disable_error(self): - - self.error = None - self.error_toggle.setVisibleCondition('False') diff --git a/resources/lib/dialogs/serverconnect.py b/resources/lib/dialogs/serverconnect.py deleted file mode 100644 index 541ca6f9..00000000 --- a/resources/lib/dialogs/serverconnect.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- - -################################################################################################## - -import logging - -import xbmc -import xbmcgui - -import connect.connectionmanager as connectionmanager -from utils import language as lang - -################################################################################################## - -log = logging.getLogger("EMBY."+__name__) - -CONN_STATE = connectionmanager.ConnectionState -ACTION_PARENT_DIR = 9 -ACTION_PREVIOUS_MENU = 10 -ACTION_BACK = 92 -ACTION_SELECT_ITEM = 7 -ACTION_MOUSE_LEFT_CLICK = 100 -USER_IMAGE = 150 -USER_NAME = 151 -LIST = 155 -CANCEL = 201 -MESSAGE_BOX = 202 -MESSAGE = 203 -BUSY = 204 -EMBY_CONNECT = 205 -MANUAL_SERVER = 206 - -################################################################################################## - - -class ServerConnect(xbmcgui.WindowXMLDialog): - - username = "" - user_image = None - servers = [] - - _selected_server = None - _connect_login = False - _manual_server = False - - - def __init__(self, *args, **kwargs): - - xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) - - def set_args(self, **kwargs): - # connect_manager, username, user_image, servers, emby_connect - for key, value in kwargs.iteritems(): - setattr(self, key, value) - - def is_server_selected(self): - return True if self._selected_server else False - - def get_server(self): - return self._selected_server - - def is_connect_login(self): - return self._connect_login - - def is_manual_server(self): - return self._manual_server - - - def onInit(self): - - self.message = self.getControl(MESSAGE) - self.message_box = self.getControl(MESSAGE_BOX) - self.busy = self.getControl(BUSY) - self.list_ = self.getControl(LIST) - - for server in self.servers: - server_type = "wifi" if server.get('ExchangeToken') else "network" - self.list_.addItem(self._add_listitem(server['Name'], server['Id'], server_type)) - - self.getControl(USER_NAME).setLabel("%s %s" % (lang(33000), self.username.decode('utf-8'))) - - if self.user_image is not None: - self.getControl(USER_IMAGE).setImage(self.user_image) - - if not self.emby_connect: # Change connect user - self.getControl(EMBY_CONNECT).setLabel("[UPPERCASE][B]"+lang(30618)+"[/B][/UPPERCASE]") - - if self.servers: - self.setFocus(self.list_) - - @classmethod - def _add_listitem(cls, label, server_id, server_type): - - item = xbmcgui.ListItem(label) - item.setProperty('id', server_id) - item.setProperty('server_type', server_type) - - return item - - def onAction(self, action): - - if action in (ACTION_BACK, ACTION_PREVIOUS_MENU, ACTION_PARENT_DIR): - self.close() - - if action in (ACTION_SELECT_ITEM, ACTION_MOUSE_LEFT_CLICK): - - if self.getFocusId() == LIST: - server = self.list_.getSelectedItem() - selected_id = server.getProperty('id') - log.info('Server Id selected: %s', selected_id) - - if self._connect_server(selected_id): - self.message_box.setVisibleCondition('False') - self.close() - - def onClick(self, control): - - if control == EMBY_CONNECT: - self.connect_manager.clearData() - self._connect_login = True - self.close() - - elif control == MANUAL_SERVER: - self._manual_server = True - self.close() - - elif control == CANCEL: - self.close() - - def _connect_server(self, server_id): - - server = self.connect_manager.getServerInfo(server_id) - self.message.setLabel("%s %s..." % (lang(30610), server['Name'])) - self.message_box.setVisibleCondition('True') - self.busy.setVisibleCondition('True') - result = self.connect_manager.connectToServer(server) - - if result['State'] == CONN_STATE['Unavailable']: - self.busy.setVisibleCondition('False') - self.message.setLabel(lang(30609)) - return False - else: - xbmc.sleep(1000) - self._selected_server = result['Servers'][0] - return True diff --git a/resources/lib/dialogs/servermanual.py b/resources/lib/dialogs/servermanual.py deleted file mode 100644 index d54199eb..00000000 --- a/resources/lib/dialogs/servermanual.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- - -################################################################################################## - -import logging -import os - -import xbmcgui -import xbmcaddon - -import connect.connectionmanager as connectionmanager -from utils import language as lang - -################################################################################################## - -log = logging.getLogger("EMBY."+__name__) -addon = xbmcaddon.Addon('plugin.video.emby') - -CONN_STATE = connectionmanager.ConnectionState -ACTION_PARENT_DIR = 9 -ACTION_PREVIOUS_MENU = 10 -ACTION_BACK = 92 -CONNECT = 200 -CANCEL = 201 -ERROR_TOGGLE = 202 -ERROR_MSG = 203 -ERROR = { - 'Invalid': 1, - 'Empty': 2 -} - -################################################################################################## - - -class ServerManual(xbmcgui.WindowXMLDialog): - - _server = None - error = None - - - def __init__(self, *args, **kwargs): - - xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) - - def set_connect_manager(self, connect_manager): - self.connect_manager = connect_manager - - def is_connected(self): - return True if self._server else False - - def get_server(self): - return self._server - - def onInit(self): - - self.connect_button = self.getControl(CONNECT) - self.cancel_button = self.getControl(CANCEL) - self.error_toggle = self.getControl(ERROR_TOGGLE) - self.error_msg = self.getControl(ERROR_MSG) - self.host_field = self._add_editcontrol(725, 400, 40, 500) - self.port_field = self._add_editcontrol(725, 525, 40, 500) - - self.port_field.setText('8096') - self.setFocus(self.host_field) - - self.host_field.controlUp(self.cancel_button) - self.host_field.controlDown(self.port_field) - self.port_field.controlUp(self.host_field) - self.port_field.controlDown(self.connect_button) - self.connect_button.controlUp(self.port_field) - self.cancel_button.controlDown(self.host_field) - - def onClick(self, control): - - if control == CONNECT: - # Sign in to emby connect - self._disable_error() - - server = self.host_field.getText() - port = self.port_field.getText() - - if not server or not port: - # Display error - self._error(ERROR['Empty'], lang(30617)) - log.error("Server or port cannot be null") - - elif self._connect_to_server(server, port): - self.close() - - elif control == CANCEL: - # Remind me later - self.close() - - def onAction(self, action): - - if self.error == ERROR['Empty'] and self.host_field.getText() and self.port_field.getText(): - self._disable_error() - - if action in (ACTION_BACK, ACTION_PARENT_DIR, ACTION_PREVIOUS_MENU): - self.close() - - def _add_editcontrol(self, x, y, height, width): - - media = os.path.join(addon.getAddonInfo('path'), 'resources', 'skins', 'default', 'media') - control = xbmcgui.ControlEdit(0, 0, 0, 0, - label="User", - font="font10", - textColor="ffc2c2c2", - focusTexture=os.path.join(media, "button-focus.png"), - noFocusTexture=os.path.join(media, "button-focus.png")) - control.setPosition(x, y) - control.setHeight(height) - control.setWidth(width) - - self.addControl(control) - return control - - def _connect_to_server(self, server, port): - - server_address = "%s:%s" % (server, port) - self._message("%s %s..." % (lang(30610), server_address)) - result = self.connect_manager.connectToAddress(server_address) - - if result['State'] == CONN_STATE['Unavailable']: - self._message(lang(30609)) - return False - else: - self._server = result['Servers'][0] - return True - - def _message(self, message): - - self.error_msg.setLabel(message) - self.error_toggle.setVisibleCondition('True') - - def _error(self, state, message): - - self.error = state - self.error_msg.setLabel(message) - self.error_toggle.setVisibleCondition('True') - - def _disable_error(self): - - self.error = None - self.error_toggle.setVisibleCondition('False') diff --git a/resources/lib/dialogs/usersconnect.py b/resources/lib/dialogs/usersconnect.py deleted file mode 100644 index ed535c98..00000000 --- a/resources/lib/dialogs/usersconnect.py +++ /dev/null @@ -1,104 +0,0 @@ -# -*- coding: utf-8 -*- - -################################################################################################## - -import logging - -import xbmc -import xbmcgui - -################################################################################################## - -log = logging.getLogger("EMBY."+__name__) - -ACTION_PARENT_DIR = 9 -ACTION_PREVIOUS_MENU = 10 -ACTION_BACK = 92 -ACTION_SELECT_ITEM = 7 -ACTION_MOUSE_LEFT_CLICK = 100 -LIST = 155 -MANUAL = 200 -CANCEL = 201 - -################################################################################################## - - -class UsersConnect(xbmcgui.WindowXMLDialog): - - _user = None - _manual_login = False - - - def __init__(self, *args, **kwargs): - - self.kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2]) - xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) - - def set_server(self, server): - self.server = server - - def set_users(self, users): - self.users = users - - def is_user_selected(self): - return True if self._user else False - - def get_user(self): - return self._user - - def is_manual_login(self): - return self._manual_login - - - def onInit(self): - - self.list_ = self.getControl(LIST) - for user in self.users: - user_image = ("userflyoutdefault2.png" if 'PrimaryImageTag' not in user - else self._get_user_artwork(user['Id'], 'Primary')) - self.list_.addItem(self._add_listitem(user['Name'], user['Id'], user_image)) - - self.setFocus(self.list_) - - def _add_listitem(self, label, user_id, user_image): - - item = xbmcgui.ListItem(label) - item.setProperty('id', user_id) - if self.kodi_version > 15: - item.setArt({'Icon': user_image}) - else: - item.setArt({'icon': user_image}) - - return item - - def onAction(self, action): - - if action in (ACTION_BACK, ACTION_PREVIOUS_MENU, ACTION_PARENT_DIR): - self.close() - - if action in (ACTION_SELECT_ITEM, ACTION_MOUSE_LEFT_CLICK): - - if self.getFocusId() == LIST: - user = self.list_.getSelectedItem() - selected_id = user.getProperty('id') - log.info('User Id selected: %s', selected_id) - - for user in self.users: - if user['Id'] == selected_id: - self._user = user - break - - self.close() - - def onClick(self, control): - - if control == MANUAL: - self._manual_login = True - self.close() - - elif control == CANCEL: - self.close() - - def _get_user_artwork(self, user_id, item_type): - # Load user information set by UserClient - return "%s/emby/Users/%s/Images/%s?Format=original" % (self.server, user_id, item_type) diff --git a/resources/skins/default/1080i/script-plex-context.xml b/resources/skins/default/1080i/script-plex-context.xml index 380f2a9a..1b94802e 100644 --- a/resources/skins/default/1080i/script-plex-context.xml +++ b/resources/skins/default/1080i/script-plex-context.xml @@ -8,7 +8,7 @@ Background fade 100% 100% - plex-bg-fade.png + bg-fade.png
@@ -45,7 +45,7 @@ 0.5 70 -5 - plex-separator.png + separator.png diff --git a/resources/skins/default/media/plex-bg-fade.png b/resources/skins/default/media/bg-fade.png similarity index 100% rename from resources/skins/default/media/plex-bg-fade.png rename to resources/skins/default/media/bg-fade.png diff --git a/resources/skins/default/media/plex-separator.png b/resources/skins/default/media/separator.png similarity index 100% rename from resources/skins/default/media/plex-separator.png rename to resources/skins/default/media/separator.png