MobileSheets Forums

Full Version: [fixed] CSV Import of audio files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to use CSV import to import audio files together with the songs of a fakebook. The keyword "audio files" exists so I assume it should be possible.

I'm pretty sure it has been already discussed in the forum, but cannot find it. Maybe someone can point me to the respective threads.

My questions are about
- absolute or relative paths
- forward / or backward \ slashes in paths
- how to add more than one audio file per song: is it enough to separate the files with | or is it required to enclose additionally the file names in quotes
Either absolute or relative paths should work. If relative paths are used, they should be relative to the location of the CSV file. I'm not currently handling either / or \. Android will expect forward slashes. Windows expects backward slashes, but you might be able to get away with forward slashes, as that sometimes works with Windows paths (I have not tested that). I will write up an issue in my bug tracker to fix the code so it can handle either forward or backward slashes for relative paths (there is no way to make absolute paths work on both operating systems). To add multiple values, just separate them with |. That is all that you should need to do.

There seems to be an issue with CSV import of audio files, at least on Win10. I sent you an e-mail and shared a folder with example files.
For anyone that references this post, I had forgotten about the file access restrictions in the Windows 10 version of MobileSheets. The Windows 10 version of MobileSheets cannot access files outside of the storage location unless the user explicitly picks it with Microsoft's file chooser. This means that the audio files referenced in a csv file cannot be accessed unless they happen to be in the storage location. So users who need to utilize this functionality need to make sure all of the files reside under the storage location before importing. 

itsme - I'm still investigating things based on your last email, so I'll post the results here once I know more.

Thanks Mike. No hurry. Let me know if you need more details.
I did some more tests. The only situation where it seems to work is on Android with the audio file in the same folder as .CSV and .PDF.
On Win10:
If the column "audio files" contains just the filename, the song can be imported, but the audio file is not attached.
If the column "audio files" contains any kind of path (/ or \, relative or absolute) the SONG is not offered for import.

It would be great if it worked like that:
- path of the audio file relative to the .CSV and .PDF file
- accept subfolders, at least 1 level
- allow both / and \

Thus it would allow copying the database file between Android and Win10 machines as it is currently the case with the relative paths feature for PDF files (which are relative to the MSP folder).
I've fixed the audio file importing for version 2.9.4 which is now available. There are still restrictions in the Windows 10 version for accessing audio files. I display errors now if the audio files in the CSV can't be accessed. The next Android update will fix some issues in that version as well.

Thanks for the fix. It works fine now in MSP 2.9.4 on Win10.
In MSP 2.9.2 on Android folders are still not supported - a combination of .CSV, .PDF and a subfolder "Audio" containg MP3s that can be imported without problems on Win10 is not usable on Android.
I have not released the update for Android yet with the same kinds of fixes I made for Windows 10. If this is important for you, I can try to work on getting the update ready this week.

OK that's fine, good to know.
No hurry, I'll wait patiently for the next Android version.
It's fixed and also works great now in MSP 2.9.6 on Android.
Thanks to the usage of relative paths the database can be copied between Win10 and Android devices and keeps working.
(nothing new, just want to state that this is still true, when audio files are involved)
Thank you Mike
My pleasure - thanks for checking to ensure it all works.