package com.viaccessorca.voplayerdemo.database;

import java.io.Serializable;

public class DatabaseInfo implements Serializable {

    public static final int DL_STATUS_NONE = 0;
    public static final int DL_STATUS_FULLY_LOCAL = 1;
    public static final int DL_STATUS_DOWNLOADING = 2;
    public static final int DL_STATUS_PAUSED = 3;

    public String associatedSubtitleFile;
    public String associatedTimedTextTrack;
    public int associatedTimedTextType;

    public String associatedAudioTrack;

    public int lastPlaybackPosInMs;
    public int mediaDurationInMs;

    public int DlStatus = DL_STATUS_NONE;

    // when 'DlStatus' = DL_STATUS_NONE, the following three values are irrelevant
    // and might not be accurate
    public int DLBitrate = -1;
    public int DLProgress = -1;
    public String DlLocalServerUrl = null;

    public String DLSelectedSubtitles = null;
    public String DLSelectedAudioTracks = null;


    public String toString() {
        return new String("Sub file: " + associatedSubtitleFile + "\n" +
                "sub track: " + associatedTimedTextTrack + "\n" +
                "sub track type: " + associatedTimedTextType + "\n" +
                "audio track: " + associatedAudioTrack + "\n" +
                        "duration: " + mediaDurationInMs + "\n" +
                                "resume time: " + lastPlaybackPosInMs);
    }
}
