Send Cookie with Player for Streaming or Stream a File of the HD?
#1
I must send a cookie with every request to download a file from Rapidshare Servers.

Is there a way to send a cookie along with a request that is made by the player?

Or, Can I somehow stream a file that is currently downloading to the HD.

I am able to download a file and when it completes a pre-defined Percent initiate Playback of the file on the hard-drive.

I can do this by using the ftp server to "stream" the file back to the XBOX.
The file will continue to download to the HD completely.
However, once the player reaches the pre-defined percent it will stop, even though the file is now completely downloaded.

How can I fix this? A way to send a cookie with a Player request would be best.

I think the reason it dosen't work is because when the player streams a file, it gets the content length, which would be the size of the file at the time playing is initiated.

Possible Fixes I have thought of, when file reaches a new percent, use player().getTime()
then play the file again, and use the player().seekTime()
This dosen't work very well.

Could I write the First Section of the file, then the last, and the fill in the middle? (While it is playing) So that when the player makes the initial request it will get the entire content length? Is this possible? Thanks
Reply
#2
http://docs.python.org/library/stdtypes....le-objects

Found the answer on this site:
file.truncate()

I use the page.info() to get the content size. Then truncate the file to the size before writing begins.
May not work on Linux.
Reply

Logout Mark Read Team Forum Stats Members Help
Send Cookie with Player for Streaming or Stream a File of the HD?0