@@ -4,7 +4,7 @@ use clap::{
44} ;
55use clap_complete:: Shell ;
66
7- use crate :: { format :: Codec , utils :: fs :: FSBackend } ;
7+ use crate :: commands :: sync :: SyncOpts ;
88
99#[ derive( Parser ) ]
1010#[ command( author, version, about, long_about = None , styles = get_styles( ) ) ]
@@ -17,63 +17,7 @@ pub struct Cli {
1717#[ derive( Subcommand ) ]
1818pub enum Commands {
1919 /// Syncs a music library to an ADB-connected Android device.
20- Sync {
21- /// The source directory to sync from.
22- source : String ,
23-
24- /// The directory to sync to.
25- target : String ,
26-
27- #[ arg( long, short, default_value = "adb" ) ]
28- /// Specifies the filesystem backend to use for syncing.
29- fs : Option < FSBackend > ,
30-
31- #[ arg( long, short) ]
32- /// The codec to transcode into for tracks matching the transcode_codecs.
33- ///
34- /// Transcoding will only apply if a value is passed, else only the files matched by `sync_extensions` will synced.
35- codec : Option < Codec > ,
36-
37- #[ arg( long, short) ]
38- /// The bitrate to use while transcoding files matched by `transcode_extensions`.
39- /// Only applies if `codec` is set.
40- ///
41- /// Default values:
42- /// - opus: 128K
43- /// - vorbis: 192K
44- /// - mp3: 320K
45- /// - aac-lc: 192K
46- bitrate : Option < u32 > ,
47-
48- #[ arg( long, default_value_t = false ) ]
49- /// If set, album cover images will be stripped from synced files.
50- strip_covers : bool ,
51-
52- #[ arg( long, default_value_t = false ) ]
53- /// When enabled, extras like covers are included with the sync.
54- include_extras : bool ,
55-
56- #[ arg( long, value_delimiter = ',' , default_value = "flac,alac" ) ]
57- /// A comma-separated list of codecs to match to include in the transcode process.
58- transcode_codecs : Option < Vec < Codec > > ,
59-
60- #[ arg( long, value_delimiter = ',' , default_value = "opus,vorbis,mp3,aac-lc" ) ]
61- /// A comma-separated list of codecs to match to include only in the sync process.
62- sync_codecs : Option < Vec < Codec > > ,
63-
64- #[ arg(
65- long,
66- long_help = "\
67- A text file containing a list of folders to sync. Folders listed must be exist within the source directory.
68-
69- E.g. source -> ~/Music/Library:
70- ESAI
71- ~/Music/Library/K03
72- ~/Music/Library/Various Artists/Stream Palette 4
73- Various Artists/Stream Palette 5 -RANKED-"
74- ) ]
75- sync_list : Option < String > ,
76- } ,
20+ Sync ( SyncOpts ) ,
7721 Completion {
7822 #[ arg( value_enum) ]
7923 shell : Shell ,
0 commit comments