Posts: 1,902
Threads: 296
Joined: Sep 2014
Reputation:
33
04-06-2020, 07:31 AM
(This post was last modified: 05-20-2020, 02:38 PM by itsme.)
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
Posts: 13,522
Threads: 302
Joined: Apr 2012
Reputation:
240
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.
Mike
Posts: 1,902
Threads: 296
Joined: Sep 2014
Reputation:
33
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.
Posts: 13,522
Threads: 302
Joined: Apr 2012
Reputation:
240
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.
Mike
Posts: 1,902
Threads: 296
Joined: Sep 2014
Reputation:
33
Thanks Mike. No hurry. Let me know if you need more details.
Posts: 1,902
Threads: 296
Joined: Sep 2014
Reputation:
33
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).
Posts: 13,522
Threads: 302
Joined: Apr 2012
Reputation:
240
04-16-2020, 04:54 PM
(This post was last modified: 04-16-2020, 04:54 PM by Zubersoft.)
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,
Mike
Posts: 1,902
Threads: 296
Joined: Sep 2014
Reputation:
33
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.
Posts: 13,522
Threads: 302
Joined: Apr 2012
Reputation:
240
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.
Mike
Posts: 1,902
Threads: 296
Joined: Sep 2014
Reputation:
33
OK that's fine, good to know.
No hurry, I'll wait patiently for the next Android version.
Posts: 1,902
Threads: 296
Joined: Sep 2014
Reputation:
33
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
Posts: 13,522
Threads: 302
Joined: Apr 2012
Reputation:
240
05-21-2020, 02:14 AM
(This post was last modified: 05-21-2020, 02:15 AM by Zubersoft.)
My pleasure - thanks for checking to ensure it all works.
Mike
|