Changeset 1650 in ProjectBuilder
- Timestamp:
- Oct 6, 2012, 9:10:51 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/CDDBeditor/devel/CDDBeditor/bin/CDDBeditor
r1641 r1650 21 21 use lib qw (lib); 22 22 use locale; 23 # > 2.2723 # >= 2.27 24 24 use CDDB_get qw( get_cddb get_discids ); 25 25 use Encode; … … 139 139 $pbdebug=-1; 140 140 } 141 pb_log_init($pbdebug, $pbLOG);142 141 open(LOG, "> $ENV{HOME}/.CDDBeditor.log") || die "Unable to open $ENV{HOME}/.CDDBeditor.log"; 142 pb_log_init($pbdebug, \*LOG); 143 143 144 144 Newt::Init(); … … 190 190 $ce_config{"DOMAIN"} = "musique-ancienne.org"; 191 191 $ce_config{"USER"} = "bruno"; 192 $ce_config{"HELLO_ID"} = "$ce_config{\"USER\"} $ce_config{\"DOMAIN\"} fastrip 0.77"; 192 # Requires 4 words exactly 193 $ce_config{"HELLO_ID"} = "$ce_config{\"USER\"} $ce_config{\"DOMAIN\"} CDDBEditor 0.5"; 193 194 194 195 # Copied from CDDB.pm … … 206 207 # Need 23 char for track and time 207 208 my $width = $ce_sl - 23; 208 # Othe fields are limited to 5209 # Other fields are limited to 5 209 210 my $width2 = 5; 210 211 my $host_entry = Newt::Entry($width, $flag, $ce_config{"CDDB_HOST"}); … … 259 260 260 261 Newt::Cls(); 261 exit 0if ($data->Tag() eq "Quit");262 cddbe_exit(0) if ($data->Tag() eq "Quit"); 262 263 263 264 if ($ce_config{"CDDB_MODE"} eq "http" ) { … … 268 269 $ce_config{"CDDB_MODE"}=$ce_cddb_mode{$mode_group->Get()}; 269 270 $ce_config{"CD_DEVICE"}=$dev_entry->Get(); 271 272 pb_log(1,"After first screen\n"); 273 pb_log(1,"ce_config is:\n"); 274 pb_log(1,Dumper(%ce_config)."\n"); 270 275 271 276 # Components … … 287 292 288 293 # Entering the loop 289 for (my $i=0 ; ; $i++) { 290 # Second panel to make user wait 294 for (my $i=0 ; ; $i++) { # Second panel to make user wait 291 295 Newt::Cls(); 292 296 Newt::DrawRootText(ce_center_string($ce_title), 1, $ce_title); … … 303 307 # by default use first one 304 308 $ce_cd = $cecd[0] if (defined $cecd[0]); 309 pb_log(1,"After get_cddb\n"); 310 pb_log(1,"cecd is:\n"); 311 pb_log(1,Dumper(@cecd)."\n"); 305 312 } 306 313 $firsttime = 0; … … 320 327 $ind++; 321 328 } 329 pb_log(1,"ind is: $ind\n"); 322 330 323 331 if ($ind gt 1) { … … 346 354 347 355 Newt::Cls(); 348 exit 0if ($data->Tag() eq "Quit");356 cddbe_exit(0) if ($data->Tag() eq "Quit"); 349 357 350 358 $ind=$user_group->Get(); 359 } else { 360 # if only one CD, back to its number which is 0 361 $ind--; 351 362 } 352 363 # Point now to the right CD 353 364 $ce_cd = $cecd[$ind]; 365 pb_log(1,"After CD choice\n"); 366 pb_log(1,"ce_cd is: \n"); 367 pb_log(1,Dumper($ce_cd)."\n"); 354 368 355 369 if (not defined $ce_cd->{title}) { … … 358 372 $ce_cd->{id} = sprintf "%08x", $id->[0]; 359 373 374 pb_log(1,"After get_discids\n"); 375 pb_log(1,"id is:\n"); 376 pb_log(1,Dumper($id)."\n"); 377 pb_log(1,"ce_cd is:\n"); 378 pb_log(1,Dumper($ce_cd)."\n"); 360 379 # Try to find it locally 361 380 my @d = glob("$ENV{'HOME'}/.cddb/*/$ce_cd->{id}"); … … 507 526 Newt::Refresh(); 508 527 Newt::Cls(); 509 exit 0 if ($data->Tag() eq "Quit"); 528 cddbe_exit(0) if ($data->Tag() eq "Quit"); 529 530 pb_log(1,"Before sending\n"); 531 pb_log(1,"ce_cd is:\n"); 532 pb_log(1,Dumper($ce_cd)."\n"); 510 533 511 534 # Send the data … … 539 562 } 540 563 Newt::Finished(); 541 exit 0;564 cddbe_exit(0); 542 565 543 566 # return the char to start printing a centered string based on screen size … … 594 617 } 595 618 619 sub cddbe_exit { 620 621 my $ret = shift; 622 close(LOG); 623 exit $ret 624 } 625 596 626 1;
Note:
See TracChangeset
for help on using the changeset viewer.