Skip to content

Commit

Permalink
Merge pull request #56 from TimGels/implement-workaround-mkv
Browse files Browse the repository at this point in the history
Implement workaround for mkv files not showing
  • Loading branch information
TimGels authored May 22, 2021
2 parents 2361575 + 5a0a43d commit f946b86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OneDrive-Cloud-Player/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity
Name="22674TimGels.OneDriveCloudPlayer"
Publisher="CN=3095B4D2-D597-43C2-BFA6-AC26DB73293D"
Version="1.2.0.0" />
Version="1.2.1.0" />

<mp:PhoneIdentity PhoneProductId="329101d2-9ad1-4065-a890-d72be5ed3714" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
4 changes: 3 additions & 1 deletion OneDrive-Cloud-Player/Services/Helpers/CacheHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit f946b86

Please sign in to comment.