Merge remote-tracking branch 'origin/master'
commit
1ae04c01d7
10
README.md
10
README.md
|
@ -1,4 +1,4 @@
|
||||||
script.module.torrent2http
|
script.module.pyrrent2http
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
This add-on is binding to [torrent2http](https://github.com/anteo/torrent2http) client.
|
This add-on is binding to [torrent2http](https://github.com/anteo/torrent2http) client.
|
||||||
|
@ -19,7 +19,7 @@ Getting list of files inside torrent is straightforward:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import xbmc
|
import xbmc
|
||||||
from torrent2http import State, Engine, MediaType
|
from pyrrent2http import State, Engine, MediaType
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
|
||||||
# Create instance of Engine
|
# Create instance of Engine
|
||||||
|
@ -42,7 +42,7 @@ with closing(engine):
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import xbmc
|
import xbmc
|
||||||
from torrent2http import State, Engine, MediaType
|
from pyrrent2http import State, Engine, MediaType
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
|
||||||
# XBMC addon handle
|
# XBMC addon handle
|
||||||
|
@ -105,8 +105,4 @@ with closing(engine):
|
||||||
while not xbmc.abortRequested and xbmc.Player().isPlaying():
|
while not xbmc.abortRequested and xbmc.Player().isPlaying():
|
||||||
xbmc.sleep(500)
|
xbmc.sleep(500)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Fully working example ###
|
|
||||||
|
|
||||||
You can look into fully working [example](https://github.com/anteo/plugin.video.okino/blob/master/resources/lib/okino/torrent/stream/t2h_stream.py). This is
|
|
||||||
excerpt from my plugin using script.module.torrent2http. It rather complicated but it includes error handling, showing progress dialog and other features.
|
|
||||||
|
|
Loading…
Reference in New Issue