Skip to content

Commit 661ef41

Browse files
committed
removed unused logs
1 parent aa35f17 commit 661ef41

File tree

1 file changed

+0
-40
lines changed
  • app/components-react/highlighter

1 file changed

+0
-40
lines changed

app/components-react/highlighter/utils.ts

-40
Original file line numberDiff line numberDiff line change
@@ -103,48 +103,27 @@ export function aiFilterClips(
103103
]
104104
: rounds;
105105

106-
// console.log('selectedRounds', selectedRounds);
107-
108106
// Sort rounds by score (descending)
109107
const sortedRounds = selectedRounds.sort(
110108
(a, b) => getRoundScore(b, clips) - getRoundScore(a, clips),
111109
);
112110

113-
// console.log('sortedRounds by rooundScore', sortedRounds);
114-
115111
let clipsFromRounds: TClip[] = [];
116112

117113
let totalDuration = 0;
118114
for (let i = 0; i < sortedRounds.length; ++i) {
119115
if (totalDuration > targetDuration) {
120-
// console.log(`Duration: ${totalDuration} more than target: ${targetDuration}`);
121116
break;
122117
} else {
123-
// console.log(`Duration: ${totalDuration} less than target: ${targetDuration}`);
124118
//Todo M: how do sort? Per round or all together and then the rounds are in the stream order again?
125119
const roundIndex = sortedRounds[i];
126-
// console.log('include round ', roundIndex);
127120

128121
const roundClips = sortClipsByOrder(getClipsOfRound(roundIndex, clips), streamId);
129-
// console.log(
130-
// 'roundClips before adding:',
131-
// roundClips.map(c => ({
132-
// duration: c.duration,
133-
// })),
134-
// );
135122

136123
clipsFromRounds = [...clipsFromRounds, ...roundClips];
137124

138-
// console.log(
139-
// 'clipsFromRounds after adding:',
140-
// clipsFromRounds.map(c => ({
141-
// duration: c.duration,
142-
// })),
143-
// );
144125
totalDuration = getCombinedClipsDuration(clipsFromRounds);
145-
// console.log('new totalDuration:', totalDuration);
146126
}
147-
// console.log('clipsFromRounds', clipsFromRounds);
148127
}
149128
const contextTypes = [
150129
EHighlighterInputTypes.DEPLOY,
@@ -156,25 +135,12 @@ export function aiFilterClips(
156135
clips => !(clips as IAiClip).aiInfo.inputs.some(input => contextTypes.includes(input.type)),
157136
)
158137
.sort((a, b) => (a as IAiClip).aiInfo.score - (b as IAiClip).aiInfo.score);
159-
// console.log(
160-
// 'clipsSortedByScore',
161-
// clipsSortedByScore.map(clip => {
162-
// return {
163-
// score: (clip as IAiClip).aiInfo.score,
164-
// inputs: JSON.stringify((clip as IAiClip).aiInfo.inputs),
165-
// };
166-
// }),
167-
// );
168-
// console.log('clipsFromRounds', clipsFromRounds);
169138

170139
const filteredClips: TClip[] = clipsFromRounds;
171140
let currentDuration = getCombinedClipsDuration(filteredClips);
172141

173-
// console.log('remove clipswise to get closer to target');
174-
175142
const BUFFER_SEC = 0;
176143
while (currentDuration > targetDuration + BUFFER_SEC) {
177-
// console.log('ruuun currentDuration', currentDuration);
178144
if (clipsSortedByScore === undefined || clipsSortedByScore.length === 0) {
179145
break;
180146
}
@@ -187,12 +153,6 @@ export function aiFilterClips(
187153
if (index > -1) {
188154
filteredClips.splice(index, 1); // 2nd parameter means remove one item only
189155
currentDuration = getCombinedClipsDuration(filteredClips);
190-
// console.log(
191-
// 'removed, new currentDuration:',
192-
// currentDuration,
193-
// 'target:',
194-
// targetDuration + BUFFER_SEC,
195-
// );
196156
}
197157
}
198158

0 commit comments

Comments
 (0)