@sequencemedia/music-library 1.0.0 → 1.0.4

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.
@@ -1,37 +1,37 @@
1
- import debug from 'debug'
2
-
3
- import * as musicLibraryParser from '@sequencemedia/music-library-parser'
4
-
5
- import normalise from '#music-library/common/normalise'
6
-
7
- const {
8
- library: {
9
- toM3U: parseToM3U
10
- }
11
- } = musicLibraryParser
12
-
13
- const error = debug('@sequencemedia/music-library:error')
14
-
15
- export async function toM3U (jar, xml, destination) {
16
- try {
17
- const j = jar
18
- ? normalise(jar)
19
- : jar
20
-
21
- const x = xml
22
- ? normalise(xml)
23
- : xml
24
-
25
- const d = destination
26
- ? normalise(destination)
27
- : destination
28
-
29
- return await parseToM3U(j, x, d)
30
- } catch ({ message }) {
31
- error(message)
32
- }
33
- }
34
-
35
- export * as tracks from './tracks'
36
- export * as playlists from './playlists'
37
- export * as transform from './transform'
1
+ import debug from 'debug'
2
+
3
+ import musicLibraryParser from '@sequencemedia/music-library-parser'
4
+
5
+ import normalise from '#music-library/common/normalise'
6
+
7
+ const {
8
+ library: {
9
+ toM3U: parseToM3U
10
+ }
11
+ } = musicLibraryParser
12
+
13
+ const error = debug('@sequencemedia/music-library:error')
14
+
15
+ export async function toM3U (jar, xml, destination) {
16
+ try {
17
+ const j = jar
18
+ ? normalise(jar)
19
+ : jar
20
+
21
+ const x = xml
22
+ ? normalise(xml)
23
+ : xml
24
+
25
+ const d = destination
26
+ ? normalise(destination)
27
+ : destination
28
+
29
+ return await parseToM3U(j, x, d)
30
+ } catch ({ message }) {
31
+ error(message)
32
+ }
33
+ }
34
+
35
+ export * as tracks from '#music-library/library/tracks'
36
+ export * as playlists from '#music-library/library/playlists'
37
+ export * as transform from '#music-library/library/transform'
@@ -1,37 +1,37 @@
1
- import debug from 'debug'
2
-
3
- import * as musicLibraryParser from '@sequencemedia/music-library-parser'
4
-
5
- import normalise from '#music-library/common/normalise'
6
-
7
- const {
8
- library: {
9
- playlists: {
10
- toM3U: parseToM3U
11
- }
12
- }
13
- } = musicLibraryParser
14
-
15
- const error = debug('@sequencemedia/music-library:error')
16
-
17
- export async function toM3U (jar, xml, destination) {
18
- try {
19
- const j = jar
20
- ? normalise(jar)
21
- : jar
22
-
23
- const x = xml
24
- ? normalise(xml)
25
- : xml
26
-
27
- const d = destination
28
- ? normalise(destination)
29
- : destination
30
-
31
- return await parseToM3U(j, x, d)
32
- } catch ({ message }) {
33
- error(message)
34
- }
35
- }
36
-
37
- export * as transform from './transform'
1
+ import debug from 'debug'
2
+
3
+ import musicLibraryParser from '@sequencemedia/music-library-parser'
4
+
5
+ import normalise from '#music-library/common/normalise'
6
+
7
+ const {
8
+ library: {
9
+ playlists: {
10
+ toM3U: parseToM3U
11
+ }
12
+ }
13
+ } = musicLibraryParser
14
+
15
+ const error = debug('@sequencemedia/music-library:error')
16
+
17
+ export async function toM3U (jar, xml, destination) {
18
+ try {
19
+ const j = jar
20
+ ? normalise(jar)
21
+ : jar
22
+
23
+ const x = xml
24
+ ? normalise(xml)
25
+ : xml
26
+
27
+ const d = destination
28
+ ? normalise(destination)
29
+ : destination
30
+
31
+ return await parseToM3U(j, x, d)
32
+ } catch ({ message }) {
33
+ error(message)
34
+ }
35
+ }
36
+
37
+ export * as transform from '#music-library/library/playlists/transform'
@@ -1,67 +1,67 @@
1
- import debug from 'debug'
2
-
3
- import * as musicLibraryParser from '@sequencemedia/music-library-parser'
4
-
5
- import normalise from '#music-library/common/normalise'
6
-
7
- const {
8
- library: {
9
- playlists: {
10
- transform: {
11
- toJSON: transformToJSON,
12
- toJS: transformToJS,
13
- toES: transformToES
14
- }
15
- }
16
- }
17
- } = musicLibraryParser
18
-
19
- const error = debug('@sequencemedia/music-library:transform:error')
20
-
21
- export async function toJSON (jar, xml) {
22
- try {
23
- const j = jar
24
- ? normalise(jar)
25
- : jar
26
-
27
- const x = xml
28
- ? normalise(xml)
29
- : xml
30
-
31
- return await transformToJSON(j, x)
32
- } catch ({ message }) {
33
- error(message)
34
- }
35
- }
36
-
37
- export async function toJS (jar, xml) {
38
- try {
39
- const j = jar
40
- ? normalise(jar)
41
- : jar
42
-
43
- const x = xml
44
- ? normalise(xml)
45
- : xml
46
-
47
- return await transformToJS(j, x)
48
- } catch ({ message }) {
49
- error(message)
50
- }
51
- }
52
-
53
- export async function toES (jar, xml) {
54
- try {
55
- const j = jar
56
- ? normalise(jar)
57
- : jar
58
-
59
- const x = xml
60
- ? normalise(xml)
61
- : xml
62
-
63
- return await transformToES(j, x)
64
- } catch ({ message }) {
65
- error(message)
66
- }
67
- }
1
+ import debug from 'debug'
2
+
3
+ import musicLibraryParser from '@sequencemedia/music-library-parser'
4
+
5
+ import normalise from '#music-library/common/normalise'
6
+
7
+ const {
8
+ library: {
9
+ playlists: {
10
+ transform: {
11
+ toJSON: transformToJSON,
12
+ toJS: transformToJS,
13
+ toES: transformToES
14
+ }
15
+ }
16
+ }
17
+ } = musicLibraryParser
18
+
19
+ const error = debug('@sequencemedia/music-library:transform:error')
20
+
21
+ export async function toJSON (jar, xml) {
22
+ try {
23
+ const j = jar
24
+ ? normalise(jar)
25
+ : jar
26
+
27
+ const x = xml
28
+ ? normalise(xml)
29
+ : xml
30
+
31
+ return await transformToJSON(j, x)
32
+ } catch ({ message }) {
33
+ error(message)
34
+ }
35
+ }
36
+
37
+ export async function toJS (jar, xml) {
38
+ try {
39
+ const j = jar
40
+ ? normalise(jar)
41
+ : jar
42
+
43
+ const x = xml
44
+ ? normalise(xml)
45
+ : xml
46
+
47
+ return await transformToJS(j, x)
48
+ } catch ({ message }) {
49
+ error(message)
50
+ }
51
+ }
52
+
53
+ export async function toES (jar, xml) {
54
+ try {
55
+ const j = jar
56
+ ? normalise(jar)
57
+ : jar
58
+
59
+ const x = xml
60
+ ? normalise(xml)
61
+ : xml
62
+
63
+ return await transformToES(j, x)
64
+ } catch ({ message }) {
65
+ error(message)
66
+ }
67
+ }
@@ -1,37 +1,37 @@
1
- import debug from 'debug'
2
-
3
- import * as musicLibraryParser from '@sequencemedia/music-library-parser'
4
-
5
- import normalise from '#music-library/common/normalise'
6
-
7
- const {
8
- library: {
9
- tracks: {
10
- toM3U: parseToM3U
11
- }
12
- }
13
- } = musicLibraryParser
14
-
15
- const error = debug('@sequencemedia/music-library:error')
16
-
17
- export async function toM3U (jar, xml, destination) {
18
- try {
19
- const j = jar
20
- ? normalise(jar)
21
- : jar
22
-
23
- const x = xml
24
- ? normalise(xml)
25
- : xml
26
-
27
- const d = destination
28
- ? normalise(destination)
29
- : destination
30
-
31
- return await parseToM3U(j, x, d)
32
- } catch ({ message }) {
33
- error(message)
34
- }
35
- }
36
-
37
- export * as transform from './transform'
1
+ import debug from 'debug'
2
+
3
+ import musicLibraryParser from '@sequencemedia/music-library-parser'
4
+
5
+ import normalise from '#music-library/common/normalise'
6
+
7
+ const {
8
+ library: {
9
+ tracks: {
10
+ toM3U: parseToM3U
11
+ }
12
+ }
13
+ } = musicLibraryParser
14
+
15
+ const error = debug('@sequencemedia/music-library:error')
16
+
17
+ export async function toM3U (jar, xml, destination) {
18
+ try {
19
+ const j = jar
20
+ ? normalise(jar)
21
+ : jar
22
+
23
+ const x = xml
24
+ ? normalise(xml)
25
+ : xml
26
+
27
+ const d = destination
28
+ ? normalise(destination)
29
+ : destination
30
+
31
+ return await parseToM3U(j, x, d)
32
+ } catch ({ message }) {
33
+ error(message)
34
+ }
35
+ }
36
+
37
+ export * as transform from '#music-library/library/tracks/transform'
@@ -1,67 +1,67 @@
1
- import debug from 'debug'
2
-
3
- import * as musicLibraryParser from '@sequencemedia/music-library-parser'
4
-
5
- import normalise from '#music-library/common/normalise'
6
-
7
- const {
8
- library: {
9
- tracks: {
10
- transform: {
11
- toJSON: transformToJSON,
12
- toJS: transformToJS,
13
- toES: transformToES
14
- }
15
- }
16
- }
17
- } = musicLibraryParser
18
-
19
- const error = debug('@sequencemedia/music-library:transform:error')
20
-
21
- export async function toJSON (jar, xml) {
22
- try {
23
- const j = jar
24
- ? normalise(jar)
25
- : jar
26
-
27
- const x = xml
28
- ? normalise(xml)
29
- : xml
30
-
31
- return await transformToJSON(j, x)
32
- } catch ({ message }) {
33
- error(message)
34
- }
35
- }
36
-
37
- export async function toJS (jar, xml) {
38
- try {
39
- const j = jar
40
- ? normalise(jar)
41
- : jar
42
-
43
- const x = xml
44
- ? normalise(xml)
45
- : xml
46
-
47
- return await transformToJS(j, x)
48
- } catch ({ message }) {
49
- error(message)
50
- }
51
- }
52
-
53
- export async function toES (jar, xml) {
54
- try {
55
- const j = jar
56
- ? normalise(jar)
57
- : jar
58
-
59
- const x = xml
60
- ? normalise(xml)
61
- : xml
62
-
63
- return await transformToES(j, x)
64
- } catch ({ message }) {
65
- error(message)
66
- }
67
- }
1
+ import debug from 'debug'
2
+
3
+ import musicLibraryParser from '@sequencemedia/music-library-parser'
4
+
5
+ import normalise from '#music-library/common/normalise'
6
+
7
+ const {
8
+ library: {
9
+ tracks: {
10
+ transform: {
11
+ toJSON: transformToJSON,
12
+ toJS: transformToJS,
13
+ toES: transformToES
14
+ }
15
+ }
16
+ }
17
+ } = musicLibraryParser
18
+
19
+ const error = debug('@sequencemedia/music-library:transform:error')
20
+
21
+ export async function toJSON (jar, xml) {
22
+ try {
23
+ const j = jar
24
+ ? normalise(jar)
25
+ : jar
26
+
27
+ const x = xml
28
+ ? normalise(xml)
29
+ : xml
30
+
31
+ return await transformToJSON(j, x)
32
+ } catch ({ message }) {
33
+ error(message)
34
+ }
35
+ }
36
+
37
+ export async function toJS (jar, xml) {
38
+ try {
39
+ const j = jar
40
+ ? normalise(jar)
41
+ : jar
42
+
43
+ const x = xml
44
+ ? normalise(xml)
45
+ : xml
46
+
47
+ return await transformToJS(j, x)
48
+ } catch ({ message }) {
49
+ error(message)
50
+ }
51
+ }
52
+
53
+ export async function toES (jar, xml) {
54
+ try {
55
+ const j = jar
56
+ ? normalise(jar)
57
+ : jar
58
+
59
+ const x = xml
60
+ ? normalise(xml)
61
+ : xml
62
+
63
+ return await transformToES(j, x)
64
+ } catch ({ message }) {
65
+ error(message)
66
+ }
67
+ }
@@ -1,65 +1,65 @@
1
- import debug from 'debug'
2
-
3
- import * as musicLibraryParser from '@sequencemedia/music-library-parser'
4
-
5
- import normalise from '#music-library/common/normalise'
6
-
7
- const {
8
- library: {
9
- transform: {
10
- toJSON: transformToJSON,
11
- toJS: transformToJS,
12
- toES: transformToES
13
- }
14
- }
15
- } = musicLibraryParser
16
-
17
- const error = debug('@sequencemedia/music-library:transform:error')
18
-
19
- export async function toJSON (jar, xml) {
20
- try {
21
- const j = jar
22
- ? normalise(jar)
23
- : jar
24
-
25
- const x = xml
26
- ? normalise(xml)
27
- : xml
28
-
29
- return await transformToJSON(j, x)
30
- } catch ({ message }) {
31
- error(message)
32
- }
33
- }
34
-
35
- export async function toJS (jar, xml) {
36
- try {
37
- const j = jar
38
- ? normalise(jar)
39
- : jar
40
-
41
- const x = xml
42
- ? normalise(xml)
43
- : xml
44
-
45
- return await transformToJS(j, x)
46
- } catch ({ message }) {
47
- error(message)
48
- }
49
- }
50
-
51
- export async function toES (jar, xml) {
52
- try {
53
- const j = jar
54
- ? normalise(jar)
55
- : jar
56
-
57
- const x = xml
58
- ? normalise(xml)
59
- : xml
60
-
61
- return await transformToES(j, x)
62
- } catch ({ message }) {
63
- error(message)
64
- }
65
- }
1
+ import debug from 'debug'
2
+
3
+ import musicLibraryParser from '@sequencemedia/music-library-parser'
4
+
5
+ import normalise from '#music-library/common/normalise'
6
+
7
+ const {
8
+ library: {
9
+ transform: {
10
+ toJSON: transformToJSON,
11
+ toJS: transformToJS,
12
+ toES: transformToES
13
+ }
14
+ }
15
+ } = musicLibraryParser
16
+
17
+ const error = debug('@sequencemedia/music-library:transform:error')
18
+
19
+ export async function toJSON (jar, xml) {
20
+ try {
21
+ const j = jar
22
+ ? normalise(jar)
23
+ : jar
24
+
25
+ const x = xml
26
+ ? normalise(xml)
27
+ : xml
28
+
29
+ return await transformToJSON(j, x)
30
+ } catch ({ message }) {
31
+ error(message)
32
+ }
33
+ }
34
+
35
+ export async function toJS (jar, xml) {
36
+ try {
37
+ const j = jar
38
+ ? normalise(jar)
39
+ : jar
40
+
41
+ const x = xml
42
+ ? normalise(xml)
43
+ : xml
44
+
45
+ return await transformToJS(j, x)
46
+ } catch ({ message }) {
47
+ error(message)
48
+ }
49
+ }
50
+
51
+ export async function toES (jar, xml) {
52
+ try {
53
+ const j = jar
54
+ ? normalise(jar)
55
+ : jar
56
+
57
+ const x = xml
58
+ ? normalise(xml)
59
+ : xml
60
+
61
+ return await transformToES(j, x)
62
+ } catch ({ message }) {
63
+ error(message)
64
+ }
65
+ }
@@ -1 +1 @@
1
- export * as library from '#music-library/watch/library'
1
+ export * as library from '#music-library/watch/library'