make adding presentations properly add the right number of slides

To make sure we know how many slides are in a presentation we needed
to ensure we are using Urls appropriately and that we are looking in
the correct key in the QVariantMap
This commit is contained in:
Chris Cochrun 2023-09-29 16:32:45 -05:00
parent 1858822094
commit affaf7a53b
3 changed files with 14 additions and 12 deletions

View file

@ -1,9 +1,9 @@
// use dirs;
use std::{fs::read_to_string, path::Path};
use std::{fs::read_to_string, path::PathBuf};
use tracing::{debug, debug_span, error, info, instrument};
pub fn count_slides_and_fragments(html_file_path: Path) -> i32 {
debug!("Starting slide counter");
pub fn count_slides_and_fragments(html_file_path: PathBuf) -> i32 {
debug!(path = ?html_file_path, "Starting slide counter");
// Read the HTML file
let html_content = read_to_string(html_file_path)
.expect("Failed to read HTML file");