What happens if there is a filename collision on the device during sync?

Get answers about the current release of MediaMonkey for Android

Moderator: Gurus

Lowlander
Posts: 47578
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: What happens if there is a filename collision on the device during sync?

Post by Lowlander » Sat Jul 11, 2020 2:48 pm

You can uncheck, but as mentioned wifi sync prompts with a dialog on what to delete. Nothing will be deleted if you don't select anything to be deleted in that dialog.
Lowlander (MediaMonkey user since 2003)

pbpb
Posts: 30
Joined: Tue Jun 09, 2020 11:09 am

Re: What happens if there is a filename collision on the device during sync?

Post by pbpb » Sat Jul 11, 2020 3:22 pm

Ah, ok, thanks. I forgot about that, and about the fact that you mentioned that before. Only one brain cell left to remember things any more.

pbpb
Posts: 30
Joined: Tue Jun 09, 2020 11:09 am

Re: What happens if there is a filename collision on the device during sync?

Post by pbpb » Sat Jul 11, 2020 6:00 pm

Interim report. I did a dry run before tackling setting up debug logging. Since I failed to remember that you said "Setup a sync with just those five files and also their duplicate filename versions", I created a playlist with only the offending tracks, but of course the duplicates were already on the device in the desired directory. The result was that it copied the 5 files, but NOT to the parent directory, but rather to the desired location. This implies that using the playlist hack is not going to be informative.

Next, ran a "normal" sync for all music from server to device, which includes the previously offending files. Now, it wants to delete the playlist and the 5 tracks. I said ok. The result: As best I can tell it did not actually delete the tracks that were in the correct place, and ALSO now it did not put those (or any other) tracks into the parent directory. This implies it will now be forever a mystery as to what the original problem was, since now I can't reproduce it.

My guess is that there was some small error in the database that got fixed by using the playlist to sync. Of course, that's a totally random guess, since I have no clue what the code looks like.

It occurs to me that I could try this again with *all* the duplicate versions in the playlist, and see if anything new happens. I did that and it said it downloaded the playlist, but nothing changed. I also then went back to syncing everything, and it said it deleted the playlist, but nothing changed.

However, I now note that at least one of the previous offending files now has a filename that is the same as the filename on the server, but which does not conform to the naming I specified in the device configuration, and I don't believe that was the case before, when one of the files was ending up in the parent dir. Since I had "enforce use of sync mask" set, and "delete unselected" also set, that as best I understand it, should not happen.

It seems that things are rather messed up, and I'm thinking that the best way to proceed is to just do a clean install of mma, and start from scratch, since currently things seem to be fubar. I am currently syncing the library from scratch after a clean install (including deleting all mma data on the device as per http://www.mediamonkey.com/support/inde ... an-install ).

That takes many hours even with very fast wifi; will let you know what happens afterwards.

pbpb
Posts: 30
Joined: Tue Jun 09, 2020 11:09 am

Re: What happens if there is a filename collision on the device during sync?

Post by pbpb » Sun Jul 12, 2020 6:45 pm

Well, it seems that this has been a colossal waste of time. Sorry.
MMA sync is now so far behaving as expected, so nothing to look into any more.
Here is what I did:
* Reformatted the SD card, thus clobbering everything.
* Uninstalled MMA
* Deleted all MMA files from the device as mentioned in kb page I linked earlier.
* Reinstalled MMA with a clean install.
* Made sure I had all sync parameters set as I want on MMW, including enforcing mask, and deleting unselected.
* Ran a sync overnight.

Everything now works as expected, and files are not being put into wrong places.

I did notice, before doing all that, that there appeared to be various files that did not adhere to the mask, even though it had been set before to enforce and delete, in addition to files that for example had no tags that could be used to generate the filename (which is ok; presumably MM infers best it can from filename in that case.)

I also noticed before I started anew that renaming the collisions did not seem to be consistent, while afterwards it was perfectly consistent (in how the new name was formed).

So, I am going to surmise that somehow things were in a state where old filenames did not get updated, maybe in conjunction with some database corruption, possibly due to random accidental device 'clicks' that cancelled sync.

On that subject, I would suggest interposing a confirmation for cancel sync. My phone has a super sensitive screen, and due to the wraparound edge that for some reason samsung thinks is cool, it's almost impossible to pick up the phone without triggering something.

So, thanks for helping, but the cause of the weird behavior is going to unfortunately stay a mystery. The bright spot is I learned a lot more about how to work mma and mmw.

Post Reply