export default class MediaProfileSettings {
    /**
     * @type {boolean}
     */
    skipIntro = true;

    /**
     * @type {boolean}
     */
    skipOutro = true;

    /**
     * @type {boolean}
     */
    skipRecall = true;

    /**
     * @type {boolean}
     */
    skipPreview = true;

    /**
     * @param {object} jsonObj 
     * @returns {MediaProfileSettings}
     */
    static fromSettingsJson(jsonObj) {
        const settings = new MediaProfileSettings();

        if (jsonObj == null) {
            return settings;
        }

        if (jsonObj.skipIntro != null) {
            settings.skipIntro = jsonObj.skipIntro;
        }

        if (jsonObj.skipOutro != null) {
            settings.skipOutro = jsonObj.skipOutro;
        }

        if (jsonObj.skipRecall != null) {
            settings.skipRecall = jsonObj.skipRecall;
        }

        if (jsonObj.skipPreview != null) {
            settings.skipPreview = jsonObj.skipPreview;
        }

        return settings;
    }
}