Compare commits
2 commits
4ca1272338
...
2a4233e5d5
Author | SHA1 | Date | |
---|---|---|---|
2a4233e5d5 | |||
c80ccf66ce |
4 changed files with 9 additions and 6 deletions
|
@ -17,7 +17,7 @@ env_logger = "0.10.0"
|
|||
clap = { version = "4.0.29", features = ["derive"] }
|
||||
phf_codegen = "0.11.1"
|
||||
once_cell = "1.12.0"
|
||||
fancy-regex = "0.10.0"
|
||||
regex = "1.7.1"
|
||||
indicatif = "0.17.0"
|
||||
num_enum = "0.5.7"
|
||||
path_macro = "1.0.0"
|
||||
|
|
|
@ -2,10 +2,10 @@ use std::collections::{HashMap, HashSet};
|
|||
use std::{collections::BTreeMap, fs::File, io::BufReader, path::Path};
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use fancy_regex::Regex;
|
||||
use futures::{stream, StreamExt};
|
||||
use once_cell::sync::Lazy;
|
||||
use path_macro::path;
|
||||
use regex::Regex;
|
||||
use reqwest::{header, Client};
|
||||
use rustypipe::param::{locale::LANGUAGES, Language};
|
||||
use serde::Deserialize;
|
||||
|
@ -139,7 +139,6 @@ pub fn write_samples_to_dict(project_root: &Path) {
|
|||
.find_map(|(mag, (txt, _))| {
|
||||
let point = POINT_REGEX
|
||||
.captures(txt)
|
||||
.unwrap()
|
||||
.map(|c| c.get(1).unwrap().as_str());
|
||||
|
||||
if let Some(point) = point {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::fmt::Write;
|
||||
use std::path::Path;
|
||||
|
||||
use fancy_regex::Regex;
|
||||
use once_cell::sync::Lazy;
|
||||
use regex::Regex;
|
||||
use rustypipe::timeago::TimeUnit;
|
||||
|
||||
use crate::util;
|
||||
|
@ -11,7 +11,7 @@ const TARGET_PATH: &str = "src/util/dictionary.rs";
|
|||
|
||||
fn parse_tu(tu: &str) -> (u8, Option<TimeUnit>) {
|
||||
static TU_PATTERN: Lazy<Regex> = Lazy::new(|| Regex::new(r"^(\d*)(\w?)$").unwrap());
|
||||
match TU_PATTERN.captures(tu).unwrap() {
|
||||
match TU_PATTERN.captures(tu) {
|
||||
Some(cap) => (
|
||||
cap.get(1).unwrap().as_str().parse().unwrap_or(1),
|
||||
match cap.get(2).unwrap().as_str() {
|
||||
|
|
|
@ -88,7 +88,11 @@ impl RustyPipeQuery {
|
|||
.collect::<Vec<_>>();
|
||||
|
||||
if !to_replace.is_empty() {
|
||||
let playlist = self.music_playlist(playlist_id).await?;
|
||||
let mut playlist = self.music_playlist(playlist_id).await?;
|
||||
playlist
|
||||
.tracks
|
||||
.extend_limit(&self, album.tracks.len())
|
||||
.await?;
|
||||
|
||||
for (i, title) in to_replace {
|
||||
let found_track = playlist.tracks.items.iter().find_map(|track| {
|
||||
|
|
Loading…
Reference in a new issue