Skip to content

Commit

Permalink
Fixes id parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
brase committed Apr 14, 2020
1 parent 58abbc1 commit f4c6df9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Server/Smapi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module Smapi =
None

let (|MediaMetadataId|_|) str =
let idPattern = "([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})___(\\d+)"
let idPattern = "([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})___([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})"
let m = Regex.Match(str, idPattern)
if(m.Success) then Some ((System.Guid.Parse(m.Groups.[1].Value)), System.Guid.Parse(m.Groups.[2].Value)) else None

Expand Down

0 comments on commit f4c6df9

Please sign in to comment.