Re: Queue.php / Push.php

From: Stefan Kaczmarek <stefan_at_thezonie.org>
Date: Thu, 29 Mar 2007 14:22:50 -0700

So the push.php gives me the top of the queue ... What if I want to
download three at a time?

Are you still keeping track of "status" ... Because I don't think you
need to. I think you just need to know if it is incomplete (keep it
in the queue) or complete (pop it off the queue and add it to the
history). That way I can do a push.php and get back the top 3 (or
whatever) of the queue, which are the files that I should be
downloading. Maybe I can include a num to say how many of the top
ones I want or something. That way, when the user changes his queue
around, the app can just be told to re-check the queue, and it'll get
the hashes that it should currently be transferring. If it is
transferring hashes it shouldn't be, those'll be stopped, and the
correct ones will be started.

We could also just combine queue.php and push.php together and just
have an optional num param to limit the num of returns when looking
for the push hashes.

- Z

On Mar 28, 2007, at 1:14 AM, Dylan Douglas wrote:

> Z-
>
> I've stubbed the metadata.php script. It queries the database, so
> call it using "e8c8446ae2c09a85eeb44dcf8aad2239e43c813d". The vars
> are hash and callback. The return for this hash and callback
> "sexytime" is:
>
> sexytime( { "hash": "e8c8446ae2c09a85eeb44dcf8aad2239e43c813d",
> "title": "Sexytime Bikini Beach.avi", "size": "122649320",
> "codec": "dv50", "length": "4871", "views": "29710", "tags":
> [ { "tag": "b00bies" }, { "tag": "flashing" }, { "tag": "ggw" },
> { "tag": "naughty" }, { "tag": "porn" } ] } )
>
> I can add others, but thought this would be good enough to start with.
>
> -D
> Ps. the hash also has a thumbnail associated with it.
>
>
> ----------
> Dylan Douglas
> MediaDefender
>
> From: Stefan Kaczmarek [mailto:stefan_at_thezonie.org]
> Sent: Tue 3/27/2007 2:56 PM
> To: Dylan Douglas
> Cc: Ben Ebert; Ivan Kwok; Jay Mairs; Ty Heath
> Subject: Re: Queue.php / Push.php
>
> Okay, so I've updated the files at http://md.thezonie.com/
>
> It is assuming that TheZonie is logged in, and it is getting the
> Recent Download and Queue data from the server. (It is also getting
> the Library stuff if you have the application running, which none of
> you will at this point.)
>
> It would be cool if some of the recently downloaded and queue hashes
> could have valid thumbnails associated with them. ;)
>
> I see that the queue data is "hash", "position", and "status". I
> thought we wouldn't need the "status" in there, because the
> application will be updating what is transferring and what isn't in
> near-real-time, so the server doesn't need to tell me what's running
> and what's not.
>
> In terms of the queue position, I basically get notification when the
> order has changed, but not what changed where. What I have is the
> order of the objects, and those objects can have identifying data
> associated with them. So I can store the order of the objects, and
> then when it changes, I'll be able to see what the new order is. I am
> assuming I would then be able to figure out which one has moved, and
> then tell you which one moved, and to what other object's position it
> was.
>
> I'm fine with the modify.php ... Although maybe it should be
> modify_queue.php?
>
> Now, in terms of all the other meta-info about the hashes ... You
> know, file name, length, size, rating, etc. ... When's that going to
> be available? And will it come with the hashes as a part of the queue
> return? Or would I have to do a separate query for each hash to get
> its meta data? (That would suck balls.)
>
> - Z
>
> P.S. (There is some weirdness with the selection of the queue items,
> which I just noticed, but no big deal.)
>
> On Mar 27, 2007, at 12:27 PM, Dylan Douglas wrote:
>
> > Z-
> >
> > Fixed the queue.php and push.php scripts. Also created the
> > history.php
> > script. We probably should figure out a script for changing: queue
> > position/status (downloading/paused)/tivo (deleted/kept).
> >
> > modify.php? I couldn't come up with a better name.
> >
> > Anyway, it could be given variables: account=<string>,
> hash=<string>,
> > position=<int>, status=<lock|unlock>.
> >
> > We should use the position indicators that come from the
> database, not
> > what is displayed on the webpage. So, at some point you would
> > probably
> > say that someone moved something to queue position 10210 or some
> other
> > absurdly high number. I figured that it would be easier for you to
> > keep
> > the info on your side, rather than making the database do the
> > calculations.
> >
> > When someone moves something from 500 to 486, you should only
> send one
> > message to the web service. Don't send one for all the ones that
> just
> > jumped up one position, modify.php will take care of that part.
> >
> > -D
> >
> >> -----Original Message-----
> >> From: Stefan Kaczmarek [mailto:stefan_at_thezonie.org]
> >> Sent: Monday, March 26, 2007 8:41 PM
> >> To: Dylan Douglas
> >> Cc: Ben Ebert; Ivan Kwok; Jay Mairs; Ty Heath
> >> Subject: Re: Queue.php / Push.php
> >>
> >> D,
> >>
> >> When I do this:
> >>
> >> http://66.180.205.75/queue.php?account=TheZonie&callback=sexytime
> >>
> >> I get this:
> >>
> >> sexytime( { "queue": [ ] } )
> >>
> >> It looks like I have no queue. :(
> >>
> >> - Z
> >>
> >> On Mar 26, 2007, at 5:38 PM, Dylan Douglas wrote:
> >>
> >>> Z-
> >>>
> >>> Updated the queue.php and push.php scripts. They now are
> >> expecting an
> >>> account 1 to 128 characters. The only one right now is
> "TheZonie",
> >>> but
> >>> it has a queue of 100 hashes. The queue.php returns the current
> >>> downloads and hashes to download, but not the ones that have
> already
> >>> downloaded. Maybe we should have a history.php that would
> >> return only
> >>> completed downloads. push.php returns the next hash that is
> >>> waiting to
> >>> be downloaded.
> >>>
> >>> All the returns are now in JSON and should be working,
> >> although always
> >>> pulling the same info from the database.
> >>>
> >>> -D
> >>>
> >>> -----
> >>> Dylan Douglas
> >>> MediaDefender
> >>>
> >>>
> >>>
> >>> <winmail.dat>
> >>
> >>
>
>
Received on Fri Sep 14 2007 - 10:56:05 BST

This archive was generated by hypermail 2.2.0 : Sun Sep 16 2007 - 22:19:48 BST