Skip to content

Commit

Permalink
support multi-episode files
Browse files Browse the repository at this point in the history
  • Loading branch information
thepwrtank18 committed Nov 19, 2022
1 parent c75132a commit a7aab9f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion GetLink/Controllers/GetM3UController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,14 @@ public string GetM3U(string seriesId, string? authToken = null, string? username

foreach (var test2 in test.Items)
{
returnstring += $"\n#EXTINF:0,{test2.SeriesName}, S{Convert.ToInt32(test2.ParentIndexNumber).ToString().PadLeft(2, '0')}E{Convert.ToInt32(test2.IndexNumber).ToString().PadLeft(2, '0')}: {test2.Name}";
if (test2.IndexNumberEnd != null)
{
returnstring += $"\n#EXTINF:0,{test2.SeriesName}, S{Convert.ToInt32(test2.ParentIndexNumber).ToString().PadLeft(2, '0')}E{Convert.ToInt32(test2.IndexNumber).ToString().PadLeft(2, '0')}-{Convert.ToInt32(test2.IndexNumberEnd).ToString().PadLeft(2, '0')}: {test2.Name}";
}
else
{
returnstring += $"\n#EXTINF:0,{test2.SeriesName}, S{Convert.ToInt32(test2.ParentIndexNumber).ToString().PadLeft(2, '0')}E{Convert.ToInt32(test2.IndexNumber).ToString().PadLeft(2, '0')}: {test2.Name}";
}
returnstring += "\n" + Program.publicUrl + $"/Items/{test2.Id}/Download?api_key={authToken}";
}
}
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ Web server that creates M3U files for Jellyfin TV shows.
4. Type in `GetLink.exe --urls http://localhost:[port] --publicUrl [URL to Jellyfin instance]`
5. Test it out by getting a series ID from your web browser (ex: [...]/web/index.html#!/details?id=SERIESIDHERE00000000000000000000&context=tvshows&serverId=[...]), then open this in VLC: `http://localhost:[port]/GetM3U?seriesId=[series id]&username=[username]&password=[password]` OR `&authToken=[api key]` (if you put in both username, password, and auth token, the auth token takes priority)

## Supports
1 episode per listing: ✅
More than 1 episode per listing: ✅
Timestamps before episode is loaded: ❌

## Screenshots
![Screenshot of VLC, playing the first episode of Breaking Bad](Image0.png)
![Screenshot of VLC, showing most of the Breaking Bad episodes in a list](Image1.png)

0 comments on commit a7aab9f

Please sign in to comment.