﻿/* TrackObject.js - Holds Javascript track object */
//Used in SearchResultsAjaxProcessor.aspx 

//Global Variables ***

    //An array of all the track objects
    var arrTrackObjects = new Array();

//Objects ***

    //This object holds track info
    function TrackObject (trackid, artist , title, startTimeUTC, runTime, correctedOffsetSeconds, correctedDuration, mediaurl)
    {
        this.TrackID = trackid;
        this.Artist = artist;
        this.Title = title;
        this.StartTimeUTC = startTimeUTC;
        this.RunTime = runTime;
        this.MediaUrl = mediaurl;
        
        if (correctedOffsetSeconds == "undefined")
        {
            this.CorrectedStartOffsetSeconds = correctedOffsetSeconds;
        }
        else
        {
            this.CorrectedStartOffsetSeconds = correctedOffsetSeconds;
        }
        if (correctedDuration == "undefined")
        {
            this.CorrectedDurationSeconds = 0;
        }
        else
        {
            this.CorrectedDurationSeconds = correctedDuration;
        }
        this.Selected = false;
        this.ClipFilePath = "";
    }

    function AlbumObject(artist, title, album, released, artURL, pNotes, FlyCastStationName)
    {
        this.Artist = artist;
        this.Title = title;
        this.Album = album;
        this.Released = released;
        this.ArtURL = artURL;
        this.ArtURL450 = artURL.replace("Muze","Muze450");
        this.Notes = pNotes;
        this.Selected = false;
        if (FlyCastStationName == "undefined")
        {
            this.FlyCastStationName = "";
        }
        else
        {
            this.FlyCastStationName = FlyCastStationName;
        }
        
    }


