<commit_before>package pman.media.info;

import tannus.io.*;
import tannus.ds.*;
import tannus.sys.*;

import pman.core.*;
import pman.display.*;
import pman.display.media.*;
import pman.db.*;
import pman.media.*;
import pman.db.MediaStore;
import pman.db.ActorsStore;
import pman.media.MediaType;

import haxe.Serializer;
import haxe.Unserializer;

import electron.Tools.defer;

using StringTools;
using tannus.ds.StringUtils;
using Lambda;
using tannus.ds.ArrayTools;
using Slambda;
using pman.media.MediaTools;

class Actor {
    public function new(name:String, ?id:Int, ?gender:ActorGender):Void {
        this.name = name;
        this.id = id;
        this.gender = gender;
    }

/* === Instance Methods === */

    public function clone():Actor {
        return new Actor(name, id, gender);
    }

    public function toRow():ActorRow {
        return {
            id: id,
            name: name,
            gender: (gender!=null?gender.getIndex():null)
        };
    }

/* === Instance Fields === */

    public var id : Null<Int>;
    public var name : String;
    public var gender : Null<ActorGender>;

/* === Static Methods === */

    public static function fromRow(row : ActorRow):Actor {
        return new Actor(row.name, row.id, (row.gender != null?ActorGender.createByIndex( row.gender ):null));
    }
}

enum ActorGender {
    Male;
    Female;
}
<commit_msg>updated the pman.media.info.Actor type<commit_after>package pman.media.info;

import tannus.io.*;
import tannus.ds.*;
import tannus.sys.*;

import pman.core.*;
import pman.display.*;
import pman.display.media.*;
import pman.media.*;
import pman.media.MediaType;
import pman.edb.*;
import pman.edb.ActorStore;

import haxe.Serializer;
import haxe.Unserializer;

import electron.Tools.defer;

using StringTools;
using tannus.ds.StringUtils;
using Lambda;
using tannus.ds.ArrayTools;
using Slambda;
using pman.media.MediaTools;

class Actor {
    public function new(name:String, ?id:String):Void {
        this.name = name;
        this.id = id;
        //this.gender = gender;
    }

/* === Instance Methods === */

    /**
      * create and return a copy of [this] Actor object
      */
    public function clone():Actor {
        return new Actor(name, id);
    }

    /**
      * convert [this] Actor object to an ActorRow object
      */
    public function toRow():ActorRow {
        return {
            _id: id,
            name: name
        };
    }

/* === Instance Fields === */

    public var id : Null<String>;
    public var name : String;

/* === Static Methods === */

    /**
      * convert an ActorRow to an Actor object
      */
    public static function fromRow(row : ActorRow):Actor {
        return new Actor(
            row.name,
            row._id
        );
    }
}

enum ActorGender {
    Male;
    Female;
}

{'fraction_non_alphanumeric': 0.13212894084307475, 'fraction_numerical': 0.0, 'mean_word_length': 2.5656565656565657, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2986017', 'n_tokens_mistral': 921, 'n_tokens_neox': 884, 'n_words': 230}