You've already forked AstralRinth
forked from didirus/AstralRinth
More project data (#406)
* More project data * Array_agg fixes + cleanup * fix prepare * Add approval dates to search * Update migrations/20220725204351_more-project-data.sql Co-authored-by: wafflecoffee <emmaffle@modrinth.com> * Add category labels + display categories Co-authored-by: wafflecoffee <emmaffle@modrinth.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use crate::validate::{
|
||||
SupportedGameVersions, ValidationError, ValidationResult,
|
||||
};
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
use std::io::Cursor;
|
||||
use time::OffsetDateTime;
|
||||
use zip::ZipArchive;
|
||||
|
||||
pub struct FabricValidator;
|
||||
@@ -22,8 +22,9 @@ impl super::Validator for FabricValidator {
|
||||
|
||||
fn get_supported_game_versions(&self) -> SupportedGameVersions {
|
||||
// Time since release of 18w49a, the first fabric version
|
||||
SupportedGameVersions::PastDate(OffsetDateTime::from_unix_timestamp(
|
||||
1543969469,
|
||||
SupportedGameVersions::PastDate(DateTime::from_utc(
|
||||
NaiveDateTime::from_timestamp(1543969469, 0),
|
||||
Utc,
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::validate::{
|
||||
SupportedGameVersions, ValidationError, ValidationResult,
|
||||
};
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
use std::io::Cursor;
|
||||
use time::OffsetDateTime;
|
||||
use zip::ZipArchive;
|
||||
|
||||
pub struct ForgeValidator;
|
||||
@@ -22,8 +22,9 @@ impl super::Validator for ForgeValidator {
|
||||
|
||||
fn get_supported_game_versions(&self) -> SupportedGameVersions {
|
||||
// Time since release of 1.13, the first forge version which uses the new TOML system
|
||||
SupportedGameVersions::PastDate(OffsetDateTime::from_unix_timestamp(
|
||||
1540122067,
|
||||
SupportedGameVersions::PastDate(DateTime::<Utc>::from_utc(
|
||||
NaiveDateTime::from_timestamp(1540122067, 0),
|
||||
Utc,
|
||||
))
|
||||
}
|
||||
|
||||
@@ -67,8 +68,14 @@ impl super::Validator for LegacyForgeValidator {
|
||||
fn get_supported_game_versions(&self) -> SupportedGameVersions {
|
||||
// Times between versions 1.5.2 to 1.12.2, which all use the legacy way of defining mods
|
||||
SupportedGameVersions::Range(
|
||||
OffsetDateTime::from_unix_timestamp(1366818300),
|
||||
OffsetDateTime::from_unix_timestamp(1505810340),
|
||||
DateTime::from_utc(
|
||||
NaiveDateTime::from_timestamp(1366818300, 0),
|
||||
Utc,
|
||||
),
|
||||
DateTime::from_utc(
|
||||
NaiveDateTime::from_timestamp(1505810340, 0),
|
||||
Utc,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ use crate::validate::modpack::ModpackValidator;
|
||||
use crate::validate::plugin::*;
|
||||
use crate::validate::quilt::QuiltValidator;
|
||||
use crate::validate::resourcepack::{PackValidator, TexturePackValidator};
|
||||
use chrono::{DateTime, Utc};
|
||||
use std::io::Cursor;
|
||||
use thiserror::Error;
|
||||
use time::OffsetDateTime;
|
||||
use zip::ZipArchive;
|
||||
|
||||
mod fabric;
|
||||
@@ -59,8 +59,8 @@ impl ValidationResult {
|
||||
|
||||
pub enum SupportedGameVersions {
|
||||
All,
|
||||
PastDate(OffsetDateTime),
|
||||
Range(OffsetDateTime, OffsetDateTime),
|
||||
PastDate(DateTime<Utc>),
|
||||
Range(DateTime<Utc>, DateTime<Utc>),
|
||||
#[allow(dead_code)]
|
||||
Custom(Vec<GameVersion>),
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::validate::{
|
||||
SupportedGameVersions, ValidationError, ValidationResult,
|
||||
};
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
use std::io::Cursor;
|
||||
use time::OffsetDateTime;
|
||||
use zip::ZipArchive;
|
||||
|
||||
pub struct QuiltValidator;
|
||||
@@ -21,9 +21,9 @@ impl super::Validator for QuiltValidator {
|
||||
}
|
||||
|
||||
fn get_supported_game_versions(&self) -> SupportedGameVersions {
|
||||
// Time since release of 18w49a, the first fabric version
|
||||
SupportedGameVersions::PastDate(OffsetDateTime::from_unix_timestamp(
|
||||
1646070100,
|
||||
SupportedGameVersions::PastDate(DateTime::from_utc(
|
||||
NaiveDateTime::from_timestamp(1646070100, 0),
|
||||
Utc,
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::validate::{
|
||||
SupportedGameVersions, ValidationError, ValidationResult,
|
||||
};
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
use std::io::Cursor;
|
||||
use time::OffsetDateTime;
|
||||
use zip::ZipArchive;
|
||||
|
||||
pub struct PackValidator;
|
||||
@@ -22,8 +22,9 @@ impl super::Validator for PackValidator {
|
||||
|
||||
fn get_supported_game_versions(&self) -> SupportedGameVersions {
|
||||
// Time since release of 13w24a which replaced texture packs with resource packs
|
||||
SupportedGameVersions::PastDate(OffsetDateTime::from_unix_timestamp(
|
||||
1371137542,
|
||||
SupportedGameVersions::PastDate(DateTime::from_utc(
|
||||
NaiveDateTime::from_timestamp(1371137542, 0),
|
||||
Utc,
|
||||
))
|
||||
}
|
||||
|
||||
@@ -59,8 +60,14 @@ impl super::Validator for TexturePackValidator {
|
||||
fn get_supported_game_versions(&self) -> SupportedGameVersions {
|
||||
// a1.2.2a to 13w23b
|
||||
SupportedGameVersions::Range(
|
||||
OffsetDateTime::from_unix_timestamp(1289339999),
|
||||
OffsetDateTime::from_unix_timestamp(1370651522),
|
||||
DateTime::from_utc(
|
||||
NaiveDateTime::from_timestamp(1289339999, 0),
|
||||
Utc,
|
||||
),
|
||||
DateTime::from_utc(
|
||||
NaiveDateTime::from_timestamp(1370651522, 0),
|
||||
Utc,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user