From 0252c2d04b1012508bfc17328a8ba650647285c6 Mon Sep 17 00:00:00 2001 From: smitchell6879 Date: Mon, 12 Mar 2018 08:41:14 -0400 Subject: [PATCH] 031118 Fixed Database cleaning issue. --- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 6 +++--- addon.xml | 10 +++++----- changelog.txt | 26 ------------------------ lib/iteration.py | 26 +++++++++++++++++++++++- lib/iteration.pyo | Bin 21026 -> 21220 bytes lib/querylib.pyo | Bin 10667 -> 10337 bytes lib/sys_init.py | 2 +- lib/sys_init.pyo | Bin 7537 -> 7330 bytes plugin.py | 41 +++++++++++++++++++++++++++++-------- 10 files changed, 117 insertions(+), 44 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 changelog.txt diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..2346501 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,50 @@ +== Release Beta 2.0.7 (031118) == +* Fixed: Home playall item to play first item in playlist +* Fixed: Database Cleaner +* Fixed: General bugfixes + +== Release Beta 2.0.6 (031018) == +* Fixed: Home screen support for context menu, widget and video info +* Fixed: CPU load issues +* Fixed: General bugfixes + +== Release Beta 2.0.5 (030918) == +* Added: Widget +* Added: Re-added context menu item +* Updated: Properties nomenclature +* Fixed: General bugfixes + +== Release Beta 2.0.4 (030818) == +* Added: Skin patches (props @evertiro) +* Updated: Properties nomenclature +* Fixed: Window returning to show on exit + +== Release Beta 2.0.2 (021618) == +* Added: TV Show support +* Added: .sfnfo support and editor +* Added: Show All option +* Added: Re-added information view service + +== Release Beta 2.0.1 (020618) == +* Added: Initial SQL support +* Removed: Context menu service +* Removed: Information view service + +== Release Beta 2.0.0 (011818) == +* Added: Auto scan/clean +* Fixed: Playlist lag +* Updated: Codebase overhaul + +== Release Beta 1.0.2 (011418) == +* Added: Krypton support + +== Release Beta 1.0.1 (011418) == +* Added: Play All list option +* Added: Option to disable Play All list (true by default) +* Updated: Rollback .json to 8.0 + +== Release Beta 1.0.0 (011318) == +* Added: Initial public beta + +== Release 0.0.1 (010818) == +* Initialize plugin on Github diff --git a/README.md b/README.md index 90fb5c4..cbc951c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # plugin.video.specialfeatures -[![GitHub release](https://img.shields.io/github/release/smitchell6879/plugin.video.specialfeatures.svg)](https://github.com/smitchell6879/plugin.video.specialfeatures/releases/latest) [![GitHub tag](https://img.shields.io/github/tag/smitchell6879/plugin.video.specialfeatures.svg)](https://github.com/smitchell6879/plugin.video.specialfeatures/releases) [![license](https://img.shields.io/github/license/smitchell6879/plugin.video.specialfeatures.svg)](https://github.com/smitchell6879/plugin.video.specialfeatures/blob/Alpha-Features/LICENSE) +[![](https://img.shields.io/badge/supports-kodi%2017%20|%2018-blue.svg)](https://forum.kodi.tv/showthread.php?tid=327042) [![GitHub release](https://img.shields.io/github/release/smitchell6879/plugin.video.specialfeatures.svg)](https://github.com/smitchell6879/plugin.video.specialfeatures/releases/latest) [![GitHub tag](https://img.shields.io/github/tag/smitchell6879/plugin.video.specialfeatures.svg)](https://github.com/smitchell6879/plugin.video.specialfeatures/releases) [![license](https://img.shields.io/github/license/smitchell6879/plugin.video.specialfeatures.svg)](https://github.com/smitchell6879/plugin.video.specialfeatures/blob/Alpha-Features/LICENSE) ### Welcome! @@ -33,7 +33,7 @@ This Extras folder can contain individual video clips, or full Blu-ray or DVD ri There are currently two ways to access Special Features. The 'builtin' method is to simply access the 'Special Features' addon directly. If any special features are available, they will be presented in a video list. -While the long-term goal is to see every skin supporting Special Features natively, for now patches are available for many of the official skins in the ![skin xml](https://github.com/smitchell6879/plugin.video.specialfeatures/tree/Alpha-Features/resources/skin%20xml/) directory. The following skins are currently supported, with more being added as time permits: +While the long-term goal is to see every skin supporting Special Features natively, for now patches are available for many of the official skins in the [skin xml](https://github.com/smitchell6879/plugin.video.specialfeatures/tree/Alpha-Features/resources/skin%20xml/) directory. The following skins are currently supported, with more being added as time permits: - [x] Aeon Nox Silvo - [x] Amber @@ -58,7 +58,7 @@ Originally, Special Features were accessed through a context menu entry. This me ## Recommended Advanced User Settings -Without tweaking your ![advanced settings](https://kodi.wiki/view/advancedsettings.xml), you will end up with all of your extras being unceremoniously dumped into your media library. To prevent this, it is recommended that you add the following block to your `advancedsettings.xml` file. The Advanced Settings file is not created by default, so you will likely have to add it yourself. +Without tweaking your [advanced settings](https://kodi.wiki/view/advancedsettings.xml), you will end up with all of your extras being unceremoniously dumped into your media library. To prevent this, it is recommended that you add the following block to your `advancedsettings.xml` file. The Advanced Settings file is not created by default, so you will likely have to add it yourself. ``` diff --git a/addon.xml b/addon.xml index 5f3ec41..88eed96 100644 --- a/addon.xml +++ b/addon.xml @@ -1,8 +1,8 @@ +provider-name="smitchell6879, evertiro"> @@ -22,9 +22,9 @@ provider-name="smitchell6879"> video - - - + Given a properly structured 'Extras' directory, this addon will present all of the bonus media in your library. + Special Features is inspired by the upcoming Blu-ray features being introduced in Kodi 18. Given a properly structured 'Extras' directory, this addon will present all of the bonus videos, discs and alternate versions of the movies and tv shows in your library. + Kodi 17/18 Required icon.png fanart.jpg diff --git a/changelog.txt b/changelog.txt deleted file mode 100644 index 9493d15..0000000 --- a/changelog.txt +++ /dev/null @@ -1,26 +0,0 @@ -031018 Changed TVshow Content type to episodes - Fixed Context Menu, Widget, Video Info to work on Home Screen - Bug Fix - Slowdown the service to decrease cpu load. -030918 Updated Nomenclature - Fixed Bugs - Added Widget - Added Context Menu Back -030818 Merged Skin Additions and Readme from evertiro -021618 Added support for tv show extras - Added Show all option - Add .sfnfo Support import/export - Added .sfnfo editor to context menu - Added Service back for information view -020518 Added Mysql Support. - Temp. remove service that controlled context menu and information view. -011418 Added Krypton Support. rolledback .json to 8.0 - Added Play All List option to the Special Features List. - Option in settings to turn it off - *note as of now this option is true by default this may change - in the furture. - - -011318 upload all files and made inital public [beta] release. - -010818 init plugin here on github. diff --git a/lib/iteration.py b/lib/iteration.py index 0ec23da..e13f2f8 100644 --- a/lib/iteration.py +++ b/lib/iteration.py @@ -285,17 +285,41 @@ def detchDb(self): self.cst = 1 bgdc(lang(30000),lang(30053)) self.trAsh = list() + self.chkList = list() + self.query = 'movies' + self.query2 = 'tvshows' + self.result = QUERY().router(self.query) + self.result2 = QUERY().router(self.query2) + self.index = 0 + try: + for self.item in self.result['result']['{}'.format(self.query)]: + self.chkList.append(self.item.get('file')) + self.index += 1 + except: + info('No Movies') + try: + for self.item in self.result2['result']['{}'.format(self.query2)]: + self.chkList.append(self.item.get('file')) + self.index += 1 + except: + info('No TV Shows') + self.range = len(self.chkList) + info(self.chkList) + info(self.range) self.entry = self.sql.exeCute('all_special','','all') for self.item in self.entry: if mysql == 'true': - # self.verify = self.verIfy(self.item['file']) self.verify = self.verIfy(self.item['bpath']) if self.verify == 0: self.trAsh.append(self.item['bpath']) + if not self.item['file'] in self.chkList: + self.trAsh.append(self.item['bpath']) else: self.verify = self.verIfy(self.item[2]) if self.verify == 0: self.trAsh.append(self.item[2]) + if not self.item[0] in self.chkList: + self.trAsh.append(self.item[2]) for self.item in self.trAsh: self.sql.exeCute('d_special2',self.item,'com2') self.trAsh = list() diff --git a/lib/iteration.pyo b/lib/iteration.pyo index 78f69627a7f1a4bfeb30241179312c6f23e2903b..a5db1965ff4017b9bb4f8ad84a429f6e5571c022 100644 GIT binary patch delta 3078 zcmbtWU1%d!6h3z{$uw=6wwpF-+NMoZu)C$&pY;cSA8gl_wb|XNHnLbk?F5^2ZJA`U zrnq*5K8T=#+y~#)ZT*4DZcrB#AAKmuqTtWVvLY+^Zm;L^YZ_pT#!Bd{6^?64|i1!A7x(tn;m;z?5m@Z^Iq`PSZ~@R|7RZ1{ENO< zJ>1n#`a}Na{@LnSinTQN&+v;!uQYeh^0Ac6e>irhw5#xMQg`v8k&tQlU<=>^K-LeM zECvD4{9>Sh(L&xrkfwzIY%#Ik+PJPb>usO~L_i2O&O&8g>}mx~fwt=4awi=vq#Aa<5Bmzi>O5_(I_9WsQq0kM59?E&eUm!eGQe>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zsq{J83f`Rrq=7o)|^pnW@zY;1y28VYdq5V#!6~E-V zhy5TC{Fb+r`S9&=p@X39s2)HQK|^P1DrJlS{aI6?gbp&Vq*fzdI$B#yC(gLNx`MIp zn=!2`^bEaF88b!ncwIgzr@^{{G!F|*((m2^q5m-Kb#rh8bN3>n*ll!xq!S-;kv$}j zxFjFRB8A-U!*wC;tuHpO)?as%H+1^U%EkAH58XjiW@Da{nK@>>EQWuUiHSbAl)IRE z%{7BRQne12|9A~Q7J6eRO>rpX{5X=C#tvEi@>#iwQ$sia?`7drj{h8B$gz`hZ$PLo0&}BsOCP|p6w() z>1y^p_@o8+StqaO2*s_$V{-*3BQtJ!_sws3HZtOq7vO(}S3XnFlL?Q0pa)qeYl#%% zR^qXlU-T3nCwgr5m7LFpPk(}fDjxa!xV5@Z?$>0U%%S0iTZzZyLmE-Ir9mdh005k5 Bm{tG) delta 810 zcmaDDusWEX`7AYh zD!2fJa`FpuQ}aqDD{^>D)?zzBx~2g3-K1(-NSX#l5s%FZoQ%w*=>mFab3M-nMpAY8 zY@W#XkYrsRn=c4>Fp+AP$K*2MQj#=nW)u-(AxXz%Q1BH>%x5EASDw5o>AEI=RGm(m bRiLEzOwEflO+a5w?o*E8*)2u zUd+M7NJ!CS0j{6;)ND57b|Y-aBc6Zw3<0@jvNzuhf@=Ku>j|o{5SULujniaD!HERa zI8U|}T1HTfpKt|1HFBctlPyH5iBOkFP|YjROoD3miQ$bfU|2hCR+P|U=41sXkAj@U Q%A(1^(tijVyGv#}0LDwWA^-pY delta 809 zcmZ2v`O%7<`7%Tjal3vyHQO5)?=p`!6- zCh_r;w=ub%E=R@{*YwfBz~63@1-{b0NWc9#sB~S diff --git a/plugin.py b/plugin.py index ba09e70..83304dc 100644 --- a/plugin.py +++ b/plugin.py @@ -295,15 +295,40 @@ def plaYList(self,category=''): self.var() playL.clear() self.files = self.DbEE.initDb('file',category) + self.f = self.files[0].get('path') + self.item_one = xbmcgui.ListItem(path=self.f) + self.item_one.setInfo('video',{'title':self.files[0].get('title'),'plot':self.files[0].get('plot'),'sorttitle':self.files[0].get('sorttitle')}) + info(self.files[0].get('art')) + self.item_one.setCast(self.files[0].get('cast')) + if os.path.splitext(self.f)[1] == '.bdmv': + self.item_one.setArt({'fanart':self.files[0].get('art').get('fanart'),'poster':self.files[0].get('art').get('poster')}) + elif os.path.splitext(self.f)[1] == '.IFO': + self.item_one.setArt({'fanart':self.files[0].get('art').get('fanart'),'poster':self.files[0].get('art').get('poster')}) + elif os.path.splitext(self.f)[1] == '.iso': + self.item_one.setArt({'fanart':self.files[0].get('art').get('fanart'),'poster':self.files[0].get('art').get('poster')}) + else: + self.item_one.setArt({'fanart':self.files[0].get('art').get('fanart'),'thumb':self.files[0].get('art').get('thumb')}) + playr.play(item=self.f, listitem=self.item_one) + xbmcplugin.setResolvedUrl(self._handle, True, listitem=self.item_one) + if not xbmc.executebuiltin('Window.IsActive(fullscreenvideo)'): + xbmc.executebuiltin('Action(Fullscreen)') for self.item in self.files: - self.litem = xbmcgui.ListItem(self.item.get('title')) - self.title = self.item.get('title') - self.litem.setInfo('video',{'title':self.item.get('title'), 'label':self.item.get('title')}) - self.litem.setCast(self.item.get('cast')) - self.litem.setArt(self.item.get('art')) - playL.add(url=self.item.get('path')) - xbmc.executebuiltin('Action(Fullscreen)') - xbmc.Player().play(playL,startpos=-1) + if self.item != self.files[0]: + self.f = self.item.get('path') + self.litem = xbmcgui.ListItem(self.item.get('title')) + self.title = self.item.get('title') + self.litem.setInfo('video',{'title':self.item.get('title'),'plot':self.item.get('plot'),'sorttitle':self.item.get('sorttitle')}) + self.litem.setCast(self.item.get('cast')) + if os.path.splitext(self.f)[1] == '.bdmv': + self.litem.setArt({'fanart':self.item.get('art').get('fanart'),'poster':self.item.get('art').get('poster')}) + elif os.path.splitext(self.f)[1] == '.IFO': + self.litem.setArt({'fanart':self.item.get('art').get('fanart'),'poster':self.item.get('art').get('poster')}) + elif os.path.splitext(self.f)[1] == '.iso': + self.litem.setArt({'fanart':self.item.get('art').get('fanart'),'poster':self.item.get('art').get('poster')}) + else: + self.litem.setArt({'fanart':self.item.get('art').get('fanart'),'thumb':self.item.get('art').get('thumb')}) + playL.add(url=self.item.get('path'), listitem=self.litem) + if __name__ =='__main__': plugRoutine(sys.argv)