Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
call:
uses: jellyfin/jellyfin-meta-plugins/.github/workflows/build.yaml@master
with:
dotnet-version: "9.0.*"
dotnet-target: "net9.0"
dotnet-version: "10.0.*"
dotnet-target: "net10.0"
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
build:
uses: jellyfin/jellyfin-meta-plugins/.github/workflows/build.yaml@master
with:
dotnet-version: "9.0.*"
dotnet-target: "net9.0"
dotnet-version: "10.0.*"
dotnet-target: "net10.0"
upload:
runs-on: ubuntu-latest
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan-codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
call:
uses: jellyfin/jellyfin-meta-plugins/.github/workflows/scan-codeql.yaml@master
with:
dotnet-version: "9.0.*"
dotnet-version: "10.0.*"
repository-name: Kevinjil/Jellyfin.Xtream
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
call:
uses: jellyfin/jellyfin-meta-plugins/.github/workflows/test.yaml@master
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
2 changes: 2 additions & 0 deletions Jellyfin.Xtream/CatchupChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ private async Task<ChannelItemResult> GetStreams(int categoryId, int channelId,
new()
{
ContentType = ChannelMediaContentType.TvExtra,
DateModified = StreamService.MediaSourceRevision,
Id = StreamService.ToGuid(StreamService.CatchupStreamPrefix, channelId, 0, day).ToString(),
IsLiveStream = false,
MediaSources = [
Expand Down Expand Up @@ -226,6 +227,7 @@ private async Task<ChannelItemResult> GetStreams(int categoryId, int channelId,
{
ContentType = ChannelMediaContentType.TvExtra,
DateCreated = epg.Start,
DateModified = StreamService.MediaSourceRevision,
Id = StreamService.ToGuid(StreamService.CatchupStreamPrefix, channel.StreamId, epg.Id, day).ToString(),
IsLiveStream = false,
MediaSources = sources,
Expand Down
6 changes: 3 additions & 3 deletions Jellyfin.Xtream/Jellyfin.Xtream.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>Jellyfin.Xtream</RootNamespace>
<AssemblyVersion>0.8.1.0</AssemblyVersion>
<FileVersion>0.8.1.0</FileVersion>
Expand All @@ -13,8 +13,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Jellyfin.Controller" Version="10.11.0" />
<PackageReference Include="Jellyfin.Model" Version="10.11.0" />
<PackageReference Include="Jellyfin.Controller" Version="12.0.0" />
<PackageReference Include="Jellyfin.Model" Version="12.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions Jellyfin.Xtream/SeriesChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ private ChannelItemInfo CreateChannelItemInfo(SeriesStreamInfo series, Season? s
{
ContentType = ChannelMediaContentType.Episode,
DateCreated = episode.Added,
DateModified = StreamService.MediaSourceRevision,
Genres = GetGenres(serie.Genre),
Id = StreamService.ToGuid(StreamService.EpisodePrefix, 0, 0, episode.EpisodeId).ToString(),
IndexNumber = episode.EpisodeNum,
Expand Down
11 changes: 10 additions & 1 deletion Jellyfin.Xtream/Service/StreamService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ public partial class StreamService(IXtreamClient xtreamClient)
/// </summary>
public const int EpgPrefix = 0x5d774c3f;

/// <summary>
/// The time the media sources of channel items last changed shape.
/// Jellyfin only rewrites the sources it saved for a channel item when the item changes,
/// so channel media items carry this as their modification date.
/// </summary>
public static readonly DateTime MediaSourceRevision = new(2026, 9, 28, 0, 0, 0, DateTimeKind.Utc);

private static readonly Regex _tagRegex = TagRegex();

/// <summary>
Expand Down Expand Up @@ -399,7 +406,9 @@ public MediaSourceInfo GetMediaSourceInfo(
{
Container = extension,
EncoderProtocol = MediaProtocol.Http,
Id = ToGuid(MediaSourcePrefix, (int)type, id, 0).ToString(),
// Jellyfin gives a channel source without an id the id of its item, which it requires since 12.0.
// Live TV keeps its own id, which identifies the restream to share.
Id = isLive ? ToGuid(MediaSourcePrefix, (int)type, id, 0).ToString() : null,
IsInfiniteStream = isLive,
IsRemote = true,
MediaStreams =
Expand Down
1 change: 1 addition & 0 deletions Jellyfin.Xtream/VodChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ private Task<ChannelItemInfo> CreateChannelItemInfo(StreamInfo stream)
{
ContentType = ChannelMediaContentType.Movie,
DateCreated = DateTimeOffset.FromUnixTimeSeconds(added).DateTime,
DateModified = StreamService.MediaSourceRevision,
Id = $"{StreamService.StreamPrefix}{stream.StreamId}",
ImageUrl = stream.StreamIcon,
IsLiveStream = false,
Expand Down
4 changes: 2 additions & 2 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name: "Jellyfin Xtream"
guid: "5d774c35-8567-46d3-a950-9bb8227a0c5d"
version: "0.8.1.0"
targetAbi: "10.11.0.0"
framework: "net9.0"
targetAbi: "12.0.0.0"
framework: "net10.0"
overview: "Stream content from an Xtream-compatible server."
description: >
Stream Live IPTV, Video On-Demand, and Series from an Xtream-compatible server using this plugin.
Expand Down
2 changes: 2 additions & 0 deletions jellyfin.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
<Rule Id="CA1308" Action="None" />
<!-- disable warning CA1848: Use the LoggerMessage delegates -->
<Rule Id="CA1848" Action="None" />
<!-- disable warning CA1873: Avoid potentially expensive logging -->
<Rule Id="CA1873" Action="Info" />
<!-- disable warning CA2101: Specify marshaling for P/Invoke string arguments -->
<Rule Id="CA2101" Action="None" />
<!-- disable warning CA2234: Pass System.Uri objects instead of strings -->
Expand Down