From c8284bf5233c71d76300d1fb73d9eff8e87c8342 Mon Sep 17 00:00:00 2001
From: TimGels <43609220+TimGels@users.noreply.github.com>
Date: Sat, 22 May 2021 16:52:34 +0200
Subject: [PATCH 1/2] Implemented workaround
Microsoft Graph returns application/octet-stream instead of video/x-matroska. This commit adds a workaround to keep the application working by reading out the filename to check if it end with .mkv.
---
OneDrive-Cloud-Player/Services/Helpers/CacheHelper.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/OneDrive-Cloud-Player/Services/Helpers/CacheHelper.cs b/OneDrive-Cloud-Player/Services/Helpers/CacheHelper.cs
index 51274c0..0e8b650 100644
--- a/OneDrive-Cloud-Player/Services/Helpers/CacheHelper.cs
+++ b/OneDrive-Cloud-Player/Services/Helpers/CacheHelper.cs
@@ -6,6 +6,7 @@
using OneDrive_Cloud_Player.Services.Utilities;
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -454,8 +455,9 @@ public CachedDriveItem ConvertGraphItem(DriveItem GraphItem)
return null;
}
+ //TODO: Remove the mkv extension workaround when Graph is fixed or a better solution is implemented.
// Check that files have the correct mimetype (either contains audio or video).
- if (GraphItem.File != null && !(GraphItem.File.MimeType.Contains("video") || GraphItem.File.MimeType.Contains("audio")))
+ if (GraphItem.File != null && !(GraphItem.File.MimeType.Contains("video") || GraphItem.File.MimeType.Contains("audio") || Path.GetExtension(GraphItem.Name).Equals(".mkv")))
{
return null;
}
From 5a0a43d0477a78157f28cf681c7b8e9cfac83daa Mon Sep 17 00:00:00 2001
From: TimGels <43609220+TimGels@users.noreply.github.com>
Date: Sat, 22 May 2021 17:00:54 +0200
Subject: [PATCH 2/2] Bumped version number
---
OneDrive-Cloud-Player/Package.appxmanifest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OneDrive-Cloud-Player/Package.appxmanifest b/OneDrive-Cloud-Player/Package.appxmanifest
index 0a335eb..3532abd 100644
--- a/OneDrive-Cloud-Player/Package.appxmanifest
+++ b/OneDrive-Cloud-Player/Package.appxmanifest
@@ -9,7 +9,7 @@
+ Version="1.2.1.0" />