resume_file fix

pull/1/head
DiMartinoXBMC 2016-01-05 22:24:42 +03:00
parent d4862c12ee
commit 53af74d487
2 changed files with 65 additions and 66 deletions

View File

@ -4,7 +4,6 @@
<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="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" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Anteoloader.py" afterPath="$PROJECT_DIR$/Anteoloader.py" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Anteoloader.py" afterPath="$PROJECT_DIR$/Anteoloader.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SearcherABC.py" afterPath="$PROJECT_DIR$/SearcherABC.py" />
</list> </list>
<ignored path="plugin.video.torrenter.iws" /> <ignored path="plugin.video.torrenter.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -193,8 +192,8 @@
<file leaf-file-name="Anteoloader.py" pinned="false" current-in-tab="true"> <file leaf-file-name="Anteoloader.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Anteoloader.py"> <entry file="file://$PROJECT_DIR$/Anteoloader.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.5929054"> <state vertical-scroll-proportion="0.7154341">
<caret line="371" column="98" selection-start-line="371" selection-start-column="98" selection-end-line="371" selection-end-column="98" /> <caret line="366" column="95" selection-start-line="366" selection-start-column="95" selection-end-line="366" selection-end-column="95" />
<folding> <folding>
<element signature="e#24#785#1" expanded="false" /> <element signature="e#24#785#1" expanded="false" />
<element signature="e#788#802#0" expanded="true" /> <element signature="e#788#802#0" expanded="true" />
@ -207,25 +206,25 @@
<element signature="e#6324#8484#0" expanded="false" /> <element signature="e#6324#8484#0" expanded="false" />
<element signature="e#8521#8700#0" expanded="false" /> <element signature="e#8521#8700#0" expanded="false" />
<element signature="e#12184#12294#0" expanded="false" /> <element signature="e#12184#12294#0" expanded="false" />
<element signature="e#18906#19450#0" expanded="false" /> <element signature="e#18941#19485#0" expanded="false" />
<element signature="e#24025#24156#0" expanded="false" /> <element signature="e#24060#24191#0" expanded="false" />
<element signature="e#24199#24282#0" expanded="false" /> <element signature="e#24234#24317#0" expanded="false" />
<element signature="e#24324#24454#0" expanded="false" /> <element signature="e#24359#24489#0" expanded="false" />
<element signature="e#24497#24628#0" expanded="false" /> <element signature="e#24532#24663#0" expanded="false" />
<element signature="e#24699#24832#0" expanded="false" /> <element signature="e#24734#24867#0" expanded="false" />
<element signature="e#24881#25299#0" expanded="false" /> <element signature="e#24916#25334#0" expanded="false" />
<element signature="e#25341#25436#0" expanded="false" /> <element signature="e#25376#25471#0" expanded="false" />
<element signature="e#25486#26340#0" expanded="false" /> <element signature="e#25521#26375#0" expanded="false" />
<element signature="e#26381#26570#0" expanded="false" /> <element signature="e#26416#26605#0" expanded="false" />
<element signature="e#26603#26818#0" expanded="false" /> <element signature="e#26638#26853#0" expanded="false" />
<element signature="e#26851#28567#0" expanded="false" /> <element signature="e#26886#28602#0" expanded="false" />
<element signature="e#26902#27557#0" expanded="false" /> <element signature="e#26937#27592#0" expanded="false" />
<element signature="e#27587#27765#0" expanded="false" /> <element signature="e#27622#27800#0" expanded="false" />
<element signature="e#27795#27973#0" expanded="false" /> <element signature="e#27830#28008#0" expanded="false" />
<element signature="e#28004#28015#0" expanded="false" /> <element signature="e#28039#28050#0" expanded="false" />
<element signature="e#28059#28076#0" expanded="false" /> <element signature="e#28094#28111#0" expanded="false" />
<element signature="e#28129#28221#0" expanded="false" /> <element signature="e#28164#28256#0" expanded="false" />
<element signature="e#28296#28567#0" expanded="false" /> <element signature="e#28331#28602#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -385,7 +384,7 @@
<file leaf-file-name="SearcherABC.py" pinned="false" current-in-tab="true"> <file leaf-file-name="SearcherABC.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/SearcherABC.py"> <entry file="file://$PROJECT_DIR$/SearcherABC.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-5.0225444"> <state vertical-scroll-proportion="0.02733119">
<caret line="43" column="41" selection-start-line="43" selection-start-column="41" selection-end-line="43" selection-end-column="41" /> <caret line="43" column="41" selection-start-line="43" selection-start-column="41" selection-end-line="43" selection-end-column="41" />
<folding /> <folding />
</state> </state>
@ -814,12 +813,6 @@
<option name="number" value="Default" /> <option name="number" value="Default" />
<updated>1420801533300</updated> <updated>1420801533300</updated>
</task> </task>
<task id="LOCAL-00122" summary="remove resume_data">
<created>1439306241972</created>
<option name="number" value="00122" />
<option name="project" value="LOCAL" />
<updated>1439306241972</updated>
</task>
<task id="LOCAL-00123" summary="delete storage fix"> <task id="LOCAL-00123" summary="delete storage fix">
<created>1439307809956</created> <created>1439307809956</created>
<option name="number" value="00123" /> <option name="number" value="00123" />
@ -1108,18 +1101,24 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1451054257142</updated> <updated>1451054257142</updated>
</task> </task>
<option name="localTasksCounter" value="171" /> <task id="LOCAL-00171" summary="resume_file">
<created>1452011230053</created>
<option name="number" value="00171" />
<option name="project" value="LOCAL" />
<updated>1452011230056</updated>
</task>
<option name="localTasksCounter" value="172" />
<servers /> <servers />
</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" show_stripe_button="true" weight="0.13277134" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.13277134" 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" show_stripe_button="true" 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" show_stripe_button="true" 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" show_stripe_button="true" 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" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32814237" 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" show_stripe_button="true" weight="0.32814237" 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" show_stripe_button="true" weight="0.27728286" 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="true" show_stripe_button="true" weight="0.2769744" 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" show_stripe_button="true" 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" show_stripe_button="true" 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" show_stripe_button="true" weight="0.32703003" 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" show_stripe_button="true" weight="0.32703003" 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" show_stripe_button="true" 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" show_stripe_button="true" weight="0.1319149" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
@ -1149,7 +1148,6 @@
<option name="myLimit" value="2678400000" /> <option name="myLimit" value="2678400000" />
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="RussakHH stable roll-back 2" />
<MESSAGE value="icon fix + anteo start" /> <MESSAGE value="icon fix + anteo start" />
<MESSAGE value="anteo prototype" /> <MESSAGE value="anteo prototype" />
<MESSAGE value="anteo beta" /> <MESSAGE value="anteo beta" />
@ -1174,7 +1172,8 @@
<MESSAGE value="play fix" /> <MESSAGE value="play fix" />
<MESSAGE value="lib history and set fix" /> <MESSAGE value="lib history and set fix" />
<MESSAGE value="wh update" /> <MESSAGE value="wh update" />
<option name="LAST_COMMIT_MESSAGE" value="wh update" /> <MESSAGE value="resume_file" />
<option name="LAST_COMMIT_MESSAGE" value="resume_file" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
@ -1727,7 +1726,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.2336"> <state vertical-scroll-proportion="0.2336">
<caret line="48" column="23" selection-start-line="48" selection-start-column="23" selection-end-line="48" selection-end-column="23" /> <caret line="48" column="23" selection-start-line="48" selection-start-column="23" selection-end-line="48" selection-end-column="23" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1741,10 +1739,18 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/SearcherABC.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.02733119">
<caret line="43" column="41" selection-start-line="43" selection-start-column="41" selection-end-line="43" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Anteoloader.py"> <entry file="file://$PROJECT_DIR$/Anteoloader.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.5929054"> <state vertical-scroll-proportion="0.7154341">
<caret line="371" column="98" selection-start-line="371" selection-start-column="98" selection-end-line="371" selection-end-column="98" /> <caret line="366" column="95" selection-start-line="366" selection-start-column="95" selection-end-line="366" selection-end-column="95" />
<folding> <folding>
<element signature="e#24#785#1" expanded="false" /> <element signature="e#24#785#1" expanded="false" />
<element signature="e#788#802#0" expanded="true" /> <element signature="e#788#802#0" expanded="true" />
@ -1757,36 +1763,28 @@
<element signature="e#6324#8484#0" expanded="false" /> <element signature="e#6324#8484#0" expanded="false" />
<element signature="e#8521#8700#0" expanded="false" /> <element signature="e#8521#8700#0" expanded="false" />
<element signature="e#12184#12294#0" expanded="false" /> <element signature="e#12184#12294#0" expanded="false" />
<element signature="e#18906#19450#0" expanded="false" /> <element signature="e#18941#19485#0" expanded="false" />
<element signature="e#24025#24156#0" expanded="false" /> <element signature="e#24060#24191#0" expanded="false" />
<element signature="e#24199#24282#0" expanded="false" /> <element signature="e#24234#24317#0" expanded="false" />
<element signature="e#24324#24454#0" expanded="false" /> <element signature="e#24359#24489#0" expanded="false" />
<element signature="e#24497#24628#0" expanded="false" /> <element signature="e#24532#24663#0" expanded="false" />
<element signature="e#24699#24832#0" expanded="false" /> <element signature="e#24734#24867#0" expanded="false" />
<element signature="e#24881#25299#0" expanded="false" /> <element signature="e#24916#25334#0" expanded="false" />
<element signature="e#25341#25436#0" expanded="false" /> <element signature="e#25376#25471#0" expanded="false" />
<element signature="e#25486#26340#0" expanded="false" /> <element signature="e#25521#26375#0" expanded="false" />
<element signature="e#26381#26570#0" expanded="false" /> <element signature="e#26416#26605#0" expanded="false" />
<element signature="e#26603#26818#0" expanded="false" /> <element signature="e#26638#26853#0" expanded="false" />
<element signature="e#26851#28567#0" expanded="false" /> <element signature="e#26886#28602#0" expanded="false" />
<element signature="e#26902#27557#0" expanded="false" /> <element signature="e#26937#27592#0" expanded="false" />
<element signature="e#27587#27765#0" expanded="false" /> <element signature="e#27622#27800#0" expanded="false" />
<element signature="e#27795#27973#0" expanded="false" /> <element signature="e#27830#28008#0" expanded="false" />
<element signature="e#28004#28015#0" expanded="false" /> <element signature="e#28039#28050#0" expanded="false" />
<element signature="e#28059#28076#0" expanded="false" /> <element signature="e#28094#28111#0" expanded="false" />
<element signature="e#28129#28221#0" expanded="false" /> <element signature="e#28164#28256#0" expanded="false" />
<element signature="e#28296#28567#0" expanded="false" /> <element signature="e#28331#28602#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/SearcherABC.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-5.0225444">
<caret line="43" column="41" selection-start-line="43" selection-start-column="41" selection-end-line="43" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
</component> </component>
</project> </project>

