Changeset 92bcb2c6b2d60f7860b4482d7473d7a37176da26

Show
Ignore:
Timestamp:
03/26/08 21:48:03 (10 months ago)
Author:
Jason Michalski <armooo@armooo.net>
git-committer:
Jason Michalski <armooo@armooo.net> 1206586083 -0500
git-parent:

[053f565171933eb6a36704da06bb93934f1b651b]

git-author:
Jason Michalski <armooo@armooo.net> 1206586083 -0500
Message:

Now using UDP socket to tivo.com to get our ip address.

It will not send any packets, and we will get the address that has
out default route.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/video/video.py

    r7c23e77 r92bcb2c  
    445445 
    446446        import socket 
    447         ip, port = handler.connection.getsockname() 
     447        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 
     448        s.connect(('tivo.com',123)) 
     449        ip = s.getsockname()[0] 
    448450        container = quote(query['Container'][0].split('/')[0]) 
     451        port = config.getPort() 
    449452 
    450453        url = 'http://%s:%s/%s%s' % (ip, port, container, quote(file))