summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntti Ajanki <antti.ajanki@iki.fi>2011-07-12 10:03:21 +0300
committerAntti Ajanki <antti.ajanki@iki.fi>2011-07-12 10:03:21 +0300
commit2a9b0cc6e92189b42fadf44da2d85e1d7a8b4dee (patch)
treedef57ef24953eba1e4f7a8c2a527eed94becb751
parente1257449b0659cf7d0b0e96b0cc8bee277b68af7 (diff)
downloadvdr-plugin-webvideo-2a9b0cc6e92189b42fadf44da2d85e1d7a8b4dee.tar.gz
vdr-plugin-webvideo-2a9b0cc6e92189b42fadf44da2d85e1d7a8b4dee.tar.bz2
Remove temporary file
-rw-r--r--src/webvicli/webvicli/client.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/webvicli/webvicli/client.py b/src/webvicli/webvicli/client.py
index c15f073..78e1a2d 100644
--- a/src/webvicli/webvicli/client.py
+++ b/src/webvicli/webvicli/client.py
@@ -505,6 +505,18 @@ class WVClient:
if retcode > 0:
print 'Player failed with returncode', retcode
else:
+ # After the player has finished, the library
+ # generates a read event on a control socket. When
+ # the client calls perform on the socket the
+ # library removes temporary files.
+ readfds, writefds = webvi.api.fdset()[1:3]
+ readyread, readywrite, readyexc = \
+ select.select(readfds, writefds, [], 0.1)
+ for fd in readyread:
+ webvi.api.perform(fd, WebviSelectBitmask.READ)
+ for fd in readywrite:
+ webvi.api.perform(fd, WebviSelectBitmask.WRITE)
+
return True
except OSError, err:
print 'Execution failed:', err