We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b50d3a commit 1d7d2f0Copy full SHA for 1d7d2f0
1 file changed
src/actions/schedule-playlist-item.ts
@@ -61,12 +61,6 @@ const schedulePlaylistItem = {
61
throw new Error('API key is required');
62
}
63
64
- await utils.waitForAssetReady(
65
- z,
66
- bundle.inputData.asset_id,
67
- bundle.authData.api_key
68
- );
69
-
70
let assetId = null;
71
const isNewAsset = bundle.inputData.is_new_asset;
72
@@ -80,8 +74,10 @@ const schedulePlaylistItem = {
80
74
assetId = bundle.inputData.asset_id;
81
75
82
76
77
+ await utils.waitForAssetReady(z, assetId, bundle.authData.api_key);
78
+
83
79
return await utils.createPlaylistItem(z, bundle, {
84
- assetId: assetId,
+ assetId,
85
playlistId: bundle.inputData.playlist_id,
86
duration: bundle.inputData.duration,
87
});
0 commit comments