moonfire-nvr/server/db
Scott Lamb f9c46dca89 fix incorrect prev_media_duration_90k calculation
I spotted this by inspection: adding a media time and wall time didn't
look right. I also confirmed the brokenness on my primary NVR:

```
sqlite> .mode column
sqlite> select
   ...>   r1.composite_id,
   ...>   r1.prev_media_duration_90k,
   ...>   r1.wall_duration_90k,
   ...>   r1.media_duration_delta_90k,
   ...>   r2.composite_id,
   ...>   r2.prev_media_duration_90k
   ...> from
   ...>   recording r1 join recording r2 on (r1.composite_id = r2.composite_id - 1)
   ...> where
   ...>   r1.prev_media_duration_90k + r1.wall_duration_90k + r1.media_duration_delta_90k !=
   ...>     r2.prev_media_duration_90k
   ...> limit 5;
4296791095    2232623913716            5398956            154                       4296791096    2232629312672
4296791096    2232629312672            5400016            38                        4296791097    2232634712688
4296791097    2232634712688            5400729            105                       4296791098    2232640113417
4296791098    2232640113417            5399024            80                        4296791099    2232645512441
4296791099    2232645512441            5400770            124                       4296791100    2232650913211
```

In the first row, the second recording's prev_media_duration_90k is the
first's prev_media_duration_90k plus its wall time, not its media time.
2021-03-25 22:09:29 -07:00
..
proto shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
testdata restructure into "server" and "ui" subdirs 2021-01-22 22:01:17 -08:00
upgrade shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
auth.rs better error handling for authentication 2021-03-06 05:49:49 -08:00
build.rs shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
Cargo.toml shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
check.rs rearrange check deletes to satisfy foreign key 2021-03-05 12:02:43 -08:00
coding.rs shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
compare.rs shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
days.rs present signal days in API requests 2021-03-23 21:07:07 -07:00
db.rs fix incorrect prev_media_duration_90k calculation 2021-03-25 22:09:29 -07:00
dir.rs shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
fs.rs shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
lib.rs extract & generalize calendar day indexes 2021-03-23 09:40:52 -07:00
raw.rs shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
recording.rs shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
schema.sql fix incorrect prev_media_duration_90k calculation 2021-03-25 22:09:29 -07:00
signal.rs present signal days in API requests 2021-03-23 21:07:07 -07:00
testutil.rs shorten per-file copyright headers 2021-02-17 15:39:17 -08:00
writer.rs fix invariant violation on pts jump (#112) 2021-03-10 12:45:32 -08:00