Updated README.md
parent
8c8944b822
commit
56e97e1f46
|
@ -17,6 +17,7 @@ Usage
|
|||
|
||||
Getting list of files inside torrent is straightforward:
|
||||
|
||||
```python
|
||||
import xbmc
|
||||
from torrent2http import State, Engine, MediaType
|
||||
from contextlib import closing
|
||||
|
@ -35,9 +36,11 @@ Getting list of files inside torrent is straightforward:
|
|||
# Check if there is loading torrent error and raise exception
|
||||
engine.check_torrent_error()
|
||||
xbmc.sleep(200)
|
||||
```
|
||||
|
||||
### Start streaming ###
|
||||
|
||||
```python
|
||||
import xbmc
|
||||
from torrent2http import State, Engine, MediaType
|
||||
from contextlib import closing
|
||||
|
@ -101,6 +104,7 @@ Getting list of files inside torrent is straightforward:
|
|||
# Wait until playing finished or abort requested
|
||||
while not xbmc.abortRequested and xbmc.Player().isPlaying():
|
||||
xbmc.sleep(500)
|
||||
```
|
||||
|
||||
### Fully working example ###
|
||||
|
||||
|
|
Loading…
Reference in New Issue