TVDB: better handling of first run
[nonametv.git] / tools / nonametv-cleardb
blobd119a2a6cb230719e679bb4c0b11cb02766c40ec
1 #!/usr/bin/perl -w
3 use strict;
5 use NonameTV;
6 use NonameTV::DataStore;
7 use NonameTV::Config qw/ReadConfig/;
9 use Getopt::Long;
11 # Read configuration
12 my $conf = ReadConfig();
14 # Create Datastore
15 my $ds = NonameTV::DataStore->new( $conf->{DataStore} );
17 print "Clearing all listings from database\n";
18 $ds->sa->Delete( "batches", {} );
19 $ds->sa->Delete( "programs", {} );
20 $ds->sa->Delete( "state", {} );