• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Companion Batch-Import: update matching files only
#1
Lightbulb 
Hi, 

I only just found out, that Companion is also available for Mac now, awesome!

I have a question regarding the Batch-Import option: "update songs if matching files are found".
This option only updates songs if files exist with the exact same name, correct?

Would it be possible to add further configuration
1. add some regex patterns or number of (consecutive) characters that may differ?
2. only update existing songs, dont add new ones?

My use case:

I upload sheet music to a folder, shared among my band mates.
Whenever I update a song, i recreate the pdf files and increment a version string e.g. "Title - Instrument.v8.pdf" -> "Title - Instrument.v9.pdf" (allowing difference of 1 character or even better difference within regex e.g. /v[0-9]*/ would suffice.
If a band member wants to fetch the latest updates, it would be super comfortable for them, to just refer to that shared folder with the companion app.
update only files that match (except for version string) and be done with it.

Yours,

Mathias
Reply
#2
(05-12-2025, 10:18 PM)Heavy-matill Wrote: Hi, 

I only just found out, that Companion is also available for Mac now, awesome!

I have a question regarding the Batch-Import option: "update songs if matching files are found".
This option only updates songs if files exist with the exact same name, correct?

Would it be possible to add further configuration
1. add some regex patterns or number of (consecutive) characters that may differ?
2. only update existing songs, dont add new ones?

My use case:

I upload sheet music to a folder, shared among my band mates.
Whenever I update a song, i recreate the pdf files and increment a version string e.g. "Title - Instrument.v8.pdf" -> "Title - Instrument.v9.pdf" (allowing difference of 1 character or even better difference within regex e.g. /v[0-9]*/ would suffice.
If a band member wants to fetch the latest updates, it would be super comfortable for them, to just refer to that shared folder with the companion app.
update only files that match (except for version string) and be done with it.

Yours,

Mathias


It's going to look like a hellish machine Wink 

The best thing, if we want to have versionning control, is to offer to ignore the information in brackets [...].
That way, everyone can do what they think is useful with this option; it would be ignored in the file name...

But it has to be optional, right now, we have lots of files including brackets...

AND, I gave up on dealing with versioning, there is always a member of the group who confuses. It is simpler to say "you update songs or the setlist before all meeting"
Reply
#3
Yes, it matches on filenames (more specifically, it determines where the file would be copied into the storage location, and if a file already exists there, it then updates the song using that file). 

Trying to have a way of ignoring either a certain number of different characters or part of the name using a regex would be very slow. That means I can't just look to see if the file already exists in the output - I have to either scan through every file in the entire storage location and compare them to the current filename using the new rules (some users have 50000+ files, and I'd have to check every file being imported against every file in the storage location), or I'd have to come up with some complicated query on the database, but there is no query I'm aware of that can find a string value that only differs by a certain amount. So I'm not thrilled about the idea of trying to support this. It's also even worse trying to do it from the companion app which doesn't have access to the connected device's file system. So I can't just scan through all the files. I'd have to scan through all the cached database information about the files and try to determine it that way. If that approach winds up being sufficient, then the processing time might not be that horrible, but I'd have to run some tests to see.

Mike
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2025 MyBB Group.