Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better date format #13

Merged
merged 4 commits into from
Jun 4, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
shows date in title
  • Loading branch information
brase committed Jun 3, 2020
commit 129c465fffee3facdccff67a7dfc2249e75c8af6
3 changes: 2 additions & 1 deletion src/Server/Smapi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,14 @@ module Smapi =
|> List.pick (fun p -> if (p.Name = pname) then Some p else None)

let getEpisodesOfFeed eventStore id =
let yymmdd1 (date:System.DateTime) = date.ToString("yy.MM.dd")
let result = getEpisodesOfFeedComposition eventStore (string id)
match result with
| Success (episodes) -> episodes
|> List.sortByDescending (fun e -> e.ReleaseDate)
|> List.map (fun e -> MediaMetadata { Id = sprintf "%A___%A" e.FeedId e.Id
ItemType = Track
Title = e.Title
Title = sprintf "%s (%s)" e.Title (yymmdd1 e.ReleaseDate)
MimeType = "audio/mp3"
ItemMetadata = TrackMetadata { Artist = "Artist"
Duration = e.Length
Expand Down