[mythtv] [PATCH] Add recording length to MythWeb

Eric Andresen ruler111 at cox.net
Mon Apr 7 07:18:46 EDT 2003


On Mon, 2003-04-07 at 05:26, Robert wrote:
> Quoting Isaac Richards <ijr at po.cwru.edu>:
> 
> 
> 
> 
> > On Sunday 06 April 2003 07:28 am, mythtv at slackassbastards.org wrote:
> 
> 
> > > Attached are patches for MythWeb that will display the recording length
> 
> 
> > for
> 
> 
> > > programs under the recorded programs list.  Total recording time for all
> 
> 
> > > programs is also displayed.
> 
> 
> > 
> 
> 
> > Thanks, applied.
> 
> 
> > 
> 
> 
> > > On a related subject, does anyone else have problems with the filesizes
> 
> 
> > > being displayed properly in the recorded programs list in MythWeb?  On
> 
> 
> > some
> 
> 
> > > programs I get negative file sizes.  I've checked and the problem appears
> 
> 
> > > to come from the results that MythWeb gets from the backend when doing
> 
> 
> > > "QUERY_RECORDINGS Delete".  It's very strange as the file sizes are
> 
> 
> > > displayed properly in Mythfrontend.
> 
> 
> > 
> 
> 
> > The issue is that mythweb isn't reading the entire filesize -- it's two
> 
> 
> > fields 
> 
> 
> > long, not one, since Qt doesn't deal with 64-bit types in its toString 
> 
> 
> > conversion functions.  Check out the encodeLongLong and decodeLongLong 
> 
> 
> > functions in libs/libmyth/util.cpp, and see how they're used to convert a 
> 
> 
> > filesize in libs/libmythtv/programinfo.cpp (ToStringList and
> 
> 
> > FromStringList).
> 
> 
> > 
> 
> 
> > Also, does php do 64-bit integers?
> 
> 
> 
> 
> PHP does not do 64-bit ints. I looked over the functions you mentioned and I 
> should be able to do the same conversions in PHP.  I'll work on the patch today 
> and let everyone know how it turns out.
> 

If you haven't figured it out already, the problem lies in the use of
preg_match() to parse the data from the backend at line 733 in
functions.php, since preg_match() doesn't support a type l


-- 
--Eric Andresen
  ndiin at asu.edu



More information about the mythtv-dev mailing list