Compare commits

...

22 Commits

Author SHA1 Message Date
c85832c93b chore: Release
All checks were successful
Continuous integration / Check (push) Successful in 1m28s
Continuous integration / Test Suite (push) Successful in 2m30s
Continuous integration / Rustfmt (push) Successful in 1m4s
Continuous integration / Trunk (push) Successful in 2m5s
Continuous integration / build (push) Successful in 2m24s
Continuous integration / Disallow unused dependencies (push) Successful in 5m0s
2026-01-08 08:54:01 -08:00
7e991186fe server: add indexes that should help with bulk read 2026-01-08 08:53:42 -08:00
95d06ec669 Merge pull request 'chore(deps): lock file maintenance' (#224) from renovate/lock-file-maintenance into master
All checks were successful
Continuous integration / Check (push) Successful in 1m18s
Continuous integration / Test Suite (push) Successful in 4m27s
Continuous integration / Rustfmt (push) Successful in 40s
Continuous integration / Trunk (push) Successful in 3m56s
Continuous integration / build (push) Successful in 1m56s
Continuous integration / Disallow unused dependencies (push) Successful in 5m9s
2026-01-04 16:32:18 -08:00
84810d8644 chore(deps): lock file maintenance
All checks were successful
Continuous integration / Check (push) Successful in 2m19s
Continuous integration / Trunk (push) Successful in 1m37s
Continuous integration / Rustfmt (push) Successful in 46s
Continuous integration / build (push) Successful in 4m33s
Continuous integration / Test Suite (push) Successful in 9m6s
Continuous integration / Disallow unused dependencies (push) Successful in 2m21s
2026-01-05 00:02:23 +00:00
8a86f0d0b2 chore: Release
All checks were successful
Continuous integration / Check (push) Successful in 1m8s
Continuous integration / Test Suite (push) Successful in 3m35s
Continuous integration / Rustfmt (push) Successful in 55s
Continuous integration / Trunk (push) Successful in 2m4s
Continuous integration / build (push) Successful in 1m51s
Continuous integration / Disallow unused dependencies (push) Successful in 5m1s
2026-01-04 11:08:22 -08:00
eab4986fd3 server: fix date extraction and unit tests 2026-01-04 11:08:03 -08:00
3c644c570e Merge pull request 'chore(deps): lock file maintenance' (#223) from renovate/lock-file-maintenance into master
All checks were successful
Continuous integration / Check (push) Successful in 1m25s
Continuous integration / Test Suite (push) Successful in 2m17s
Continuous integration / Trunk (push) Successful in 2m5s
Continuous integration / Rustfmt (push) Successful in 42s
Continuous integration / Disallow unused dependencies (push) Successful in 2m26s
Continuous integration / build (push) Successful in 9m7s
2025-12-28 18:46:57 -08:00
7a9df3c15c chore(deps): lock file maintenance
All checks were successful
Continuous integration / Check (push) Successful in 2m28s
Continuous integration / Test Suite (push) Successful in 2m42s
Continuous integration / Rustfmt (push) Successful in 42s
Continuous integration / build (push) Successful in 2m41s
Continuous integration / Disallow unused dependencies (push) Successful in 2m14s
Continuous integration / Trunk (push) Successful in 20m53s
2025-12-29 01:47:41 +00:00
f9d8acf744 Merge pull request 'chore(deps): lock file maintenance' (#222) from renovate/lock-file-maintenance into master
All checks were successful
Continuous integration / Check (push) Successful in 2m14s
Continuous integration / Test Suite (push) Successful in 1m51s
Continuous integration / Rustfmt (push) Successful in 1m2s
Continuous integration / Trunk (push) Successful in 2m7s
Continuous integration / build (push) Successful in 2m7s
Continuous integration / Disallow unused dependencies (push) Successful in 5m4s
2025-12-28 16:48:08 -08:00
75f3770f3e chore(deps): lock file maintenance
All checks were successful
Continuous integration / Check (push) Successful in 4m26s
Continuous integration / Test Suite (push) Successful in 4m25s
Continuous integration / Rustfmt (push) Successful in 40s
Continuous integration / build (push) Successful in 4m10s
Continuous integration / Disallow unused dependencies (push) Successful in 2m18s
Continuous integration / Trunk (push) Successful in 20m54s
2025-12-29 00:02:21 +00:00
85dd61a272 Merge pull request 'chore(deps): update rust crate serde_json to v1.0.146' (#220) from renovate/all-minor-patch into master
All checks were successful
Continuous integration / Check (push) Successful in 1m29s
Continuous integration / Test Suite (push) Successful in 6m57s
Continuous integration / Trunk (push) Successful in 7m51s
Continuous integration / Rustfmt (push) Successful in 1m30s
Continuous integration / build (push) Successful in 2m18s
Continuous integration / Disallow unused dependencies (push) Successful in 5m1s
2025-12-22 05:01:52 -08:00
1c5412de14 chore(deps): update rust crate serde_json to v1.0.146
All checks were successful
Continuous integration / Check (push) Successful in 2m41s
Continuous integration / Test Suite (push) Successful in 2m46s
Continuous integration / Rustfmt (push) Successful in 54s
Continuous integration / build (push) Successful in 2m51s
Continuous integration / Disallow unused dependencies (push) Successful in 2m16s
Continuous integration / Trunk (push) Successful in 21m20s
2025-12-22 12:31:26 +00:00
034027ddd5 Merge pull request 'chore(deps): lock file maintenance' (#219) from renovate/lock-file-maintenance into master
All checks were successful
Continuous integration / Check (push) Successful in 1m39s
Continuous integration / Test Suite (push) Successful in 2m37s
Continuous integration / Trunk (push) Successful in 2m5s
Continuous integration / Rustfmt (push) Successful in 53s
Continuous integration / Disallow unused dependencies (push) Successful in 2m30s
Continuous integration / build (push) Successful in 7m6s
2025-12-21 16:47:07 -08:00
81a07a8172 chore(deps): lock file maintenance
All checks were successful
Continuous integration / Check (push) Successful in 3m28s
Continuous integration / Test Suite (push) Successful in 3m40s
Continuous integration / Rustfmt (push) Successful in 47s
Continuous integration / build (push) Successful in 3m30s
Continuous integration / Disallow unused dependencies (push) Successful in 2m22s
Continuous integration / Trunk (push) Successful in 21m0s
2025-12-22 00:02:30 +00:00
d9e8c2133e Merge pull request 'chore(deps): update rust crate axum to v0.8.8' (#218) from renovate/axum-monorepo into master
All checks were successful
Continuous integration / Check (push) Successful in 1m10s
Continuous integration / Trunk (push) Successful in 1m12s
Continuous integration / Rustfmt (push) Successful in 50s
Continuous integration / Test Suite (push) Successful in 3m2s
Continuous integration / build (push) Successful in 1m54s
Continuous integration / Disallow unused dependencies (push) Successful in 5m0s
2025-12-20 09:02:03 -08:00
99aa7a7071 chore(deps): update rust crate axum to v0.8.8
All checks were successful
Continuous integration / Check (push) Successful in 1m11s
Continuous integration / Test Suite (push) Successful in 3m36s
Continuous integration / Rustfmt (push) Successful in 1m30s
Continuous integration / build (push) Successful in 4m12s
Continuous integration / Trunk (push) Successful in 8m35s
Continuous integration / Disallow unused dependencies (push) Successful in 5m2s
2025-12-20 16:46:32 +00:00
cc585cc63f Merge pull request 'chore(deps): lock file maintenance' (#214) from renovate/lock-file-maintenance into master
All checks were successful
Continuous integration / Check (push) Successful in 55s
Continuous integration / Test Suite (push) Successful in 1m17s
Continuous integration / Trunk (push) Successful in 1m3s
Continuous integration / Rustfmt (push) Successful in 1m29s
Continuous integration / build (push) Successful in 1m28s
Continuous integration / Disallow unused dependencies (push) Successful in 5m3s
2025-12-15 09:47:04 -08:00
293f90fde5 chore(deps): lock file maintenance
All checks were successful
Continuous integration / Check (push) Successful in 1m3s
Continuous integration / Test Suite (push) Successful in 1m38s
Continuous integration / Trunk (push) Successful in 1m13s
Continuous integration / Rustfmt (push) Successful in 41s
Continuous integration / build (push) Successful in 1m36s
Continuous integration / Disallow unused dependencies (push) Successful in 2m17s
2025-12-15 17:17:40 +00:00
a06e4b3454 Merge pull request 'chore(deps): update rust crate reqwest to v0.12.26' (#215) from renovate/all-minor-patch into master
All checks were successful
Continuous integration / Check (push) Successful in 56s
Continuous integration / Test Suite (push) Successful in 1m22s
Continuous integration / Rustfmt (push) Successful in 40s
Continuous integration / build (push) Successful in 1m36s
Continuous integration / Disallow unused dependencies (push) Successful in 2m27s
Continuous integration / Trunk (push) Successful in 21m2s
2025-12-15 09:16:55 -08:00
6e5145e21b chore(deps): update rust crate reqwest to v0.12.26
All checks were successful
Continuous integration / Check (push) Successful in 56s
Continuous integration / Test Suite (push) Successful in 1m38s
Continuous integration / Trunk (push) Successful in 1m5s
Continuous integration / Rustfmt (push) Successful in 1m30s
Continuous integration / build (push) Successful in 2m18s
Continuous integration / Disallow unused dependencies (push) Successful in 5m6s
2025-12-15 16:46:42 +00:00
d41f3e9fd1 Merge pull request 'chore(deps): lock file maintenance' (#213) from renovate/lock-file-maintenance into master
All checks were successful
Continuous integration / Check (push) Successful in 58s
Continuous integration / Test Suite (push) Successful in 1m37s
Continuous integration / Rustfmt (push) Successful in 54s
Continuous integration / Trunk (push) Successful in 2m3s
Continuous integration / build (push) Successful in 1m42s
Continuous integration / Disallow unused dependencies (push) Successful in 5m4s
2025-12-14 16:47:42 -08:00
5519018043 chore(deps): lock file maintenance
All checks were successful
Continuous integration / Check (push) Successful in 1m15s
Continuous integration / Test Suite (push) Successful in 2m23s
Continuous integration / Rustfmt (push) Successful in 1m16s
Continuous integration / build (push) Successful in 2m42s
Continuous integration / Disallow unused dependencies (push) Successful in 2m24s
Continuous integration / Trunk (push) Successful in 21m15s
2025-12-15 00:02:24 +00:00
5 changed files with 387 additions and 292 deletions

645
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
edition = "2021"
license = "UNLICENSED"
publish = ["xinu"]
version = "0.17.55"
version = "0.17.57"
repository = "https://git.z.xinu.tv/wathiede/letterbox"
[profile.dev]

View File

@@ -0,0 +1,2 @@
DROP INDEX IF EXISTS movie_sets_year_id_idx;
DROP INDEX IF EXISTS movie_sets_year_idx;

View File

@@ -0,0 +1,6 @@
-- Add index on movie_sets.year to speed up year-based queries
CREATE INDEX movie_sets_year_idx ON movie_sets(year);
-- Composite index for queries that filter by year and return id
-- This can make the subquery in UPDATE statements even faster
CREATE INDEX movie_sets_year_id_idx ON movie_sets(year, id);

View File

@@ -195,8 +195,16 @@ pub fn extract_calendar_metadata_from_mail(
}
}
if let (Some(sm), Some(em)) = (month_num(start_month), month_num(end_month)) {
let current_year = chrono::Local::now().year().to_string();
let start = format!("{}{}{}", current_year, sm, format!("{:0>2}", start_day));
// If start month is later in calendar year than end month, start is in previous year
let sm_num: u32 = sm.parse().unwrap_or(1);
let em_num: u32 = em.parse().unwrap_or(1);
let end_year = year.parse::<i32>().unwrap_or_else(|_| chrono::Local::now().year());
let start_year: i32 = if sm_num > em_num {
end_year - 1
} else {
end_year
};
let start = format!("{}{}{}", start_year, sm, format!("{:0>2}", start_day));
let mut end_date_val = chrono::NaiveDate::parse_from_str(&format!("{}-{}-{}", year, em, format!("{:0>2}", end_day)), "%Y-%m-%d").ok();
if let Some(d) = end_date_val.as_mut() {
*d = d.succ_opt().unwrap_or(*d);
@@ -2307,8 +2315,8 @@ mod tests {
Some("calendar-notification@google.com".to_string())
);
// Dates: from subject, Thu Sep 11 to Fri Jan 30, 2026
let current_year = chrono::Local::now().year();
assert_eq!(meta.start_date, Some(format!("{}0911", current_year)));
// Start date is Sep 11, 2025 (one year before end since Sep > Jan)
assert_eq!(meta.start_date, Some("20250911".to_string()));
assert_eq!(meta.end_date, Some("20260131".to_string()));
}
#[test]
@@ -2408,8 +2416,8 @@ mod tests {
Some("calendar-notification@google.com".to_string())
);
// Dates: from subject, Thu Sep 11 to Fri Jan 30, 2026
let current_year = chrono::Local::now().year();
assert_eq!(meta.start_date, Some(format!("{}0911", current_year)));
// Start date is Sep 11, 2025 (one year before end since Sep > Jan)
assert_eq!(meta.start_date, Some("20250911".to_string()));
assert_eq!(meta.end_date, Some("20260131".to_string()));
// Debug: print the rendered HTML for inspection
if let Some(ref html) = meta.body_html {
@@ -2442,8 +2450,8 @@ mod tests {
Some("calendar-notification@google.com".to_string())
);
// Assert that the start and end dates are present
let current_year = chrono::Local::now().year();
assert_eq!(meta.start_date, Some(format!("{}0911", current_year)));
// Start date is Sep 11, 2025 (one year before end since Sep > Jan)
assert_eq!(meta.start_date, Some("20250911".to_string()));
assert_eq!(meta.end_date, Some("20260131".to_string()));
// Assert that the HTML body contains recurrence info
if let Some(ref html) = meta.body_html {