Topic: /psp/url_streams
What are the "id" attributes for in stream entities in /psp/url_streams? Are they necessary? If so, how would we generate them if we want to write a CGI script to assist in the creation of streams?
wayn3w
You are not logged in. Please login or register.
chumbysphere forum → Software → /psp/url_streams
What are the "id" attributes for in stream entities in /psp/url_streams? Are they necessary? If so, how would we generate them if we want to write a CGI script to assist in the creation of streams?
wayn3w
don t care about that , if they are different it will work.
check out my post on that cgi script to remotely edit url_streams : http://forum.chumby.com/viewtopic.php?id=2219
try it and if you find better solution to my slow functions let me know please (i did it quickly from scratch using sh, better with perl next time)
The IDs are basically GUIDs - they are unique to each stream, and are currently generated by computing an MD5 hash from the time in milliseconds from the epoch - this would allow some server synchronization sometime in the future. If you manufacture them yourself, then you must insure that they meet the same requirements.
The IDs are basically GUIDs - they are unique to each stream, and are currently generated by computing an MD5 hash from the time in milliseconds from the epoch - this would allow some server synchronization sometime in the future. If you manufacture them yourself, then you must insure that they meet the same requirements.
Thanks Duane! If you don;t mind, I'll put this on the Wiki
Clebaudy -- I'm glad you wrote the script -- it's been somthing I've been meaning to do for a while.
wayn3w
if they are symchonized from a server then i think this script has no more any use.
Just tell me how to copute it if i can do it in sh. What is the epoch ? you mean it is just the time of the cumby in millisecond from the 1 january 1970 as in Java (i develop using java at work). I don't think chumby has the correct time using internet synchro at the millisecond, it is never exact the time so the MD5 hash is approximative, no way to know wich hash is the youngest, you can only know that they are not the same.
tonigth i will speed up my script, it is still crap on the parsing of HTTP parameters, too many awk kills the awk ! Maybe i try it in perl. What kind of other scripting lenguages are available nativly ? or intalling a small exe or lib ?
I have put a 4Gb usb drive inside the chumby using a hub (i am in france so the warranty i dont care about).
done !
all recoded in perl : http://forum.chumby.com/viewtopic.php?pid=12553#p12553
still looking for a solution to generate this MD5 hash of the time in millis, the problem is that perl only gives me time in seconds one idea ? or should i multiply by 1000 ?
much better now.
still looking for a solution to generate this MD5 hash of the time in millis, the problem is that perl only gives me time in seconds one idea ? or should i multiply by 1000 ?
Multiply by 1000 -- the simplest solution is often the best.
wayn3w
chumbysphere forum → Software → /psp/url_streams
Powered by PunBB, supported by Informer Technologies, Inc.