INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: relational artist field corrupted by handheld device sync  (Read 1561 times)

comox

  • Galactic Citizen
  • ****
  • Posts: 428
relational artist field corrupted by handheld device sync
« on: March 24, 2021, 12:18:40 am »

27.0.66

I've stumbled on a nasty problem that is causing me a lot of grief.

I have a relational user field that stores one value for each artist named "Artist Rating" with data type integer and edit type 5 stars.

I've used this field for many years in a simple manner. If it was set equal to 5 stars it meant the artist is a favorite. If it was null it meant the artist was not a favorite.

This simple usage was bulletproof and never caused me any problems.

A few months ago I started using all 5 possible values of Artist Rating. For example, 3 means I want to add more content for the artist, 4 means I've got all the content I want for the artist, and 5 means I've got all the content the artist has produced.

Every once in a while, all artists with Artist Rating equal to 1, 2, 3 or 4 would suddenly change to 5. Artists with Artist Rating equal to 5 would remain 5. Artists with no Artist Rating would remain with no Artist Rating.

This is a big problem because it means I can't trust the database to maintain an important piece of information and I've had to start making notes external to MC to not lose the information.

Today I figured out what is causing this corruption of Artist Rating data.

It occurs every time I synchronize a handheld device. The configuration of my handheld device is fairly complex, but it hasn't changed for many years, has always worked reliably, and does not make use of the Artist Rating field.

So the question is, why does synchronizing a handheld device cause data in Artist Rating to change in a strange manner:
   - null remains null
   - 1,2,3,4 changes to 5
   - 5 remains 5

Any suggestions for a work around would be appreciated.
Logged

comox

  • Galactic Citizen
  • ****
  • Posts: 428
Re: relational artist field corrupted by handheld device sync
« Reply #1 on: March 24, 2021, 12:50:07 am »

I think I have discovered a better insight into what's going on.

It seems the value of Artist Rating on the handheld device is being copied back into the MC library during a sync.

This explains why 1,2,3,4 are changed to 5.  5 is the value for favorite artists on the handheld device. 1,2,3,4 are the new values for favorite artists in the MC library and are overwritten by the handheld device values.

Null remains null because it is the same in both the MC library and handheld device.

I see there is an option called "Rebuild Database" for handheld devices. I can't find a description. Does anyone know what Rebuild Database does? Could this fix my problem?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72437
  • Where did I put my teeth?
Re: relational artist field corrupted by handheld device sync
« Reply #2 on: March 24, 2021, 07:09:03 am »

Please describe the conversion you're using (to MP3, for example) when you sync.

Stacks?

If you're converting, there are two files involved.  The cache may preserve an older file.
Logged

comox

  • Galactic Citizen
  • ****
  • Posts: 428
Re: relational artist field corrupted by handheld device sync
« Reply #3 on: March 24, 2021, 10:31:58 am »

No stacks.
No conversion for any file types.
Logged

comox

  • Galactic Citizen
  • ****
  • Posts: 428
Re: relational artist field corrupted by handheld device sync
« Reply #4 on: March 25, 2021, 11:09:51 pm »

I tried the "Rebuild Database" feature.

It caused all media to be resynced to my phone. This did reset Artist Rating to the correct values on the device, thereby stopping it from being change on subsequent syncs.

However the problem still exists because if I subsequently change an Artist Rating this new value is lost on the next sync.

These experiments are painful because I sync 150GB to my phone. Any suggestions would be appreciated.
Logged

comox

  • Galactic Citizen
  • ****
  • Posts: 428
Re: relational artist field corrupted by handheld device sync
« Reply #5 on: April 06, 2021, 11:41:26 am »

Problem still exists in 27.0.79.

I found a good workaround for this bug in case anyone else runs into it.

If you change the value of a relational field for a file(s) that has already been synced, then you must manually delete the file(s) from the synced destination before resyncing to ensure that the change is not reverted by the next sync.

In my case this means when I change the rating for an artist I must delete all occurrences of that artist from my sync destination before resyncing.
Logged
Pages: [1]   Go Up