INTERACT FORUM

More => Old Versions => JRiver Media Center 25 for Windows => Topic started by: Mans on November 17, 2019, 10:14:41 am

Title: Album Rip - lately varies of data [Date Imported] field
Post by: Mans on November 17, 2019, 10:14:41 am
Great day all, Glynor,

Hoping all fine,

Glynor, i could need some advice, this concerning your following feedback:
Quote
Instructions
You need to add 3 new fields to MC, via the Library Fields Manager.

1. [Date Imported (Editable)] - this is an editable version of [date Imported]. It will remain blank unless manually modified.

set the following:
Field Type: User data
Data Type: Date

2. [Date Added (raw sortable)] -
This will spit out "raw" dates meaningless to a human when displayed in a column, but you CAN sort using them. By default it will show the raw date form of [Date Imported] unless you modify [Date Importable(editable)], in which case it will return the modified value.

  Set the following:
Field Type: Calculated data
Expression Code:
ConvertDate(FirstNotEmpty([Date Imported (Editable)],[Date Imported]))

3. [Date Added] - this is a 'display' only field to convert raw sortable date to a human friendly conventional appearance

 Set the following:
Field Type: Calculated data
Expression Code:
FormatDate([Date Added (raw sortable)], DateTime)

I'm using the above additional fields and did a perfect job till lately.
Guessing something is handled differently or something i changed is causing the following :-)

With all recent cd rips (within MC) I'm getting 'varies' as [Date Imported] data.
So those aren't helpfull on sort, as also the [Date Added (raw sortable)] field is affected, and needs everytime correction via the 'edit' field.
I've looked to the lib fields but I'm not able to select 'single value per album' on these.

Surely I'm missing something, would be great to have some pointer :-)

Thanks and cheers !
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: Mans on November 23, 2019, 05:13:40 am
Hi all, hi Glynor,

Any suggestion or help on this question,
Ripped today another batch and always getting varies values into the Date Imported field.
Which isn't convenient when sorting.
I don't know how or why it's a recent thing.

Thanks in advance,
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: Mans on November 25, 2019, 06:40:18 am
Gents, any help or clue on those 'varies' dates ?

Thanks !
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: RoderickGI on November 25, 2019, 04:24:10 pm
Post an image of a view showing all tracks in a recently ripped album, and showing all four fields above. i.e.

[Date Imported]
[Date Imported (Editable)]
[Date Added (raw sortable)]
[Date Added]

Make sure the example you pick is showing 'varies' for the [Date Imported], as per your question.
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: Mans on November 26, 2019, 01:59:36 am
Greatday RoderickGI,

Many thanks for your reaction,
I've attached you a print-screen of the album rip which I've just made.
Also trowing "varies" on the [Date Imported] field.

Thanks for your help,
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: Mans on November 26, 2019, 01:42:37 pm
Hi RoderickGI,

Just in case you might be looking for a second example,
Attached you can find another rip incl all varies on the Date Imported field.

If i can do some testing for you on this topic, let me know,

Thanks.
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: RoderickGI on November 26, 2019, 05:32:59 pm
Normal behaviour.

You will notice that unformatted dates are actually numerical values with a decimal fraction. The integer portion of the number is the Day, and the decimal fraction is the Time. When a group of files (such as an Album) is selected and the value of a field for each file does not match exactly, MC will show "Varies". So when files have a date which is the same Day, but a slightly different Time, MC will show "Varies".

I can understand what your special fields do. It looks like you are supposed to be entering a string to represent a date into the field [Date Imported (Editable)], but you aren't doing that in the first image you posted, and I can't see the full field names in the second but it looks like that field is empty. So your expressions are defaulting to using the [Date Imported] field, which includes the Time, and hence you are seeing "Varies".


What you could do is modify your expression for the [Date Added (raw sortable)] field, by trimming off the decimal value your [Date Imported] field, then format it as a Date again. The new expression for the [Date Added (raw sortable)] field would be;

FirstNotEmpty( ConvertDate([Date Imported (Editable)]), FormatDate(math(int([Date Imported,0])), Date) )


Or, if I was using this as a sorting field, I would want to see the date in the format YEAR-MONTH-DAY, so;

FirstNotEmpty( ConvertDate([Date Imported (Editable)]), FormatDate(math(int([Date Imported,0])), yyyy-MM-dd) )


As above, I suspect what changed recently was that you stopped entering values into the [Date Added (raw sortable)] field, which meant that your expressions defaulted to using the [Date Imported] field. If you started entering those values again, then all would work again, but the "Varies" problem would occur if you missed entering the data.

Also, as the [Date Added (raw sortable)] field can be formatted and still sort correctly, I think the overall solution could be simplified into two fields.
Also, as the [Date Imported (Editable)] is already set as a Date field, I don't know why the ConvertDate() function is included in the above expression. But I'm not going to create your solution just to check that out.

Maybe if there was a thread that discussed this solution originally, I may take a look. Do you have a link to such a thread? But using the above you should be able to figure out what you want to do.
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: Mans on November 27, 2019, 01:11:54 am
Many thanks RoderickGI,

That's some very detailed feedback :-)
Let me play around with this info.

Here's the link to the original topic, another thanks to Glynor,  which was also working perfect for me till recently:
https://yabb.jriver.com/interact/index.php?topic=97481.0

Thanks for the feedback,
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: RoderickGI on November 27, 2019, 05:29:46 am
I just had a look at that thread and realised that I misread what the ConvertDate() function does.

So you will need to adjust that expression I wrote above. This is for the [Date Added (raw sortable)] field. Something like:

FirstNotEmpty( ConvertDate([Date Imported (Editable)]), math(int([Date Imported,0])) )

Which will give you whole numbers for the output if the [Date Imported (Editable)] is used and is entered as a date with no time, and also if the [Date Imported,0] is used, as the time component is being trimmed off the Date and Time content of the raw [Date Imported] value.

I only did basic testing of the above, so try it out and see how you go.
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: Mans on November 27, 2019, 08:38:16 am
Another thanks RoderickGI !

I'll be testing this 'update' asap :-)
Looks like this expression is the solution.

Cheers !
Title: Re: Album Rip - lately varies of data [Date Imported] field
Post by: Mans on November 30, 2019, 07:08:01 am
Made several new rips today,
The updated expression does work perfect RoderickGI !

Another thanks,