View File

@ -355,15 +355,16 @@ class AnteoPlayer(xbmc.Player):
keep_complete = False keep_complete = False
keep_incomplete = False keep_incomplete = False
keep_files = False keep_files = False
resume_file = None
else: else:
keep_complete = True keep_complete = True
keep_incomplete = True keep_incomplete = True
keep_files = True keep_files = True
resume_file=os.path.join(self.userStorageDirectory, 'torrents', os.path.basename(self.torrentUrl)+'.resume_data')
dht_routers = ["router.bittorrent.com:6881","router.utorrent.com:6881"] dht_routers = ["router.bittorrent.com:6881","router.utorrent.com:6881"]
user_agent = 'uTorrent/2200(24683)' user_agent = 'uTorrent/2200(24683)'
self.pre_buffer_bytes = int(self.__settings__.getSetting("pre_buffer_bytes"))*1024*1024 self.pre_buffer_bytes = int(self.__settings__.getSetting("pre_buffer_bytes"))*1024*1024
resume_file=os.path.join(self.userStorageDirectory, 'torrents', os.path.basename(self.torrentUrl)+'.resume_data')
self.engine = Engine(uri=file_url(self.torrentUrl), download_path=self.userStorageDirectory, self.engine = Engine(uri=file_url(self.torrentUrl), download_path=self.userStorageDirectory,
connections_limit=connections_limit, download_kbps=download_limit, upload_kbps=upload_limit, connections_limit=connections_limit, download_kbps=download_limit, upload_kbps=upload_limit,