#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package MediaServe::Audio::Processor;
use strict;
use warnings;

use lib '/app/tools/common/lib';
use Common::RSApp;
use Common::Util;
use Common::Assert;

use lib '/app/tools/mediaserve/lib';
use MediaServe::Audio::Matcher;

use base 'MediaServe::Processor';

sub _process {
    my $self = shift;
    assert($self);

    # Match assets in the database
    $self->match_audio_assets();
}

sub match_audio_assets {
    my $self      = shift;
    my $client_id = Common::RSApp::GetClientID();
    my $client_db = Common::RSDB::ClientIDToDBName($client_id);
    assert($self);

    $self->debug("- Starting audio asset matching ($client_id: $client_db)");
    my $matcher = new MediaServe::Audio::Matcher();
    my $count   = $matcher->match_files();

    $self->log("Matched $count audio assets");

}

1;
