File tree Expand file tree Collapse file tree 2 files changed +31
-32
lines changed Expand file tree Collapse file tree 2 files changed +31
-32
lines changed Original file line number Diff line number Diff line change
1
+ using TagLib ;
2
+
3
+ using File = TagLib . File ;
4
+
5
+ namespace SetPictures ;
6
+
7
+ public class Program
8
+ {
9
+ public static void Main ( string [ ] args )
10
+ {
11
+ if ( args . Length < 2 ) {
12
+ Console . Error . WriteLine ( "USAGE: mono SetPictures.exe AUDIO_PATH IMAGE_PATH_1[...IMAGE_PATH_N]" ) ;
13
+ return ;
14
+ }
15
+
16
+ var file = File . Create ( args [ 0 ] ) ;
17
+ Console . WriteLine ( $ "Current picture count: { file . Tag . Pictures . Length } ") ;
18
+
19
+ var pictures = new Picture [ args . Length - 1 ] ;
20
+
21
+ for ( int i = 1 ; i < args . Length ; i ++ ) {
22
+ var picture = new Picture ( args [ i ] ) ;
23
+ pictures [ i - 1 ] = picture ;
24
+ }
25
+
26
+ file . Tag . Pictures = pictures ;
27
+ file . Save ( ) ;
28
+
29
+ Console . WriteLine ( $ "New picture count: { file . Tag . Pictures . Length } ") ;
30
+ }
31
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments