package com.yutou.nas.Datas.Jellyfin;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.annotation.JSONField;
import com.yutou.nas.utils.AppTools;
import lombok.Data;

import java.io.File;
import java.util.List;

@Data
public  class ItemInfo {
    private String name;
    private String serverID;
    private String id;
    private String etag;
    private String dateCreated;
    private String dateLastMediaAdded;
    private String path;
    private String sortName;
    @JSONField(name = "ParentId")
    private String parentID;
    private String playAccess;
    private String type;
    private String displayPreferencesID;
    private String locationType;
    private long localTrailerCount;
    private long recursiveItemCount;
    private long childCount;
    private long specialFeatureCount;
    private boolean canDownload;
    private boolean canDelete;
    private boolean enableMediaSourceDisplay;
    private boolean isFolder;
    private boolean lockData;
    private double primaryImageAspectRatio;
    private Object channelID;

    private Object[] externalUrls;
    private Object[] remoteTrailers;
    private Object[] genreItems;
    private Object[] airDays;
    private Object[] screenshotImageTags;
    private Object[] lockedFields;
    private List<Studios> studios;
    private List<People> people;
    private JSONArray backdropImageTags;
    private JSONArray genres;
    private JSONArray taglines;
    private JSONArray tags;

    public String getPath() {
        if (AppTools.isRuntimeSystemOfWindow()) {
            if (path != null) {
                path = path.replace("/media/yutou/disk_lvm/public/download/anim/", "Z:\\download\\anim\\").replace("/", File.separator);
            }
        }
        return path;
    }
}