Skip Menu |

This queue is for tickets about the Net-TiVo CPAN distribution.

Report information
The Basics
Id: 24140
Status: resolved
Priority: 0/
Queue: Net-TiVo

People
Owner: Nobody in particular
Requestors: richard [...] richardharman.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Some folders, eg TiVo Suggestions can exist but be empty
Date: Fri, 29 Dec 2006 03:57:05 -0500
To: bug-Net-TiVo [...] rt.cpan.org
From: Richard Harman <richard [...] richardharman.com>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bugfix patch, inlined and attached. - --- /usr/lib/perl5/site_perl/5.6.1/Net/TiVo.pm Wed Aug 2 21:40:11 2006 +++ TiVo.pm Fri Dec 29 03:45:42 2006 @@ -108,7 +108,14 @@ # haven't created any folders yet, then this is the Now Playing # folder, and needs to be treated specially. push @$folder_aref, Net::TiVo::Folder->new(xmlref => $xmlref); - - INFO("added the folder " . $folder_aref->[-1]->name()); + + # 2006/12/29 - RHARMAN: TiVo Suggestions can exist but contain zero videos + if ($folder_aref->[-1]->total_items() > 0) { + INFO("added the folder " . $folder_aref->[-1]->name()); + } else { + INFO("skipped the folder " , $folder_aref->[-1]->name(), " because it was empty."); + pop @$folder_aref; + } for my $i (@{$xmlref->{Item}}) { my $ct = $i->{Links}->{Content}->{ContentType}; - -- - ----------------------------------------------------------- "Looks like there'll be no money for you, Crazy Round Man." - Samurai Jack Richard G Harman Jr <me+nospam@richardharman.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFFlNhh3rKdb192Vz8RAosBAKCtZyAnUAMzVg4qcNpNKLw0NyIIFQCfTKy3 Z3gGPasAiZKwQklxBuAh1PA= =blFT -----END PGP SIGNATURE-----
--- /usr/lib/perl5/site_perl/5.6.1/Net/TiVo.pm Wed Aug 2 21:40:11 2006 +++ TiVo.pm Fri Dec 29 03:45:42 2006 @@ -108,7 +108,14 @@ # haven't created any folders yet, then this is the Now Playing # folder, and needs to be treated specially. push @$folder_aref, Net::TiVo::Folder->new(xmlref => $xmlref); - INFO("added the folder " . $folder_aref->[-1]->name()); + + # 2006/12/29 - RHARMAN: TiVo Suggestions can exist but contain zero videos + if ($folder_aref->[-1]->total_items() > 0) { + INFO("added the folder " . $folder_aref->[-1]->name()); + } else { + INFO("skipped the folder " , $folder_aref->[-1]->name(), " because it was empty."); + pop @$folder_aref; + } for my $i (@{$xmlref->{Item}}) { my $ct = $i->{Links}->{Content}->{ContentType};
This bug was resolved (in 0.04), but not updated.