Revision 45:0033259c6772 utilities/track/track.cpp

View differences:

utilities/track/track.cpp
454 454
    guessWorkFromTitle(filepart, scale, composer, guesses);
455 455
}
456 456

  
457
TrackFile *
457
Signal *
458 458
guess(QString track)
459 459
{
460 460
    cout << endl;
461 461
    cout << "Guessing composer for: " << track << endl;
462 462

  
463
//    cerr << "Creating TrackFile object...";
463
//    cerr << "Creating Signal...";
464 464
    FileSource fs(track);
465
    TrackFile *tf = new TrackFile(fs);
465
    Signal *tf = new Signal;
466
    tf->addAvailableAs(new AudioFile(fs));
466 467
//    cerr << "done" << endl;
467 468
//    cerr << "hash = " << tf->hash() << endl;
468 469

  
......
701 702

  
702 703
    ObjectStorer *localStorer = new ObjectStorer(&localStore);
703 704
    localStorer->setTypeMapping(tm);
704
//    localStorer->setFollowPolicy(ObjectStorer::FollowObjectProperties);
705
    localStorer->setFollowPolicy(ObjectStorer::FollowObjectProperties);
706
    localStorer->setPropertyStorePolicy(ObjectStorer::StoreIfChanged);
705 707

  
706 708
    if (command == "guess") {
707 709
        if (args.empty()) usage(argv[0]);
708 710
        foreach (QString track, args) {
709
            TrackFile *tf = guess(track);
711
            Signal *tf = guess(track);
710 712
            localStorer->store(tf);
711 713
        }
712
    } 
714
    } else {
715
        usage(argv[0]);
716
    }
713 717

  
714 718
    delete localStorer;
715 719
    localStore.save("local.ttl");

Also available in: Unified diff