File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed
Jellyfin.Plugin.MediaSegmentsApi Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . ComponentModel . DataAnnotations ;
3
+ using System . Globalization ;
3
4
using System . Net . Mime ;
4
5
using System . Threading . Tasks ;
6
+ using MediaBrowser . Common . Extensions ;
5
7
using MediaBrowser . Controller ;
6
8
using MediaBrowser . Controller . Entities ;
7
9
using MediaBrowser . Controller . Library ;
@@ -76,7 +78,9 @@ public async Task<ActionResult<QueryResult<MediaSegmentDto>>> CreateSegmentAsync
76
78
77
79
segment . ItemId = item . Id ;
78
80
79
- var seg = await _mediaSegmentManager . CreateSegmentAsync ( segment , providerId ) . ConfigureAwait ( false ) ;
81
+ var providerUID = providerId . ToLowerInvariant ( ) . GetMD5 ( ) . ToString ( "N" , CultureInfo . InvariantCulture ) ;
82
+
83
+ var seg = await _mediaSegmentManager . CreateSegmentAsync ( segment , providerUID ) . ConfigureAwait ( false ) ;
80
84
return Ok ( seg ) ;
81
85
}
82
86
Original file line number Diff line number Diff line change 11
11
</PropertyGroup >
12
12
13
13
<ItemGroup >
14
- <!--
15
14
<PackageReference Include =" Jellyfin.Controller" Version =" 10.10.*" />
16
15
<PackageReference Include =" Jellyfin.Model" Version =" 10.10.*" />
17
- -->
18
- </ItemGroup >
19
- <!-- REMOVE AND USE NUGET PUBLISHED PACKAGES -->
20
- <ItemGroup >
21
- <ProjectReference Include =" ../../jellyfin/Jellyfin.Data/Jellyfin.Data.csproj" />
22
- <ProjectReference Include =" ../../jellyfin/MediaBrowser.Model/MediaBrowser.Model.csproj" />
23
- <ProjectReference Include =" ../../jellyfin/MediaBrowser.Controller/MediaBrowser.Controller.csproj" />
24
- <ProjectReference Include =" ../../jellyfin/MediaBrowser.Common/MediaBrowser.Common.csproj" />
25
- <ProjectReference Include =" ../../jellyfin/src/Jellyfin.Extensions/Jellyfin.Extensions.csproj" />
26
16
</ItemGroup >
27
17
28
18
<ItemGroup >
Original file line number Diff line number Diff line change 2
2
name : " MediaSegments API"
3
3
guid : " 6f0aaab5-e251-4a6d-b8d5-bc8c65222051"
4
4
version : " 1.0.0.0"
5
- targetAbi : " 10.10.0 .0"
5
+ targetAbi : " 10.10.2 .0"
6
6
framework : " net8.0"
7
7
overview : " Create and delete Media Segments"
8
8
description : >
You can’t perform that action at this time.
0 commit comments