reelsort 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,3 +1,10 @@
1
+ interface CleanOptions {
2
+ dryRun?: boolean;
3
+ olderThan?: string;
4
+ emptyFolders?: boolean;
5
+ }
6
+ declare const clean: ({ dryRun, olderThan }: CleanOptions) => Promise<void>;
7
+
1
8
  interface ConfigAddOptions {
2
9
  key: string;
3
10
  value: string;
@@ -17,7 +24,68 @@ interface ConfigShowOptions {
17
24
  declare const configAdd: ({ key, value }: ConfigAddOptions) => Promise<void>;
18
25
  declare const configRemove: ({ key, value }: ConfigRemoveOptions) => Promise<void>;
19
26
  declare const configSet: ({ key, subkey, value }: ConfigSetOptions) => Promise<void>;
20
- declare const configShow: (_: ConfigShowOptions) => Promise<void>;
27
+ declare const configShow: () => Promise<void>;
28
+
29
+ interface DifferencesOptions {
30
+ dir1: string;
31
+ dir2: string;
32
+ ignore?: string[];
33
+ only?: string[];
34
+ }
35
+ declare const differences: ({ dir1: rawDir1, dir2: rawDir2, only, ignore }: DifferencesOptions) => Promise<void>;
36
+
37
+ interface HistoryOptions {
38
+ limit?: number;
39
+ imports?: boolean;
40
+ }
41
+ declare const history: ({ limit, imports }: HistoryOptions) => Promise<void>;
42
+
43
+ interface ListOptions {
44
+ type?: 'movie' | 'tv' | 'ps3';
45
+ missingSubs?: boolean;
46
+ codec?: string;
47
+ resolution?: string;
48
+ sort?: string;
49
+ }
50
+ declare const list: ({ type, missingSubs, codec: codecFilter, resolution: resFilter, sort }: ListOptions) => Promise<void>;
51
+
52
+ interface ProbeOptions {
53
+ type?: 'movie' | 'tv' | 'ps3';
54
+ force?: boolean;
55
+ verbose?: boolean;
56
+ }
57
+ declare const probe: ({ type, force, verbose }: ProbeOptions) => Promise<void>;
58
+
59
+ interface RenameOptions {
60
+ dir: string;
61
+ type?: 'movie' | 'tv' | 'ps3';
62
+ verbose?: boolean;
63
+ }
64
+ declare const rename: ({ dir: inputDir, type, verbose }: RenameOptions) => Promise<void>;
65
+
66
+ interface ResetOptions {
67
+ dir: string;
68
+ double?: boolean;
69
+ }
70
+ declare const reset: ({ dir: inputDir, double }: ResetOptions) => Promise<void>;
71
+
72
+ interface ScanOptions {
73
+ type?: 'movie' | 'tv' | 'ps3';
74
+ hardlink?: boolean;
75
+ dryRun?: boolean;
76
+ verbose?: boolean;
77
+ auto?: boolean;
78
+ }
79
+ declare const scan: ({ type, hardlink: useHardlink, dryRun, verbose, auto }: ScanOptions) => Promise<void>;
80
+
81
+ declare const undo: () => Promise<void>;
82
+
83
+ interface WatchOptions {
84
+ hardlink?: boolean;
85
+ verbose?: boolean;
86
+ auto?: boolean;
87
+ }
88
+ declare const watch: ({ hardlink, verbose, auto }: WatchOptions) => Promise<void>;
21
89
 
22
90
  interface ReelSortConfig {
23
91
  sources: string[];
@@ -37,13 +105,6 @@ interface ReelSortConfig {
37
105
  declare const getConfig: () => ReelSortConfig;
38
106
  declare const saveConfig: (config: ReelSortConfig) => void;
39
107
 
40
- interface ProbeOptions {
41
- type?: 'movie' | 'tv' | 'ps3';
42
- force?: boolean;
43
- verbose?: boolean;
44
- }
45
- declare const probe: ({ type, force, verbose }: ProbeOptions) => Promise<void>;
46
-
47
108
  interface RenameRecord {
48
109
  id: number;
49
110
  sessionId: string;
@@ -86,26 +147,6 @@ declare const getCleanableImports: () => ImportRecord[];
86
147
  declare const deleteImport: (id: number) => void;
87
148
  declare const getHistory: (limit?: number) => RenameSession[];
88
149
 
89
- interface ListOptions {
90
- type?: 'movie' | 'tv' | 'ps3';
91
- missingSubs?: boolean;
92
- codec?: string;
93
- resolution?: string;
94
- sort?: string;
95
- }
96
- declare const list: ({ type, missingSubs, codec: codecFilter, resolution: resFilter, sort }: ListOptions) => Promise<void>;
97
-
98
- interface Quality {
99
- resolution?: string;
100
- codec?: string;
101
- }
102
- declare const parseQuality: (filename: string) => Quality;
103
- declare const normalizeResolution: (s: string) => string;
104
- declare const normalizeCodec: (s: string) => string;
105
-
106
- declare const DEFAULT_MOVIE_FORMAT = "{title} ({year})";
107
- declare const formatMovieName: (template: string, title: string, year?: number, edition?: string | null) => string;
108
-
109
150
  declare const detectEdition: (filename: string) => string | null;
110
151
 
111
152
  declare const DEFAULT_EPISODE_FORMAT = "{s}x{ee}";
@@ -113,28 +154,8 @@ declare const DEFAULT_SEASON_FORMAT = "Season {s}";
113
154
  declare const formatSeasonFolder: (format: string, season: number) => string;
114
155
  declare const formatEpisode: (season: number, episode: number, format?: string, double?: boolean, title?: string, name?: string) => string;
115
156
 
116
- interface WatchOptions {
117
- hardlink?: boolean;
118
- verbose?: boolean;
119
- auto?: boolean;
120
- }
121
- declare const watch: ({ hardlink, verbose, auto }: WatchOptions) => Promise<void>;
122
-
123
- interface CleanOptions {
124
- dryRun?: boolean;
125
- olderThan?: string;
126
- emptyFolders?: boolean;
127
- }
128
- declare const clean: ({ dryRun, olderThan }: CleanOptions) => Promise<void>;
129
-
130
- interface ScanOptions {
131
- type?: 'movie' | 'tv' | 'ps3';
132
- hardlink?: boolean;
133
- dryRun?: boolean;
134
- verbose?: boolean;
135
- auto?: boolean;
136
- }
137
- declare const scan: ({ type, hardlink: useHardlink, dryRun, verbose, auto }: ScanOptions) => Promise<void>;
157
+ declare const DEFAULT_MOVIE_FORMAT = "{title} ({year})";
158
+ declare const formatMovieName: (template: string, title: string, year?: number, edition?: string | null) => string;
138
159
 
139
160
  interface ParsedMediaName {
140
161
  title: string;
@@ -145,37 +166,13 @@ interface ParsedMediaName {
145
166
  }
146
167
  declare const parseDownloadName: (name: string) => ParsedMediaName | null;
147
168
 
148
- interface HistoryOptions {
149
- limit?: number;
150
- imports?: boolean;
151
- }
152
- declare const history: ({ limit, imports }: HistoryOptions) => Promise<void>;
153
-
154
- interface UndoOptions {
155
- [key: string]: unknown;
156
- }
157
- declare const undo: (_: UndoOptions) => Promise<void>;
158
-
159
- interface DifferencesOptions {
160
- dir1: string;
161
- dir2: string;
162
- ignore?: string[];
163
- only?: string[];
164
- }
165
- declare const differences: ({ dir1: rawDir1, dir2: rawDir2, only, ignore }: DifferencesOptions) => Promise<void>;
166
-
167
- interface RenameOptions {
168
- dir: string;
169
- type?: 'movie' | 'tv' | 'ps3';
170
- verbose?: boolean;
171
- }
172
- declare const rename: ({ dir: inputDir, type, verbose }: RenameOptions) => Promise<void>;
173
-
174
- interface ResetOptions {
175
- dir: string;
176
- double?: boolean;
169
+ interface Quality {
170
+ resolution?: string;
171
+ codec?: string;
177
172
  }
178
- declare const reset: ({ dir: inputDir, double }: ResetOptions) => Promise<void>;
173
+ declare const parseQuality: (filename: string) => Quality;
174
+ declare const normalizeResolution: (s: string) => string;
175
+ declare const normalizeCodec: (s: string) => string;
179
176
 
180
177
  declare const _default: (s: string) => string;
181
178
 
@@ -215,4 +212,4 @@ var videoExtensions = [
215
212
  "yuv"
216
213
  ];
217
214
 
218
- export { type CleanOptions, type ConfigAddOptions, type ConfigRemoveOptions, type ConfigSetOptions, type ConfigShowOptions, DEFAULT_EPISODE_FORMAT, DEFAULT_MOVIE_FORMAT, DEFAULT_SEASON_FORMAT, type DifferencesOptions, type HistoryOptions, type ImportMode, type ImportRecord, type ListOptions, type MediaInfoRecord, type ParsedMediaName, type ProbeOptions, type Quality, type ReelSortConfig, type RenameOptions, type RenameRecord, type RenameSession, type ResetOptions, type ScanOptions, type UndoOptions, type WatchOptions, clean, configAdd, configRemove, configSet, configShow, deleteImport, deleteSession, detectEdition, differences, formatEpisode, formatMovieName, formatSeasonFolder, getCleanableImports, getConfig, getHistory, getImportByDest, getLastSession, getMediaInfo, history, list, normalizeCodec, normalizeResolution, parseDownloadName, parseQuality, probe, recordImport, recordRename, rename, reset, saveConfig, scan, _default as titleCase, undo, upsertMediaInfo, videoExtensions, watch };
215
+ export { type CleanOptions, type ConfigAddOptions, type ConfigRemoveOptions, type ConfigSetOptions, type ConfigShowOptions, DEFAULT_EPISODE_FORMAT, DEFAULT_MOVIE_FORMAT, DEFAULT_SEASON_FORMAT, type DifferencesOptions, type HistoryOptions, type ImportMode, type ImportRecord, type ListOptions, type MediaInfoRecord, type ParsedMediaName, type ProbeOptions, type Quality, type ReelSortConfig, type RenameOptions, type RenameRecord, type RenameSession, type ResetOptions, type ScanOptions, type WatchOptions, clean, configAdd, configRemove, configSet, configShow, deleteImport, deleteSession, detectEdition, differences, formatEpisode, formatMovieName, formatSeasonFolder, getCleanableImports, getConfig, getHistory, getImportByDest, getLastSession, getMediaInfo, history, list, normalizeCodec, normalizeResolution, parseDownloadName, parseQuality, probe, recordImport, recordRename, rename, reset, saveConfig, scan, _default as titleCase, undo, upsertMediaInfo, videoExtensions, watch };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ interface CleanOptions {
2
+ dryRun?: boolean;
3
+ olderThan?: string;
4
+ emptyFolders?: boolean;
5
+ }
6
+ declare const clean: ({ dryRun, olderThan }: CleanOptions) => Promise<void>;
7
+
1
8
  interface ConfigAddOptions {
2
9
  key: string;
3
10
  value: string;
@@ -17,7 +24,68 @@ interface ConfigShowOptions {
17
24
  declare const configAdd: ({ key, value }: ConfigAddOptions) => Promise<void>;
18
25
  declare const configRemove: ({ key, value }: ConfigRemoveOptions) => Promise<void>;
19
26
  declare const configSet: ({ key, subkey, value }: ConfigSetOptions) => Promise<void>;
20
- declare const configShow: (_: ConfigShowOptions) => Promise<void>;
27
+ declare const configShow: () => Promise<void>;
28
+
29
+ interface DifferencesOptions {
30
+ dir1: string;
31
+ dir2: string;
32
+ ignore?: string[];
33
+ only?: string[];
34
+ }
35
+ declare const differences: ({ dir1: rawDir1, dir2: rawDir2, only, ignore }: DifferencesOptions) => Promise<void>;
36
+
37
+ interface HistoryOptions {
38
+ limit?: number;
39
+ imports?: boolean;
40
+ }
41
+ declare const history: ({ limit, imports }: HistoryOptions) => Promise<void>;
42
+
43
+ interface ListOptions {
44
+ type?: 'movie' | 'tv' | 'ps3';
45
+ missingSubs?: boolean;
46
+ codec?: string;
47
+ resolution?: string;
48
+ sort?: string;
49
+ }
50
+ declare const list: ({ type, missingSubs, codec: codecFilter, resolution: resFilter, sort }: ListOptions) => Promise<void>;
51
+
52
+ interface ProbeOptions {
53
+ type?: 'movie' | 'tv' | 'ps3';
54
+ force?: boolean;
55
+ verbose?: boolean;
56
+ }
57
+ declare const probe: ({ type, force, verbose }: ProbeOptions) => Promise<void>;
58
+
59
+ interface RenameOptions {
60
+ dir: string;
61
+ type?: 'movie' | 'tv' | 'ps3';
62
+ verbose?: boolean;
63
+ }
64
+ declare const rename: ({ dir: inputDir, type, verbose }: RenameOptions) => Promise<void>;
65
+
66
+ interface ResetOptions {
67
+ dir: string;
68
+ double?: boolean;
69
+ }
70
+ declare const reset: ({ dir: inputDir, double }: ResetOptions) => Promise<void>;
71
+
72
+ interface ScanOptions {
73
+ type?: 'movie' | 'tv' | 'ps3';
74
+ hardlink?: boolean;
75
+ dryRun?: boolean;
76
+ verbose?: boolean;
77
+ auto?: boolean;
78
+ }
79
+ declare const scan: ({ type, hardlink: useHardlink, dryRun, verbose, auto }: ScanOptions) => Promise<void>;
80
+
81
+ declare const undo: () => Promise<void>;
82
+
83
+ interface WatchOptions {
84
+ hardlink?: boolean;
85
+ verbose?: boolean;
86
+ auto?: boolean;
87
+ }
88
+ declare const watch: ({ hardlink, verbose, auto }: WatchOptions) => Promise<void>;
21
89
 
22
90
  interface ReelSortConfig {
23
91
  sources: string[];
@@ -37,13 +105,6 @@ interface ReelSortConfig {
37
105
  declare const getConfig: () => ReelSortConfig;
38
106
  declare const saveConfig: (config: ReelSortConfig) => void;
39
107
 
40
- interface ProbeOptions {
41
- type?: 'movie' | 'tv' | 'ps3';
42
- force?: boolean;
43
- verbose?: boolean;
44
- }
45
- declare const probe: ({ type, force, verbose }: ProbeOptions) => Promise<void>;
46
-
47
108
  interface RenameRecord {
48
109
  id: number;
49
110
  sessionId: string;
@@ -86,26 +147,6 @@ declare const getCleanableImports: () => ImportRecord[];
86
147
  declare const deleteImport: (id: number) => void;
87
148
  declare const getHistory: (limit?: number) => RenameSession[];
88
149
 
89
- interface ListOptions {
90
- type?: 'movie' | 'tv' | 'ps3';
91
- missingSubs?: boolean;
92
- codec?: string;
93
- resolution?: string;
94
- sort?: string;
95
- }
96
- declare const list: ({ type, missingSubs, codec: codecFilter, resolution: resFilter, sort }: ListOptions) => Promise<void>;
97
-
98
- interface Quality {
99
- resolution?: string;
100
- codec?: string;
101
- }
102
- declare const parseQuality: (filename: string) => Quality;
103
- declare const normalizeResolution: (s: string) => string;
104
- declare const normalizeCodec: (s: string) => string;
105
-
106
- declare const DEFAULT_MOVIE_FORMAT = "{title} ({year})";
107
- declare const formatMovieName: (template: string, title: string, year?: number, edition?: string | null) => string;
108
-
109
150
  declare const detectEdition: (filename: string) => string | null;
110
151
 
111
152
  declare const DEFAULT_EPISODE_FORMAT = "{s}x{ee}";
@@ -113,28 +154,8 @@ declare const DEFAULT_SEASON_FORMAT = "Season {s}";
113
154
  declare const formatSeasonFolder: (format: string, season: number) => string;
114
155
  declare const formatEpisode: (season: number, episode: number, format?: string, double?: boolean, title?: string, name?: string) => string;
115
156
 
116
- interface WatchOptions {
117
- hardlink?: boolean;
118
- verbose?: boolean;
119
- auto?: boolean;
120
- }
121
- declare const watch: ({ hardlink, verbose, auto }: WatchOptions) => Promise<void>;
122
-
123
- interface CleanOptions {
124
- dryRun?: boolean;
125
- olderThan?: string;
126
- emptyFolders?: boolean;
127
- }
128
- declare const clean: ({ dryRun, olderThan }: CleanOptions) => Promise<void>;
129
-
130
- interface ScanOptions {
131
- type?: 'movie' | 'tv' | 'ps3';
132
- hardlink?: boolean;
133
- dryRun?: boolean;
134
- verbose?: boolean;
135
- auto?: boolean;
136
- }
137
- declare const scan: ({ type, hardlink: useHardlink, dryRun, verbose, auto }: ScanOptions) => Promise<void>;
157
+ declare const DEFAULT_MOVIE_FORMAT = "{title} ({year})";
158
+ declare const formatMovieName: (template: string, title: string, year?: number, edition?: string | null) => string;
138
159
 
139
160
  interface ParsedMediaName {
140
161
  title: string;
@@ -145,37 +166,13 @@ interface ParsedMediaName {
145
166
  }
146
167
  declare const parseDownloadName: (name: string) => ParsedMediaName | null;
147
168
 
148
- interface HistoryOptions {
149
- limit?: number;
150
- imports?: boolean;
151
- }
152
- declare const history: ({ limit, imports }: HistoryOptions) => Promise<void>;
153
-
154
- interface UndoOptions {
155
- [key: string]: unknown;
156
- }
157
- declare const undo: (_: UndoOptions) => Promise<void>;
158
-
159
- interface DifferencesOptions {
160
- dir1: string;
161
- dir2: string;
162
- ignore?: string[];
163
- only?: string[];
164
- }
165
- declare const differences: ({ dir1: rawDir1, dir2: rawDir2, only, ignore }: DifferencesOptions) => Promise<void>;
166
-
167
- interface RenameOptions {
168
- dir: string;
169
- type?: 'movie' | 'tv' | 'ps3';
170
- verbose?: boolean;
171
- }
172
- declare const rename: ({ dir: inputDir, type, verbose }: RenameOptions) => Promise<void>;
173
-
174
- interface ResetOptions {
175
- dir: string;
176
- double?: boolean;
169
+ interface Quality {
170
+ resolution?: string;
171
+ codec?: string;
177
172
  }
178
- declare const reset: ({ dir: inputDir, double }: ResetOptions) => Promise<void>;
173
+ declare const parseQuality: (filename: string) => Quality;
174
+ declare const normalizeResolution: (s: string) => string;
175
+ declare const normalizeCodec: (s: string) => string;
179
176
 
180
177
  declare const _default: (s: string) => string;
181
178
 
@@ -215,4 +212,4 @@ var videoExtensions = [
215
212
  "yuv"
216
213
  ];
217
214
 
218
- export { type CleanOptions, type ConfigAddOptions, type ConfigRemoveOptions, type ConfigSetOptions, type ConfigShowOptions, DEFAULT_EPISODE_FORMAT, DEFAULT_MOVIE_FORMAT, DEFAULT_SEASON_FORMAT, type DifferencesOptions, type HistoryOptions, type ImportMode, type ImportRecord, type ListOptions, type MediaInfoRecord, type ParsedMediaName, type ProbeOptions, type Quality, type ReelSortConfig, type RenameOptions, type RenameRecord, type RenameSession, type ResetOptions, type ScanOptions, type UndoOptions, type WatchOptions, clean, configAdd, configRemove, configSet, configShow, deleteImport, deleteSession, detectEdition, differences, formatEpisode, formatMovieName, formatSeasonFolder, getCleanableImports, getConfig, getHistory, getImportByDest, getLastSession, getMediaInfo, history, list, normalizeCodec, normalizeResolution, parseDownloadName, parseQuality, probe, recordImport, recordRename, rename, reset, saveConfig, scan, _default as titleCase, undo, upsertMediaInfo, videoExtensions, watch };
215
+ export { type CleanOptions, type ConfigAddOptions, type ConfigRemoveOptions, type ConfigSetOptions, type ConfigShowOptions, DEFAULT_EPISODE_FORMAT, DEFAULT_MOVIE_FORMAT, DEFAULT_SEASON_FORMAT, type DifferencesOptions, type HistoryOptions, type ImportMode, type ImportRecord, type ListOptions, type MediaInfoRecord, type ParsedMediaName, type ProbeOptions, type Quality, type ReelSortConfig, type RenameOptions, type RenameRecord, type RenameSession, type ResetOptions, type ScanOptions, type WatchOptions, clean, configAdd, configRemove, configSet, configShow, deleteImport, deleteSession, detectEdition, differences, formatEpisode, formatMovieName, formatSeasonFolder, getCleanableImports, getConfig, getHistory, getImportByDest, getLastSession, getMediaInfo, history, list, normalizeCodec, normalizeResolution, parseDownloadName, parseQuality, probe, recordImport, recordRename, rename, reset, saveConfig, scan, _default as titleCase, undo, upsertMediaInfo, videoExtensions, watch };