• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rename file used in multiple songs
#1
I am currently in the process of trying to synchronise my library on to a Chromebook.  Some of my songs are not synchronising correctly because of a problem with the file - I suspect that the filename is too long (about 50 characters plus some long folder name in front).

So I decided I would go on to my Android tablet and rename the file in the song to something shorter. That would be easy, but I have about 40 songs in my library all referring to different pages in the file (technical exercises for brass). When I rename the filename in one song, it doesn't update the other songs using the same file, and instead creates a copy of the file on the tablet. 

I'm not sure the best way to proceed from here
- go into every song and update the filename, use the same name, and hopefully it just repoints that song at the same file?
- rename the file in Android Files programme and hopefully MSP will pick it up?
- Delete all these songs and start again?

Any advice appreciated

David
Reply
#2
Make sure you have a current backup of your database.
Get Sciurius' MSPro Tools from https://github.com/sciurius/MSPro-Tools (requires a PERL environment)
Use get_meta.pl to export your database to a JSON file
Load the JSON file into a text editor, change filename(s) as required via search & replace
Use upd_meta.pl to reimport the JSON file into your database
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#3
That is one scenario that I didn't account for. Renaming a file shared by multiple songs is currently an issue. Is the right behavior to update every song in the entire library that uses the same file to use the new name? Given that all libraries share the same storage location, I'd also have to handle songs outside the current library as well, adding even more complexity. Or are there some scenarios where a user might want to rename the file for one song but leave the other songs with the other name? I just want to hear some thoughts on this before proceeding with any changes. 

Given the current limitations, the advice by itsme is probably the best way to go. The problem is that, MobileSheets won't currently let you rename a file to match the name of an existing file in the library, so you will have no way of fixing your other songs to use the new name. If you rename the file outside MobileSheets, MobileSheets is not going to find the file (it's not going to know that the file was renamed). If deleting and reimporting is not a big deal, then that would certainly work.

Mike
Reply
#4
Thanks Mike.  I looked at itmse's advice, and decided that for my use case I'd go with delete and re-import / re-create over a period of time. 

We're probably talking about an edge case here, especially when you're thinking about other libraries sharing the same storage location, but for what it's worth my thoughts are:
- I would probably want to rename a file for all songs sharing the same underlying file.  You're saying I have a file, I don't like the name, but I want to keep the file.  That logic probably applies to all songs using that file. It would seem a strange situation where the same pages / parts of pages in a different file match the original one, so generally everything would swap.
- Agree this would cause an issue with files shared by multiple libraries.  Thoughts
  1. Keep a track at file level on how many libraries refer to that file.  Requires a separate database / file shared by all libraries. Then if you're doing something to a file shared by other libraries, you can warn the user (how does this work for a normal rename on a single song file? Do you do this already?)
  2. After executing a rename, you could store details of the rename in that same shared database/file. When a user opens a different library, the program can check that file for any renames, and do the same rename update in the recently opened library

David

p.s. very happy that i've now managed to load MobileSheets on to my son's old Chromebook 2 in 1.  That's what prompted this query. It is a bit bulky but can fold round to act like a super large tablet
Reply




Users browsing this thread:
2 Guest(s)


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