INTERACT FORUM

Please login or register.

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

Author Topic: Tags not saved properly  (Read 3504 times)

Al ex

  • Citizen of the Universe
  • *****
  • Posts: 550
Tags not saved properly
« on: April 23, 2014, 02:47:00 am »

Hi,

I have an issue with tag saving:

I am changing the Album Year from 1991 to 1978 - it shows as "1978" as intended.
I click on "Update the library from tags, it automatically changes back the album year from 1978 to 1991.

I am using latest version .128 on Win 8.1
The file is located at my local hard disc.
The file is FLAC and it is NOT write-protected (checked with right click and "properties).

What can the problem be?

Thanks
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Tags not saved properly
« Reply #1 on: April 23, 2014, 04:56:20 am »

Can you check under Tools/Import, configure auto-import. Check if write tags to files is enabled.

When you change the date and right click the file, choose update tags from library. Do you get a warning popup? If you don't get a warning, what happens if you choose update library from tags after that? Does it still change it back?
Logged

Listener

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1084
Re: Tags not saved properly
« Reply #2 on: April 23, 2014, 01:39:44 pm »

Hi,

I have an issue with tag saving:

I am changing the Album Year from 1991 to 1978 - it shows as "1978" as intended.
I click on "Update the library from tags, it automatically changes back the album year from 1978 to 1991.

I am using latest version .128 on Win 8.1
The file is located at my local hard disc.
The file is FLAC and it is NOT write-protected (checked with right click and "properties).


Are you changing the album year value in MC?  If so, you need to use the "Update Tags (from library)" command to store the new value in the music files.

If you are changing the album year value outside MC, then the "Update the library (from tags)" command will update the library to reflect the new value in the music files.

Until you figure things out, you might turn off auto-import.
Logged

Al ex

  • Citizen of the Universe
  • *****
  • Posts: 550
Re: Tags not saved properly
« Reply #3 on: April 24, 2014, 08:16:07 am »

Can you check under Tools/Import, configure auto-import. Check if write tags to files is enabled.
It was NOT enabled (never touched it before). I enabled it now, but still the problem persists.

When you change the date and right click the file, choose update tags from library. Do you get a warning popup? If you don't get a warning, what happens if you choose update library from tags after that? Does it still change it back?

After "renaming" the year within MC:
upon clicking "Update Library from Tags" --> well, this is the problem: the year is changed back.

Again after "renaming" the year within MC:
upon clicking "Update Tags from Library" --> now the year stays with the new value!! Even if I then click on "Update Library from Tags" again, it is not changing back again.

?
This doesnt make sense to me. When I rename the year and look into the "Tags" action window, I can see the correct new YEARS tag. So clicking on "Update Library from Tags" should not change the tag, right?


EDIT - and something else I donīt understand: changing the rating will be permanent, also after clicking on "Update Library from Tags"
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Tags not saved properly
« Reply #4 on: April 24, 2014, 08:23:17 am »

If write tags to files is enabled, MC should write the tag to the file automatically. If this fails, you should get a popup saying there was a problem updating a file. If you didn't get that update, I suppose its not writing tags back to the file automatically, which is weird.

There might be one other possibility, but I'm not at my PC to check with MC.

Go into Tools/Options, there should be an option for MC's library with its fields. Lookup the Year field and see if there's a checkbox for writing that to file.

Year is a default field in MC so I think its read only, but I thought I'd mention it to make sure.

If you can't make it work, you can create a logfile. Open Help/Logging, make sure logging is enabled and reset the log. Redo the steps of Updating the field in MC, update library and go to Help/Logging again. Press the button to create the logfile. It will tell you where the file is saved. Attach it to a post as an attachment.
Logged

Al ex

  • Citizen of the Universe
  • *****
  • Posts: 550
Re: Tags not saved properly
« Reply #5 on: April 24, 2014, 08:39:47 am »

Well, if I see it correctly, the field value is not stored in the file tags. But I also cannot change this, as the whole area is greyed out. See attached screenshot...

Logged

rudyrednose

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 344
  • nothing more to say...
Re: Tags not saved properly
« Reply #6 on: April 24, 2014, 08:47:59 am »

After "renaming" the year within MC:
upon clicking "Update Library from Tags" --> well, this is the problem: the year is changed back.

Again after "renaming" the year within MC:
upon clicking "Update Tags from Library" --> now the year stays with the new value!! Even if I then click on "Update Library from Tags" again, it is not changing back again.

Regarding your original post, I do not think that you have a problem at all.  

The library (MC internal database, not the media files themselves) possess "tags" within its internal database, that is database field values.  Media files can possess internal "Tags".
- "Update Library from Tags" copies the media file "Tags" to the internal database "tags".
- "Update Tags from Library" copies the internal database "tags" to the media file "Tags".

When you change your album year, you change the database field.  If you immediately "Update Library from Tags" afterwards, you immediately overwrite the database field (that you just changed) with the value stored in the media file "Tag", hence the behaviour you observed.

Cheers,

'nose
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Tags not saved properly
« Reply #7 on: April 24, 2014, 10:16:18 am »

I see what is happening, I didn't realize this at first and couldn't check it when I was at work.

The field [Year] is the display name of Date (year), which is a calculated data field. These are not saved in tags.

Change the [Date] field instead. This will be written to the file immediately, it updates the Year field automatically and when you do an update library from tags, it won't come back with the old date.
Logged

Al ex

  • Citizen of the Universe
  • *****
  • Posts: 550
Re: Tags not saved properly
« Reply #8 on: April 24, 2014, 11:35:13 am »

When you change your album year, you change the database field.  If you immediately "Update Library from Tags" afterwards, you immediately overwrite the database field (that you just changed) with the value stored in the media file "Tag", hence the behaviour you observed.

Cheers,

'nose

Thanks, I think this also explains a lot.
As far I can see, there is a delay in synchronisation? Because it looks like if I donīt "Update library from tags", then the next day databases are synced automatically.
Logged

Al ex

  • Citizen of the Universe
  • *****
  • Posts: 550
Re: Tags not saved properly
« Reply #9 on: April 24, 2014, 11:39:32 am »

I see what is happening, I didn't realize this at first and couldn't check it when I was at work.

The field [Year] is the display name of Date (year), which is a calculated data field. These are not saved in tags.

Change the [Date] field instead. This will be written to the file immediately, it updates the Year field automatically and when you do an update library from tags, it won't come back with the old date.

OK thanks! Good to know!!
The only drawback is that I always need to open the TAG action window for this to make immediate changes (red rectangle). The more elegant way would be to just change the value in the library overview (green rectangle).

But as far as I understand from the previous mail - the database updates itself after a while anyway, so no need to click on "Update Library from Tags" (I usually do this after final tagging, before I move new files from my "Unworked"-folder to my "Archive"-folder...)

Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Tags not saved properly
« Reply #10 on: April 24, 2014, 12:03:17 pm »

You can right click a column and add [Date] and/or remove [Year].

I used to use the Year field instead of the Date field because Date often had some random day/month in it too, I just want the year for the release year of an album. Except I never checked the Year field so I didn't know it was a calculated field.

If you have a similar issue with Date, you can add the date field and type "=[Year]" in it (without the " quotes). This will copy the value of Year into the date field (and remove the day/month). Try it out in one field to test it. This will write the tags to the files immediately so be careful.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Tags not saved properly
« Reply #11 on: April 24, 2014, 12:59:32 pm »

I think [Year] is a little fancier than you're thinking...

I'm going by memory here, but I think it has two "modes":

1. If you set [Year] and [Date] is blank/undefined, it writes to [Date].
2. If you set [Year] and [Date] already has a defined value, then... Well, this happens.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Tags not saved properly
« Reply #12 on: April 24, 2014, 01:26:11 pm »

But as far as I understand from the previous mail - the database updates itself after a while anyway, so no need to click on "Update Library from Tags" (I usually do this after final tagging, before I move new files from my "Unworked"-folder to my "Archive"-folder...)

When you use MC to edit tags there is no need to choose Update Library from tags, because all that does is reread the tags from the files to update its internal database. If you want to make sure your changes are written to the files, choose update tags from library instead.

Normally, its not necessary to do that as MC does it automatically. MC will also detect changes to files and if it finds updated tags, it will automatically update the library as well (this can also be turned off under Tools/Options/General/Update tags when file info changes.

I think [Year] is a little fancier than you're thinking...

I'm going by memory here, but I think it has two "modes":

1. If you set [Year] and [Date] is blank/undefined, it writes to [Date].
2. If you set [Year] and [Date] already has a defined value, then... Well, this happens.

I noticed there is more to it but I don't know the details so I stuck to what I tested.

But for instance, when there's a full date in the date field, and you edit year with a another year, it changes the year in the date field accordingly, without erasing the day/month. I thought that was neat :).
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tags not saved properly
« Reply #13 on: April 24, 2014, 02:30:49 pm »

The Year calculated field uses the Date field for reading and writing.

FormatDate(), the expression you can see in the in the Year field's calculated data, defaults to acting on the Date field when no field is specified.  It is formatting Date as year-only value.

It is also magically writing the value when you tag Year, where expression fields are ordinarily read-only, to Date for you.  It will either add a year-only value, or update an existing Date's year component.

So, it is perfectly OK to read/write Year.
Logged
The opinions I express represent my own folly.

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Tags not saved properly
« Reply #14 on: April 24, 2014, 02:41:30 pm »

So, it is perfectly OK to read/write Year.

Yes, but when manually changing the Year field, tags are not being updated. So when you do an update library from tags, year reverts to its old value.

So it looks like MC is not updating tags when date is changed indirectly through year.

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tags not saved properly
« Reply #15 on: April 24, 2014, 02:55:21 pm »

This would be a bug.  It would seen updating Year is not causing the record to be put into the queue for auto-update.
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Tags not saved properly
« Reply #16 on: April 24, 2014, 10:47:28 pm »

This would be a bug.  It would seen updating Year is not causing the record to be put into the queue for auto-update.

Not marking it as dirty, probably.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Al ex

  • Citizen of the Universe
  • *****
  • Posts: 550
Re: Tags not saved properly
« Reply #17 on: April 25, 2014, 05:26:11 am »

Not marking it as dirty, probably.

OK, so today I checked the album again, and it has synced automatically. Finally.

From a user perspective, I would consider that as a bug, if it is not syncing instantly after triggering it.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10712
Re: Tags not saved properly
« Reply #18 on: April 25, 2014, 05:57:44 am »

I looked into the expressions that handle these fields, and for some reason they explicitly disabled the "dirty" flag when editing the field, so someone must've thought this made more sense at some point.

But if we all agree that it makes much more sense to write the Date tag even when editing the Year/Month/Day fields, then I can make it so.

Also to clear up how it works, the "Year" field is a pure calculated field based on the "Date" field. There is no other special magic involved. The expression to show it is "FormatDate(Year)&DataType=[Integer]", and when editing it sets the year of the Date tag while leaving the other date components untouched.
Logged
~ nevcairiel
~ Author of LAV Filters

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Tags not saved properly
« Reply #19 on: April 25, 2014, 06:51:02 am »

But if we all agree that it makes much more sense to write the Date tag even when editing the Year/Month/Day fields, then I can make it so.

It makes sense to me, but I can't shake the feeling we're missing something.
Logged

Al ex

  • Citizen of the Universe
  • *****
  • Posts: 550
Re: Tags not saved properly
« Reply #20 on: April 25, 2014, 07:34:55 am »

But if we all agree that it makes much more sense to write the Date tag even when editing the Year/Month/Day fields, then I can make it so.

Definitely agreeing, as from my user expectation I think it is confusing, if the data is not synced instantly and changed back...
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Tags not saved properly
« Reply #21 on: April 25, 2014, 08:25:13 am »

Definitely agreeing, as from my user expectation I think it is confusing, if the data is not synced instantly and changed back...

+1

I can't think of a circumstance where this would not be the desired effect.  The only possible gotcha I can think of is Carnac.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Tags not saved properly
« Reply #22 on: April 25, 2014, 11:48:34 am »

Seems like the right thing to me.

The exception might have been because if some external Tag had both Year and Date, there would be a race, and a later setting of Year (which might be different than the Tag's year value in Date) would obliterate the Date value set Date were read/set first.

Also to clear up how it works, the "Year" field is a pure calculated field based on the "Date" field. There is no other special magic involved. The expression to show it is "FormatDate(Year)&DataType=[Integer]", and when editing it sets the year of the Date tag while leaving the other date components untouched.

By magic, I meant that ordinarily, MC does not allow users to modify the value of an expression field.  In this case, it does.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up