comty.js 0.47.0 → 0.47.1
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/models/playlists/index.js +22 -8
- package/dist/remotes.js +6 -0
- package/package.json +1 -1
|
@@ -5,7 +5,21 @@
|
|
|
5
5
|
return globalThis.__comty_shared_state.instances["music"]
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
static __initStatic() {this.
|
|
8
|
+
static __initStatic() {this.refreshTrackCache = async (track_id) => {
|
|
9
|
+
if (!track_id) {
|
|
10
|
+
throw new Error("Track ID is required")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { data } = await _request2.default.call(void 0, {
|
|
14
|
+
instance: PlaylistsModel.api_instance,
|
|
15
|
+
method: "POST",
|
|
16
|
+
url: `/tracks/${track_id}/refresh-cache`,
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
return data
|
|
20
|
+
}}
|
|
21
|
+
|
|
22
|
+
static __initStatic2() {this.putPlaylist = async (payload) => {
|
|
9
23
|
if (!payload) {
|
|
10
24
|
throw new Error("Payload is required")
|
|
11
25
|
}
|
|
@@ -20,7 +34,7 @@
|
|
|
20
34
|
return data
|
|
21
35
|
}}
|
|
22
36
|
|
|
23
|
-
static
|
|
37
|
+
static __initStatic3() {this.deletePlaylist = async (id) => {
|
|
24
38
|
if (!id) {
|
|
25
39
|
throw new Error("ID is required")
|
|
26
40
|
}
|
|
@@ -34,7 +48,7 @@
|
|
|
34
48
|
return data
|
|
35
49
|
}}
|
|
36
50
|
|
|
37
|
-
static
|
|
51
|
+
static __initStatic4() {this.getTrack = async (id) => {
|
|
38
52
|
const { data } = await _request2.default.call(void 0, {
|
|
39
53
|
instance: PlaylistsModel.api_instance,
|
|
40
54
|
method: "GET",
|
|
@@ -44,7 +58,7 @@
|
|
|
44
58
|
return data
|
|
45
59
|
}}
|
|
46
60
|
|
|
47
|
-
static
|
|
61
|
+
static __initStatic5() {this.getTracks = async (ids) => {
|
|
48
62
|
const { data } = await _request2.default.call(void 0, {
|
|
49
63
|
instance: PlaylistsModel.api_instance,
|
|
50
64
|
method: "GET",
|
|
@@ -57,7 +71,7 @@
|
|
|
57
71
|
return data
|
|
58
72
|
}}
|
|
59
73
|
|
|
60
|
-
static
|
|
74
|
+
static __initStatic6() {this.getPlaylist = async (id) => {
|
|
61
75
|
const { data } = await _request2.default.call(void 0, {
|
|
62
76
|
instance: PlaylistsModel.api_instance,
|
|
63
77
|
method: "GET",
|
|
@@ -67,7 +81,7 @@
|
|
|
67
81
|
return data
|
|
68
82
|
}}
|
|
69
83
|
|
|
70
|
-
static
|
|
84
|
+
static __initStatic7() {this.search = async (keywords) => {
|
|
71
85
|
const { data } = await _request2.default.call(void 0, {
|
|
72
86
|
instance: PlaylistsModel.api_instance,
|
|
73
87
|
method: "GET",
|
|
@@ -80,7 +94,7 @@
|
|
|
80
94
|
return data
|
|
81
95
|
}}
|
|
82
96
|
|
|
83
|
-
static
|
|
97
|
+
static __initStatic8() {this.getMyReleases = async (keywords) => {
|
|
84
98
|
const { data } = await _request2.default.call(void 0, {
|
|
85
99
|
instance: PlaylistsModel.api_instance,
|
|
86
100
|
method: "GET",
|
|
@@ -92,4 +106,4 @@
|
|
|
92
106
|
|
|
93
107
|
return data
|
|
94
108
|
}}
|
|
95
|
-
} PlaylistsModel.__initStatic(); PlaylistsModel.__initStatic2(); PlaylistsModel.__initStatic3(); PlaylistsModel.__initStatic4(); PlaylistsModel.__initStatic5(); PlaylistsModel.__initStatic6(); PlaylistsModel.__initStatic7(); exports.default = PlaylistsModel;
|
|
109
|
+
} PlaylistsModel.__initStatic(); PlaylistsModel.__initStatic2(); PlaylistsModel.__initStatic3(); PlaylistsModel.__initStatic4(); PlaylistsModel.__initStatic5(); PlaylistsModel.__initStatic6(); PlaylistsModel.__initStatic7(); PlaylistsModel.__initStatic8(); exports.default = PlaylistsModel;
|
package/dist/remotes.js
CHANGED
|
@@ -17,6 +17,7 @@ const envOrigins = {
|
|
|
17
17
|
livestreaming: `http://${getCurrentHostname()}:3030`,
|
|
18
18
|
marketplace: `http://${getCurrentHostname()}:3040`,
|
|
19
19
|
music: `http://${getCurrentHostname()}:3050`,
|
|
20
|
+
files: `http://${getCurrentHostname()}:3060`,
|
|
20
21
|
},
|
|
21
22
|
"production": {
|
|
22
23
|
default: "https://api.comty.app",
|
|
@@ -24,6 +25,7 @@ const envOrigins = {
|
|
|
24
25
|
livestreaming: `https://livestreaming_api.comty.app`,
|
|
25
26
|
marketplace: `https://marketplace_api.comty.app`,
|
|
26
27
|
music: `https://music_api.comty.app`,
|
|
28
|
+
files: `https://files_api.comty.app`,
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -48,4 +50,8 @@ exports. default = {
|
|
|
48
50
|
marketplace: {
|
|
49
51
|
origin: composeRemote("marketplace"),
|
|
50
52
|
},
|
|
53
|
+
files: {
|
|
54
|
+
origin: composeRemote("files"),
|
|
55
|
+
hasWebsocket: false,
|
|
56
|
+
}
|
|
51
57
|
}
|