Ejemplo n.º 1
0
        //New Style for version 1.7.6+
        public PlaylistEntry(PlaylistJson PlaylistEntry)
        {
            RomPath      = PlaylistEntry.path;
            RomName      = PlaylistEntry.label;
            CorePath     = PlaylistEntry.core_path;
            CoreName     = PlaylistEntry.core_name;
            Checksum     = PlaylistEntry.crc32;
            PlaylistName = PlaylistEntry.db_name.Substring(0, PlaylistEntry.db_name.Length - 4);//Remove .lpl at the end of the string

            AbsoluteZipPath = GetAbsoluteZipPath(RomPath);
            AssociatedThumb = Thumbnail.NewThumbnailEntry(PlaylistName, RomName);
        }
Ejemplo n.º 2
0
        public static ThumbnailsEntry NewThumbnailEntry(string playlist, string romName)
        {
            ThumbnailsEntry thumb = new ThumbnailsEntry(playlist, romName);

            if (thumb.FilesExists == true)
            {
                AssociatedThumbs.Add(thumb.BoxartPath);
                AssociatedThumbs.Add(thumb.SnapPath);
                AssociatedThumbs.Add(thumb.TitlePath);
            }

            MissingFiles.AddRange(thumb.MissingFiles);
            return(thumb);
        }
Ejemplo n.º 3
0
        //Old Style for version pre 1.7.6
        public PlaylistEntry(string[] rawPlaylistEntry)
        {
            if (rawPlaylistEntry.Length == 6)
            {
                for (int i = 0; i < 6; i++)
                {
                    string line = rawPlaylistEntry[i];

                    switch (i)
                    {
                    case 0:
                        RomPath = line;
                        break;

                    case 1:
                        RomName = line;
                        break;

                    case 2:
                        CorePath = line;
                        break;

                    case 3:
                        CoreName = line;
                        break;

                    case 4:
                        Checksum = line;
                        break;

                    case 5:
                        PlaylistName = line.Substring(0, line.Length - 4);    //Remove .lpl at the end of the string
                        break;

                    default:
                        break;
                    }
                }
            }

            AbsoluteZipPath = GetAbsoluteZipPath(RomPath);
            AssociatedThumb = Thumbnail.NewThumbnailEntry(PlaylistName, RomName);
        }