Language Migration #21
+4
-4
@@ -4,14 +4,13 @@ mod models;
|
||||
use std::env;
|
||||
use std::process;
|
||||
|
||||
|
||||
|
||||
fn exit_program(code: i32) {
|
||||
process::exit(code);
|
||||
}
|
||||
|
||||
fn print_help() {
|
||||
let msg: String = String::from(r#"icd [Action] [flag]
|
||||
let msg: String = String::from(
|
||||
r#"icd [Action] [flag]
|
||||
|
||||
Actions
|
||||
download
|
||||
@@ -47,7 +46,8 @@ fn print_help() {
|
||||
-rt retrieve type (songs is only accepted)
|
||||
|
||||
Required for deleting a song
|
||||
-D song id"#);
|
||||
-D song id"#,
|
||||
);
|
||||
|
||||
println!("{}", msg);
|
||||
}
|
||||
|
||||
@@ -27,16 +27,13 @@ impl ActionManager {
|
||||
}
|
||||
|
||||
// TODO: Implement
|
||||
fn supported_actions(&self) {
|
||||
}
|
||||
fn supported_actions(&self) {}
|
||||
// TODO: Implement
|
||||
fn initialize(&self) {
|
||||
}
|
||||
fn initialize(&self) {}
|
||||
// TODO: Implement
|
||||
fn validate_flags(&self) {
|
||||
}
|
||||
fn validate_flags(&self) {}
|
||||
// TODO: Implement
|
||||
fn is_valid_flag(&self, flag: &String) -> bool{
|
||||
fn is_valid_flag(&self, flag: &String) -> bool {
|
||||
return false;
|
||||
}
|
||||
// TODO: Implement
|
||||
@@ -44,11 +41,9 @@ impl ActionManager {
|
||||
return false;
|
||||
}
|
||||
// TODO: Implement
|
||||
fn print_action(&self) {
|
||||
}
|
||||
fn print_action(&self) {}
|
||||
// TODO: Implement
|
||||
fn print_flags(&self) {
|
||||
}
|
||||
fn print_flags(&self) {}
|
||||
// TODO: Implement
|
||||
fn parsed_flags(&self) -> Vec<String> {
|
||||
return Vec::new();
|
||||
|
||||
@@ -23,7 +23,6 @@ pub struct Album {
|
||||
pub track_count: i32,
|
||||
pub disc_count: i32,
|
||||
pub songs: Vec<models::song::Song>,
|
||||
|
||||
}
|
||||
|
||||
enum ActionValues {
|
||||
@@ -35,19 +34,17 @@ enum ActionValues {
|
||||
}
|
||||
|
||||
enum RetrieveTypes {
|
||||
Songs
|
||||
Songs,
|
||||
}
|
||||
|
||||
impl Album {
|
||||
// TODO: Implement
|
||||
pub fn print_info(&self) {
|
||||
}
|
||||
pub fn print_info(&self) {}
|
||||
}
|
||||
|
||||
impl CommitManager {
|
||||
// TODO: Implement
|
||||
pub fn commit_action(&self) {
|
||||
}
|
||||
pub fn commit_action(&self) {}
|
||||
|
||||
// TODO: Implement
|
||||
fn map_actions(&self) -> HashMap<String, ActionValues> {
|
||||
@@ -55,24 +52,24 @@ impl CommitManager {
|
||||
}
|
||||
|
||||
// TODO: Implement
|
||||
fn parse_token(&self, api: &models::api::API) {
|
||||
fn parse_token(&self, api: &models::api::API) {}
|
||||
// TODO: Implement
|
||||
fn upload_song_with_metadata(&self) {}
|
||||
// TODO: Implement
|
||||
fn sing_target_upload(
|
||||
&self,
|
||||
songpath: &String,
|
||||
track_id: &String,
|
||||
meta_path: &String,
|
||||
cover_path: &String,
|
||||
) {
|
||||
}
|
||||
// TODO: Implement
|
||||
fn upload_song_with_metadata(&self) {
|
||||
}
|
||||
fn multi_target_upload(&self, sourcepath: &String) {}
|
||||
// TODO: Implement
|
||||
fn sing_target_upload(&self, songpath: &String, track_id: &String,
|
||||
meta_path: &String, cover_path: &String) {
|
||||
}
|
||||
fn initialize_disc_and_track(&self, song: &models::song::Song) {}
|
||||
// TODO: Implement
|
||||
fn multi_target_upload(&self, sourcepath: &String) {
|
||||
}
|
||||
// TODO: Implement
|
||||
fn initialize_disc_and_track(&self, song: &models::song::Song) {
|
||||
}
|
||||
// TODO: Implement
|
||||
fn parse_disc_and_track(&self, song: &models::song::Song, track_id: &String) {
|
||||
}
|
||||
fn parse_disc_and_track(&self, song: &models::song::Song, track_id: &String) {}
|
||||
// TODO: Implement
|
||||
fn check_for_no_confirm(&self) -> bool {
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
pub mod action_managers;
|
||||
pub mod commit_manager;
|
||||
pub mod user_manager;
|
||||
pub mod user_manager;
|
||||
|
||||
@@ -20,7 +20,6 @@ impl UserManager {
|
||||
}
|
||||
|
||||
// TODO: Implement
|
||||
fn parse_user_from_actions(&self) {
|
||||
}
|
||||
fn parse_user_from_actions(&self) {}
|
||||
}
|
||||
// }
|
||||
|
||||
@@ -17,7 +17,6 @@ impl IcarusAction {
|
||||
}
|
||||
|
||||
// TODO: Implement
|
||||
pub fn print_action_and_flags(&self) {
|
||||
}
|
||||
pub fn print_action_and_flags(&self) {}
|
||||
}
|
||||
// }
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ pub mod icarus_action;
|
||||
pub mod song;
|
||||
pub mod token;
|
||||
pub mod upload_form;
|
||||
pub mod user;
|
||||
pub mod user;
|
||||
|
||||
+2
-4
@@ -22,8 +22,7 @@ pub struct Song {
|
||||
|
||||
impl Song {
|
||||
// TODO: Implement
|
||||
pub fn print_info(&self) {
|
||||
}
|
||||
pub fn print_info(&self) {}
|
||||
|
||||
// TODO: Implement
|
||||
pub fn song_path(&self) -> String {
|
||||
@@ -41,11 +40,10 @@ impl Song {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct CoverArt {
|
||||
pub id: i32,
|
||||
pub title: String,
|
||||
pub path: String,
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -7,4 +7,4 @@ pub struct UploadForm {
|
||||
pub url: String,
|
||||
pub filepath: String,
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
+7
-7
@@ -1,9 +1,9 @@
|
||||
// mod models {
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct User {
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
}
|
||||
// }
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct User {
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
}
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user