pull/1/head
DiMartinoXBMC 2015-08-03 22:56:30 +03:00
parent 39783a1c8a
commit 5fc39a7c13
2 changed files with 63 additions and 59 deletions

View File

@ -2,13 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="56e91349-2444-4553-bc78-90c2bab49e9c" name="Default" comment=""> <list default="true" id="56e91349-2444-4553-bc78-90c2bab49e9c" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/resources/btclient/argparse.py" />
<change type="DELETED" beforePath="C:\Users\Admin\AppData\Roaming\Kodi\addons\plugin.video.torrenter\resources\btclient\_version.py" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/BTClientPlayer.py" afterPath="$PROJECT_DIR$/BTClientPlayer.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/resources/btclient/btclient.py" afterPath="$PROJECT_DIR$/resources/btclient/btclient.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/resources/btclient/common.py" afterPath="$PROJECT_DIR$/resources/btclient/common.py" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/resources/btclient/common.py" afterPath="$PROJECT_DIR$/resources/btclient/common.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/resources/btclient/htclient.py" afterPath="$PROJECT_DIR$/resources/btclient/htclient.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/resources/btclient/opensubtitle.py" afterPath="$PROJECT_DIR$/resources/btclient/opensubtitle.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list> </list>
<ignored path="plugin.video.torrenter.iws" /> <ignored path="plugin.video.torrenter.iws" />
@ -180,13 +174,14 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="BTClientPlayer.py" pinned="false" current-in-tab="true"> <file leaf-file-name="BTClientPlayer.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/BTClientPlayer.py"> <entry file="file://$PROJECT_DIR$/BTClientPlayer.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.35664335"> <state vertical-scroll-proportion="0.0">
<caret line="29" column="19" selection-start-line="29" selection-start-column="19" selection-end-line="29" selection-end-column="19" /> <caret line="59" column="39" selection-start-line="59" selection-start-column="39" selection-end-line="59" selection-end-column="39" />
<folding> <folding>
<element signature="e#24#832#1" expanded="false" /> <element signature="e#24#832#1" expanded="false" />
<element signature="e#834#843#0" expanded="true" />
<element signature="e#7046#7956#0" expanded="false" /> <element signature="e#7046#7956#0" expanded="false" />
<element signature="e#7995#8337#0" expanded="false" /> <element signature="e#7995#8337#0" expanded="false" />
<element signature="e#8369#10467#0" expanded="false" /> <element signature="e#8369#10467#0" expanded="false" />
@ -239,12 +234,14 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="common.py" pinned="false" current-in-tab="false"> <file leaf-file-name="common.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/resources/btclient/common.py"> <entry file="file://$PROJECT_DIR$/resources/btclient/common.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.50774527">
<caret line="13" column="15" selection-start-line="13" selection-start-column="15" selection-end-line="13" selection-end-column="15" /> <caret line="454" column="0" selection-start-line="454" selection-start-column="0" selection-end-line="454" selection-end-column="0" />
<folding /> <folding>
<element signature="e#46#55#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -269,7 +266,7 @@
<entry file="file://$PROJECT_DIR$/Player.py"> <entry file="file://$PROJECT_DIR$/Player.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="237" column="24" selection-start-line="237" selection-start-column="24" selection-end-line="237" selection-end-column="24" /> <caret line="248" column="35" selection-start-line="248" selection-start-column="35" selection-end-line="248" selection-end-column="35" />
<folding> <folding>
<element signature="e#24#832#1" expanded="false" /> <element signature="e#24#832#1" expanded="false" />
<element signature="e#1950#3666#0" expanded="false" /> <element signature="e#1950#3666#0" expanded="false" />
@ -426,9 +423,9 @@
<option value="$PROJECT_DIR$/resources/scrapers/fuzzywuzzy/fuzz.py" /> <option value="$PROJECT_DIR$/resources/scrapers/fuzzywuzzy/fuzz.py" />
<option value="$PROJECT_DIR$/resources/btclient/htclient.py" /> <option value="$PROJECT_DIR$/resources/btclient/htclient.py" />
<option value="$PROJECT_DIR$/resources/btclient/opensubtitle.py" /> <option value="$PROJECT_DIR$/resources/btclient/opensubtitle.py" />
<option value="$PROJECT_DIR$/resources/btclient/common.py" />
<option value="$PROJECT_DIR$/resources/btclient/btclient.py" /> <option value="$PROJECT_DIR$/resources/btclient/btclient.py" />
<option value="$PROJECT_DIR$/BTClientPlayer.py" /> <option value="$PROJECT_DIR$/BTClientPlayer.py" />
<option value="$PROJECT_DIR$/resources/btclient/common.py" />
</list> </list>
</option> </option>
</component> </component>
@ -464,6 +461,8 @@
<sortByType /> <sortByType />
</navigator> </navigator>
<panes> <panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@ -516,8 +515,6 @@
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" />
<pane id="Scratches" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
@ -700,12 +697,6 @@
<option name="number" value="Default" /> <option name="number" value="Default" />
<updated>1420801533300</updated> <updated>1420801533300</updated>
</task> </task>
<task id="LOCAL-00070" summary="major settings tweak and encryption">
<created>1435503849419</created>
<option name="number" value="00070" />
<option name="project" value="LOCAL" />
<updated>1435503849419</updated>
</task>
<task id="LOCAL-00071" summary="fix encryption"> <task id="LOCAL-00071" summary="fix encryption">
<created>1435504476202</created> <created>1435504476202</created>
<option name="number" value="00071" /> <option name="number" value="00071" />
@ -994,7 +985,13 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1438545525111</updated> <updated>1438545525111</updated>
</task> </task>
<option name="localTasksCounter" value="119" /> <task id="LOCAL-00119" summary="btclient">
<created>1438624145270</created>
<option name="number" value="00119" />
<option name="project" value="LOCAL" />
<updated>1438624145270</updated>
</task>
<option name="localTasksCounter" value="120" />
<servers /> <servers />
</component> </component>
<component name="TodoView" selected-index="0"> <component name="TodoView" selected-index="0">
@ -1019,14 +1016,15 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="false" /> <editor active="true" />
<layout> <layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.13224447" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.13224447" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32925472" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32925472" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32333332" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3295583" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3295583" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3011111" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3011111" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32777777" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32777777" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.1319149" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.1319149" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
@ -1038,7 +1036,6 @@
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24946696" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24946696" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32369298" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout> </layout>
@ -1076,11 +1073,11 @@
<MESSAGE value="riper fix" /> <MESSAGE value="riper fix" />
<MESSAGE value="dht fix" /> <MESSAGE value="dht fix" />
<MESSAGE value="module over system" /> <MESSAGE value="module over system" />
<MESSAGE value="btclient" />
<MESSAGE value="speed &amp; encryption" /> <MESSAGE value="speed &amp; encryption" />
<MESSAGE value="include btclient" /> <MESSAGE value="include btclient" />
<MESSAGE value="import optz" /> <MESSAGE value="import optz" />
<option name="LAST_COMMIT_MESSAGE" value="import optz" /> <MESSAGE value="btclient" />
<option name="LAST_COMMIT_MESSAGE" value="btclient" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
@ -1588,14 +1585,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/resources/btclient/common.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="13" column="15" selection-start-line="13" selection-start-column="15" selection-end-line="13" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/resources/btclient/btclient.py"> <entry file="file://$PROJECT_DIR$/resources/btclient/btclient.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
@ -1606,12 +1595,26 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/resources/btclient/opensubtitle.py"> <entry file="file://$PROJECT_DIR$/BTClientPlayer.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="22" column="26" selection-start-line="22" selection-start-column="26" selection-end-line="22" selection-end-column="26" /> <caret line="59" column="39" selection-start-line="59" selection-start-column="39" selection-end-line="59" selection-end-column="39" />
<folding> <folding>
<element signature="e#46#62#0" expanded="true" /> <element signature="e#24#832#1" expanded="false" />
<element signature="e#834#843#0" expanded="true" />
<element signature="e#7046#7956#0" expanded="false" />
<element signature="e#7995#8337#0" expanded="false" />
<element signature="e#8369#10467#0" expanded="false" />
<element signature="e#11897#14264#0" expanded="false" />
<element signature="e#14307#14438#0" expanded="false" />
<element signature="e#14481#14564#0" expanded="false" />
<element signature="e#14606#14736#0" expanded="false" />
<element signature="e#14779#14910#0" expanded="false" />
<element signature="e#14981#15114#0" expanded="false" />
<element signature="e#17677#18125#0" expanded="false" />
<element signature="e#18160#18301#0" expanded="false" />
<element signature="e#18342#18678#0" expanded="false" />
<element signature="e#18711#18968#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -1619,7 +1622,7 @@
<entry file="file://$PROJECT_DIR$/Player.py"> <entry file="file://$PROJECT_DIR$/Player.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="237" column="24" selection-start-line="237" selection-start-column="24" selection-end-line="237" selection-end-column="24" /> <caret line="248" column="35" selection-start-line="248" selection-start-column="35" selection-end-line="248" selection-end-column="35" />
<folding> <folding>
<element signature="e#24#832#1" expanded="false" /> <element signature="e#24#832#1" expanded="false" />
<element signature="e#1950#3666#0" expanded="false" /> <element signature="e#1950#3666#0" expanded="false" />
@ -1639,25 +1642,22 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/BTClientPlayer.py"> <entry file="file://$PROJECT_DIR$/resources/btclient/opensubtitle.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.35664335"> <state vertical-scroll-proportion="0.0">
<caret line="29" column="19" selection-start-line="29" selection-start-column="19" selection-end-line="29" selection-end-column="19" /> <caret line="22" column="26" selection-start-line="22" selection-start-column="26" selection-end-line="22" selection-end-column="26" />
<folding> <folding>
<element signature="e#24#832#1" expanded="false" /> <element signature="e#46#62#0" expanded="true" />
<element signature="e#7046#7956#0" expanded="false" /> </folding>
<element signature="e#7995#8337#0" expanded="false" /> </state>
<element signature="e#8369#10467#0" expanded="false" /> </provider>
<element signature="e#11897#14264#0" expanded="false" /> </entry>
<element signature="e#14307#14438#0" expanded="false" /> <entry file="file://$PROJECT_DIR$/resources/btclient/common.py">
<element signature="e#14481#14564#0" expanded="false" /> <provider selected="true" editor-type-id="text-editor">
<element signature="e#14606#14736#0" expanded="false" /> <state vertical-scroll-proportion="0.50774527">
<element signature="e#14779#14910#0" expanded="false" /> <caret line="454" column="0" selection-start-line="454" selection-start-column="0" selection-end-line="454" selection-end-column="0" />
<element signature="e#14981#15114#0" expanded="false" /> <folding>
<element signature="e#17677#18125#0" expanded="false" /> <element signature="e#46#55#0" expanded="true" />
<element signature="e#18160#18301#0" expanded="false" />
<element signature="e#18342#18678#0" expanded="false" />
<element signature="e#18711#18968#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>

View File

@ -446,7 +446,11 @@ class AbstractFile(object):
if not self._rate: if not self._rate:
d = self.duration d = self.duration
if d: if d:
self._rate = self.size / d.total_seconds() if hasattr(d, 'total_seconds'):
total_seconds=d.total_seconds()
else:
total_seconds=(d.microseconds + (d.seconds + d.days * 24 * 3600) * 10**6) / 10**6
self._rate = self.size / total_seconds
return self._rate return self._rate
def __str__(self): def __str__(self):