INTERACT FORUM

Please login or register.

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

Author Topic: Finding duplicates (via [Name]) of files just imported (date imported)?  (Read 1362 times)

pa_perucci

  • Recent member
  • *
  • Posts: 5

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?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Finding duplicates (via [Name]) of files just imported (date imported)?
« Reply #1 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.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

pa_perucci

  • Recent member
  • *
  • Posts: 5
Re: Finding duplicates (via [Name]) of files just imported (date imported)?
« Reply #2 on: October 26, 2018, 09:24:26 pm »

Awesome!!!  I will play with that in the morning, and post findings...
Logged

pa_perucci

  • Recent member
  • *
  • Posts: 5
Re: Finding duplicates (via [Name]) of files just imported (date imported)?
« Reply #3 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), 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!
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Finding duplicates (via [Name]) of files just imported (date imported)?
« Reply #4 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)

You are now immortalised in the Wiki.  8)
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72448
  • Where did I put my teeth?
Re: Finding duplicates (via [Name]) of files just imported (date imported)?
« Reply #5 on: October 28, 2018, 01:17:22 am »

Thank you both.
Logged
Pages: [1]   Go Up