You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, first off, many thanks for the effort you have put into creating this great library.
I'm currently working on an UWP app to get a list of all MP3s in a folder and for each of these show the various MP3 tags of the files. I'm using the folderPicker.PickSingleFolderAsync() method to select the chosen folder and query.GetFilesAsync() to store a list of the MP3 files in a StorageFile list.
Everytime TagLib.File.Create runs, I get an exception, 2147024891, Access to the path 'D:\DJ Music...' is denied. In my Package.appxmanifest, I've given my app, the full necessary permissions to access all folders.
if (folder != null)
{
mp3ids.Logging("In code to get list of MP3s in " + mp3ids.FolderPath, "high");
List<string> fileTypeFilter = new List<string>();
fileTypeFilter.Add(".mp3");
var queryOptions = new QueryOptions(CommonFileQuery.OrderByName, fileTypeFilter);
var query = folder.CreateFileQueryWithOptions(queryOptions);
mp3ids.fileList = await query.GetFilesAsync();
mp3ids.Logging("The count of MP3s in the folder is " + mp3ids.fileList.Count, "high");
foreach (StorageFile file in mp3ids.fileList)
{
mp3ids.Logging("File: " + file.Path, "high");
try
{
var tfile = TagLib.File.Create(file.Path, ReadStyle.Average);
FullListOfMP3s.Add(new ListOfMP3s { mp3filename = file.Name, mp3path = file.Path, mp3title = tfile.Tag.Title, mp3artist = tfile.Tag.Performers[0], mp3album = tfile.Tag.Album });
}
catch (UnauthorizedAccessException Ex)
{
mp3ids.Logging("Exception: " + Ex.Message, "high");
mp3ids.Logging("Exception HResult: " + Ex.HResult, "high");
}
}
}
Any suggestions on how to fix this? The exception is only thrown when I run taglib. Without taglib, I can access and read the files in the folders without any exception. When I publish and install the app on my desktop, I've also given it the necessary permissions to access file system but still the same result.
Thanks
Shane
The text was updated successfully, but these errors were encountered:
Hi all, first off, many thanks for the effort you have put into creating this great library.
I'm currently working on an UWP app to get a list of all MP3s in a folder and for each of these show the various MP3 tags of the files. I'm using the folderPicker.PickSingleFolderAsync() method to select the chosen folder and query.GetFilesAsync() to store a list of the MP3 files in a StorageFile list.
Everytime TagLib.File.Create runs, I get an exception, 2147024891, Access to the path 'D:\DJ Music...' is denied. In my Package.appxmanifest, I've given my app, the full necessary permissions to access all folders.
Here's my relevant code
Any suggestions on how to fix this? The exception is only thrown when I run taglib. Without taglib, I can access and read the files in the folders without any exception. When I publish and install the app on my desktop, I've also given it the necessary permissions to access file system but still the same result.
Thanks
Shane
The text was updated successfully, but these errors were encountered: