INTERACT FORUM

More => Old Versions => JRiver Media Center 24 for Windows => Topic started by: pa_perucci on October 26, 2018, 06:46:22 pm

Title: Finding duplicates (via [Name]) of files just imported (date imported)?
Post by: pa_perucci on October 26, 2018, 06:46:22 pm
Is there a way to A) start with files I just imported and B) find all files with the same [Name]?

I have a smart playlist that finds dups (just ~dup=[Name]), but I want to limit what is returned to names of files I just imported (based on date imported).

I've looked at the documentation for views, expressions, search and playlists, but I just don't see how to do the above.

For example, I might import 100 files, but I'd like, for those 100 files, to see where I have duplicates based on [Name].  It seems like I should be able to base a smart playlist on another playlist (sort of like an SQL WHERE IN (SELECT [Name] FROM my_latest_import_smartlist)), but I'm "befuddled" on how to do it.  I'm a programmer, so I've looked through the expression language, but I don't see how to base 1 playlist on another.  Perhaps I'm not thinking "JRiver" yet?
Title: Re: Finding duplicates (via [Name]) of files just imported (date imported)?
Post by: RoderickGI on October 26, 2018, 09:03:16 pm
Do it all in one Smartlist. No need to reference one Playlist from another. Use the "Expand" function. Some ideas below.

The simplest way to see how this could be done is to find the standard Smartlist called "Audio--Task--Possible duplicates", copy that so that you don't edit the standard Smartlist, then edit it and add a rule about [Date Imported].

The original Smartlist had the parameters of:
[Media Type]=[audio] ~dup=[Artist],[Name] ~sort=[Name],[Artist]

I restricted the duplications to just Name, and added a Stock Rule to restrict the results to just the last 60 days, which gave me some data to work with in the test Library I am using. You would naturally use 1 day, or whatever date range you want. Just be aware that the [Date Imported] field actually contains the Date and Time down to seconds, so in order to compare actual dates you will probably need a Custom Rule to format the [Date Imported] before comparison.

[Media Type]=[audio] [Date Imported]=<60d ~dup=[Name] ~sort=[Name],[Date Imported]

See the first image to see the parameters and the results, which shows 20 files.

That won't restrict the date to a specific day, but you can easily sort the Smartlist by Name then Date Imported. Basically that just adds to your simple ~dup=[Name] parameters.

Then I added the Expand function to the Modify Results section.

[Media Type]=[audio] [Date Imported]=<60d ~dup=[Name] ~expand=Name ~sort=[Name],[Date Imported]

See the second image to see the parameters and the results, which shows 47 files, including results earlier than 60 days ago.



To see the expression used in a Smartlist in the above form, just open the Edit dialogue and then click the "Import / Export" button.


That should give you enough information to apply the same principles to other media types or other data ranges.
Title: Re: Finding duplicates (via [Name]) of files just imported (date imported)?
Post by: pa_perucci on October 26, 2018, 09:24:26 pm
Awesome!!!  I will play with that in the morning, and post findings...
Title: Re: Finding duplicates (via [Name]) of files just imported (date imported)?
Post by: pa_perucci on October 27, 2018, 06:19:19 am
OK, I used your incredible input above, and created the following example that did *exactly* what I wanted!  :)
I wrote it in a way that the "Expand" section in the Wiki might benefit (an example at https://wiki.jriver.com/index.php/Creating_Advanced_Media_Views_Using_the_Expand_Search_Modifier (https://wiki.jriver.com/index.php/Creating_Advanced_Media_Views_Using_the_Expand_Search_Modifier)), but I post it here first in case I missed something.  Thanks again!!!

Potential example for updating Wiki link above follows...
============================================


This example is based on JRiver Media Center 24.

First, locate smartlist "Audio -- Recently Imported -- Imported this week".
Right-click on it, and select "Edit Smartlist..."
Click on "Import / Export" button, and copy the Smarlist rules data to your clipboard: [Media Type]=[audio] [Date Imported]=<7d ~sort=[Date Imported]-d
Continue clicking cancel until you exit the Smartlist

Now, create a new Smartlist (I'll call this "AAA - Import Dupes").
Click on "Import / Export" button.
Replace the Smartlist rules data with what was obtained above: [Media Type]=[audio] [Date Imported]=<7d ~sort=[Date Imported]-d
Modify the Smartlist rule to the following (so that it sorts by name, not date imported): [Media Type]=[audio] [Date Imported]=<7d ~sort=[Name]
Click on OK until you view the results.
I suggest adding a column for "Date Imported" in the view (right-click on the column headers in the view to update view)

Now, for the "magic" of "~expand"!
Update the Smartlist, and (via "Import / Export"), change the rules data to this: [Media Type]=[audio] [Date Imported]=<7d ~expand=Name ~sort=[Name]
Click on OK until you view the results.
You should now see all tracks in your library with names matching your recently imported tracks.  Awesome, right!
Title: Re: Finding duplicates (via [Name]) of files just imported (date imported)?
Post by: RoderickGI on October 27, 2018, 05:05:38 pm
I wrote it in a way that the "Expand" section in the Wiki might benefit (an example at https://wiki.jriver.com/index.php/Creating_Advanced_Media_Views_Using_the_Expand_Search_Modifier (https://wiki.jriver.com/index.php/Creating_Advanced_Media_Views_Using_the_Expand_Search_Modifier))

You are now immortalised in the Wiki.  8)
Title: Re: Finding duplicates (via [Name]) of files just imported (date imported)?
Post by: JimH on October 28, 2018, 01:17:22 am
Thank you both.