Skip to content

Commit 5378462

Browse files
committed
Various fixes, admin ui for media providers now able to add new providers.
1 parent a65dac9 commit 5378462

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

AiServer.ServiceInterface/MediaTransform/CreateMediaTransformCommand.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,10 @@ async Task DownloadOutputAsync(IMediaTransformProvider aiProvider,
354354
"video/mp4" => "mp4",
355355
"video/webm" => "webm",
356356
"video/ogg" => "ogg",
357-
_ => "webm"
357+
"video/mov" => "mov",
358+
"video/avi" => "avi",
359+
"video/mkv" => "mkv",
360+
_ => "mp4"
358361
};
359362

360363
var imageBytes = await response.Content.ReadAsByteArrayAsync();

AiServer.ServiceInterface/VideoServices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ private bool IsVideoFormat(MediaOutputFormat outputFormat)
198198
case MediaOutputFormat.MKV:
199199
case MediaOutputFormat.MOV:
200200
case MediaOutputFormat.WebM:
201-
return true;
202201
case MediaOutputFormat.GIF:
202+
return true;
203203
case MediaOutputFormat.MP3:
204204
case MediaOutputFormat.WAV:
205205
case MediaOutputFormat.FLAC:

AiServer.ServiceModel/GenerationAdmin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class CreateMediaProvider : ICreateDb<MediaProvider>, IReturn<IdResponse>
5757
public List<string>? Models { get; set; }
5858

5959
[Input(Type = "hidden")]
60-
public int? MediaTypeId { get; set; }
60+
public string MediaTypeId { get; set; }
6161
}
6262

6363
[Tag(Tag.Info)]

AiServer/wwwroot/mjs/components/MediaProviders.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,11 @@ const SelectModels = {
127127
}
128128
return;
129129
} else {
130-
supportedModels.value = Object.keys(props.providerType?.apiModels, [])
131-
qualifiedModelMappings.value = props.providerType?.apiModels
130+
if (props.providerType?.apiModels) {
131+
console.log(props.providerType?.apiModels)
132+
supportedModels.value = Object.keys(props.providerType?.apiModels, [])
133+
qualifiedModelMappings.value = props.providerType?.apiModels
134+
}
132135
}
133136
comfyModels.value = []
134137
isConnectionTested.value = false
@@ -212,7 +215,7 @@ export default {
212215
<span class="flex flex-1">
213216
<Icon :src="type.icon" class="w-5 h-5 mr-2" />
214217
<span class="flex flex-col">
215-
<span class="block text-sm font-medium text-gray-900">{{type.name}}</span>
218+
<span class="block text-sm font-medium text-gray-900">{{type.id}}</span>
216219
</span>
217220
</span>
218221
<svg v-if="providerType == type.id" class="h-5 w-5 text-indigo-600" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">

0 commit comments

Comments
 (0)