File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Jellyfin.Plugin.MediaSegmentsApi/Controllers Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,6 @@ public class MediaSegmentsApiController(IMediaSegmentManager mediaSegmentManager
33
33
34
34
private readonly ILibraryManager _libraryManager = libraryManager ;
35
35
36
- private readonly string _pluginId = Plugin . Instance ! . Name . ToLowerInvariant ( )
37
- . GetMD5 ( )
38
- . ToString ( "N" , CultureInfo . InvariantCulture ) ;
39
-
40
36
/// <summary>
41
37
/// Plugin meta endpoint.
42
38
/// </summary>
@@ -69,14 +65,16 @@ public async Task<ActionResult<QueryResult<MediaSegmentDto>>> CreateSegmentAsync
69
65
[ FromBody , Required ] MediaSegmentDto segment )
70
66
{
71
67
var item = _libraryManager . GetItemById < BaseItem > ( itemId ) ;
72
- if ( item is null || segment is null )
68
+ if ( item is null || segment is null || providerId is null )
73
69
{
74
70
return NotFound ( ) ;
75
71
}
76
72
77
73
segment . ItemId = item . Id ;
78
74
79
- var seg = await _mediaSegmentManager . CreateSegmentAsync ( segment , _pluginId ) . ConfigureAwait ( false ) ;
75
+ var providerUID = providerId . ToLowerInvariant ( ) . GetMD5 ( ) . ToString ( "N" , CultureInfo . InvariantCulture ) ;
76
+
77
+ var seg = await _mediaSegmentManager . CreateSegmentAsync ( segment , providerUID ) . ConfigureAwait ( false ) ;
80
78
return Ok ( seg ) ;
81
79
}
82
80
You can’t perform that action at this time.
0 commit comments