Exemplo n.º 1
0
 public override MelderInfo GetMelderInfo(string url)
 {
     if (Init(url))
     {
         DownloadAddon();
         AddonMetaData meta = AddonManager.ParseZipForIni(info.packedFile);
         if (meta != null)
         {
             MelderInfo mInfo = new MelderInfo();
             mInfo.IsNotSuported = !IsSupported();
             mInfo.Version = meta.Version;
             mInfo.Patch = meta.Patch;
             mInfo.ProviderType = meta.ProviderType;
             mInfo.Dlurl = url;
             return mInfo;
         }
     }
     return null;
 }
Exemplo n.º 2
0
        public bool IsAddonUptoDate(AddonMetaData addon, MelderInfo melderInfo)
        {
            // There are many ways to make a bad version string :<
            addon.Version = Statics.CleanVersionString(addon.Version);
            melderInfo.Version = Statics.CleanVersionString(melderInfo.Version);


            try
            {
                Version current = new Version(addon.Version);
                Version newVer = new Version(melderInfo.Version);

                return current.CompareTo(newVer) == 0 || current.CompareTo(newVer) == 1;
            }
            catch (Exception)
            {
                return false;
            }
        }