Rename files
This commit is contained in:
parent
1c445626c4
commit
a2ba99d600
|
@ -1,6 +1,6 @@
|
||||||
import * as _ from "lodash";
|
import * as _ from "lodash";
|
||||||
import { TrackInfo, getTracks } from "./client";
|
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-name", TrackName);
|
||||||
window.customElements.define("track-card", TrackCard);
|
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 updateTrackList = (tracks: TrackInfo[]) => {
|
||||||
const track_list = document.querySelector(".track-list__tracks");
|
const track_list = document.querySelector(".track-list__tracks");
|
||||||
if (track_list) {
|
if (track_list) {
|
||||||
|
|
|
@ -7,10 +7,10 @@ use std::{
|
||||||
use warp::Filter;
|
use warp::Filter;
|
||||||
|
|
||||||
use music_player::{
|
use music_player::{
|
||||||
audio::TrackInfo,
|
|
||||||
core::Core,
|
core::Core,
|
||||||
database::{MemoryIndex, MusicIndex},
|
database::{MemoryIndex, MusicIndex},
|
||||||
music_scanner::FileScanner,
|
media::TrackInfo,
|
||||||
|
scanner::FileScanner,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn tracks(index: &Arc<impl MusicIndex>) -> Vec<TrackInfo> {
|
fn tracks(index: &Arc<impl MusicIndex>) -> Vec<TrackInfo> {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
use crate::{
|
use crate::{database::MusicIndex, media::TrackInfo, scanner::MusicScanner, Error, FatalError};
|
||||||
audio::TrackInfo, database::MusicIndex, music_scanner::MusicScanner, Error, FatalError,
|
|
||||||
};
|
|
||||||
use flow::{ok, Flow};
|
use flow::{ok, Flow};
|
||||||
use std::{
|
use std::{
|
||||||
sync::{
|
sync::{
|
||||||
|
@ -108,7 +106,7 @@ impl Core {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
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;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
fn with_example_index<F>(f: F)
|
fn with_example_index<F>(f: F)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
audio::{TrackId, TrackInfo},
|
media::{TrackId, TrackInfo},
|
||||||
FatalError,
|
FatalError,
|
||||||
};
|
};
|
||||||
use flow::{error, ok, Flow};
|
use flow::{error, ok, Flow};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pub mod audio;
|
|
||||||
pub mod core;
|
pub mod core;
|
||||||
pub mod database;
|
pub mod database;
|
||||||
pub mod music_scanner;
|
pub mod media;
|
||||||
|
pub mod scanner;
|
||||||
use database::DatabaseError;
|
use database::DatabaseError;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::audio::{TrackId, TrackInfo};
|
use crate::media::{TrackId, TrackInfo};
|
||||||
use id3::{Tag, TagLike};
|
use id3::{Tag, TagLike};
|
||||||
use std::{
|
use std::{
|
||||||
fs::{DirEntry, ReadDir},
|
fs::{DirEntry, ReadDir},
|
||||||
|
@ -187,7 +187,7 @@ impl MusicScanner for FileScanner {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub mod factories {
|
pub mod factories {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::audio::TrackId;
|
use crate::media::TrackId;
|
||||||
|
|
||||||
pub struct MockScanner {
|
pub struct MockScanner {
|
||||||
data: Vec<TrackInfo>,
|
data: Vec<TrackInfo>,
|
Loading…
Reference in New Issue