Updated README.md

sandbox1
Anton Argirov 2015-02-06 12:59:04 +06:00
parent 8c8944b822
commit 56e97e1f46
1 changed files with 81 additions and 77 deletions

View File

@ -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 ###