This commit is contained in:
Frank Skare
2019-06-25 05:14:58 +02:00
parent ba0141cfb1
commit 3d325d4fe5
8 changed files with 58 additions and 79 deletions

View File

@@ -46,9 +46,11 @@ namespace RatingAddon
void mpv_ClientMessage(string[] args)
{
int rating;
if (args == null ||
args.Length != 2 ||
args[0] != "rate-file" ||
!int.TryParse(args[1], out int rating))
if (args?.Length != 2 || args[0] != "rate-file" || ! int.TryParse(args[1], out rating))
return;
Dic[mp.get_property_string("path")] = rating;