Files
bom-local-service/Models/RadarFrame.cs
T
alex 41e1f6d685 Implement multi-frame radar capture with configurable cropping
- Capture all 7 radar frames (0-6) instead of single screenshot
- Store frames in folder-based cache structure with metadata
- Extract and store minutesAgo for each frame from page display
- Add configurable screenshot cropping (default: 200px left/right)
- Fix step numbering to use whole numbers (1-22)
- Add scrubber position verification before frame capture
- Handle modal overlay blocking step forward button clicks
- Only create debug folders when scraping is actually needed
- Update API endpoints to return JSON with frame URLs
- Add separate endpoints for individual frame images
2025-12-07 12:51:44 +10:00

34 lines
1.1 KiB
C#

namespace BomLocalService.Models;
/// <summary>
/// Represents a single frame from the radar slideshow (0-6).
/// </summary>
public class RadarFrame
{
/// <summary>
/// Frame index (0-6), where 0 is the oldest frame (40 minutes ago) and 6 is the newest (10 minutes ago).
/// </summary>
public int FrameIndex { get; set; }
/// <summary>
/// Full file system path to the frame image file (server-side only).
/// Format: "{CacheDirectory}/{LocationKey}_{Timestamp}/frame_{FrameIndex}.png"
/// Example: "/app/cache/Pomona_QLD_20251207_000906/frame_0.png"
/// </summary>
public string ImagePath { get; set; } = string.Empty;
/// <summary>
/// URL endpoint to retrieve this frame image.
/// Format: "/api/radar/{Suburb}/{State}/frame/{FrameIndex}"
/// Example: "/api/radar/Pomona/QLD/frame/0"
/// </summary>
public string ImageUrl { get; set; } = string.Empty;
/// <summary>
/// Number of minutes ago this frame represents (40, 35, 30, 25, 20, 15, 10).
/// Frame 0 = 40 minutes ago, Frame 6 = 10 minutes ago.
/// </summary>
public int MinutesAgo { get; set; }
}