Rename files

This commit is contained in:
Savanni D'Gerinel 2023-03-02 09:03:46 -05:00
parent 1c445626c4
commit a2ba99d600
8 changed files with 10 additions and 19 deletions

View File

@ -1,6 +1,6 @@
import * as _ from "lodash";
import { TrackInfo, getTracks } from "./client";
import { TrackName, TrackCard } from "./blocks/track";
import { TrackName, TrackCard } from "./components/track";
window.customElements.define("track-name", TrackName);
window.customElements.define("track-card", TrackCard);
@ -12,13 +12,6 @@ declare global {
}
}
const replaceTitle = () => {
const title = document.querySelector(".js-title");
if (title && title.innerHTML) {
title.innerHTML = "Music Player Paused";
}
};
const updateTrackList = (tracks: TrackInfo[]) => {
const track_list = document.querySelector(".track-list__tracks");
if (track_list) {

View File

@ -7,10 +7,10 @@ use std::{
use warp::Filter;
use music_player::{
audio::TrackInfo,
core::Core,
database::{MemoryIndex, MusicIndex},
music_scanner::FileScanner,
media::TrackInfo,
scanner::FileScanner,
};
fn tracks(index: &Arc<impl MusicIndex>) -> Vec<TrackInfo> {

View File

@ -1,6 +1,4 @@
use crate::{
audio::TrackInfo, database::MusicIndex, music_scanner::MusicScanner, Error, FatalError,
};
use crate::{database::MusicIndex, media::TrackInfo, scanner::MusicScanner, Error, FatalError};
use flow::{ok, Flow};
use std::{
sync::{
@ -108,7 +106,7 @@ impl Core {
#[cfg(test)]
mod test {
use super::*;
use crate::{audio::TrackId, database::MemoryIndex, music_scanner::factories::MockScanner};
use crate::{database::MemoryIndex, media::TrackId, scanner::factories::MockScanner};
use std::collections::HashSet;
fn with_example_index<F>(f: F)

View File

@ -1,5 +1,5 @@
use crate::{
audio::{TrackId, TrackInfo},
media::{TrackId, TrackInfo},
FatalError,
};
use flow::{error, ok, Flow};

View File

@ -1,7 +1,7 @@
pub mod audio;
pub mod core;
pub mod database;
pub mod music_scanner;
pub mod media;
pub mod scanner;
use database::DatabaseError;
use thiserror::Error;

View File

@ -1,4 +1,4 @@
use crate::audio::{TrackId, TrackInfo};
use crate::media::{TrackId, TrackInfo};
use id3::{Tag, TagLike};
use std::{
fs::{DirEntry, ReadDir},
@ -187,7 +187,7 @@ impl MusicScanner for FileScanner {
#[cfg(test)]
pub mod factories {
use super::*;
use crate::audio::TrackId;
use crate::media::TrackId;
pub struct MockScanner {
data: Vec<TrackInfo>,