INTERACT FORUM

Please login or register.

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

Author Topic: Duplicate file idea...  (Read 3304 times)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41950
  • Shoes gone again!
Duplicate file idea...
« on: May 30, 2017, 12:54:33 pm »

Hi everyone,

We're still thinking about duplicate files a little bit for MC23.

I think the most common way duplicates can happen is if you have a mapped network drive (let's say S:\) that points to a network path (let's say \\Linux\pc\).  When you're setup this way, you can just happily import from both S:\ and \\Linux\pc and MC will just see two files.

So one approach to fix that would be to ask Windows to expand the path at import time.  This way if you imported from S:\, it would just get automatically expanded to \\Linux\pc.  This would totally solve the duplicate problem.

However, it has an icky effect that if you had a library built around the S:\ drive, it's going to import a new second copy of everything.  We haven't really figured out a way around this.

Are we on the right track with any of this?  Any ideas or suggestions to make it even better?

Thanks.
Logged
Matt Ashland, JRiver Media Center

DJLegba

  • Citizen of the Universe
  • *****
  • Posts: 992
Re: Duplicate file idea...
« Reply #1 on: May 30, 2017, 01:26:32 pm »

Duplicate album detection should be easy enough just by looking at the number of tracks and their lengths.
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: Duplicate file idea...
« Reply #2 on: May 30, 2017, 03:13:49 pm »

Or do a cryptographic hash on the contents..

Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8943
Re: Duplicate file idea...
« Reply #3 on: May 30, 2017, 03:40:43 pm »

Will this have any effect on client MCs?

I'm thinking...

Our HTPC connects, gets the library from the server.
I cannot remember exactly what it's called, but the option to 'play local file if it exists' is checked.
The entire library is reachable locally by way of network shares. If the HTPC expands those paths, it will surely break the "play local file" option?

-marko

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10715
Re: Duplicate file idea...
« Reply #4 on: May 30, 2017, 04:23:15 pm »

So one approach to fix that would be to ask Windows to expand the path at import time.  This way if you imported from S:\, it would just get automatically expanded to \\Linux\pc.  This would totally solve the duplicate problem.

I would prefer my files to be imported on the same path I told MC to look for them, and not to do anything weird to them. IMHO software should behave on the principle of "least surprise", and it changing the path under me would be rather surprising. :)

A drive may not be the same everywhere - for example, in my setup: My "S:\" drive (really Z:\ for me) is a locally mapped drive on the server (using the handy "subst" command), while on the clients its a mapped network drive - that way the server can avoid to go through the network stack to read files, and only the clients will do that.

Another thing, at one point in time, I rebuild my server that MC was running on, so for migration purposes both old and new were running at the same time - I could just change the mapped drive to point to the new server, and everything worked out of the box. With this, I would have to fix every single library entry.
Logged
~ nevcairiel
~ Author of LAV Filters

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Duplicate file idea...
« Reply #5 on: June 06, 2017, 04:31:39 pm »

My concern with Windows is the lingering legacy issues with long file names. I use UNC paths for everything when the data is on the network. The only time I fall back to a mapped drive is when I start running in to long file name issues in Windows (and this happens even with Windows 10) and the \\servername\mappedfolder\ bit adds just a bit too much length to the name but z:\ works. This is not an issue with my media files, but it is with some types of data.

I like the idea of some way to identify identical files from a hashing function to find truly identical items.
Logged

Castius

  • Citizen of the Universe
  • *****
  • Posts: 562
Re: Duplicate file idea...
« Reply #6 on: June 06, 2017, 08:13:19 pm »

I don't want MC to change paths. I use network paths to hide away the full path.
So i can manage my drive however way i want.
Logged

larryrup

  • World Citizen
  • ***
  • Posts: 190
Re: Duplicate file idea...
« Reply #7 on: June 07, 2017, 03:08:09 pm »

I have been hit with the exact duplicate scenario you reference from time to time, usually when I'm fooling around or moving stuff around.  I have two PC's with MC installed and I often keep trying to use the one hard drive of music for both, primarily so metadata clean up  can be done once and play counts from both PC's count as one unified play count.  I have more trouble trying to accomplish this (many try's at this, but I cannot remember exactly what the problems were...likely win 10 short comings) then removing inadvertent duplicates.  After a while I figured out that a simple column add of the "path", a quick sort and a easy delete of the dup path as an easy fix.  This might be so obvious to a new user.  Why in the hell are sharing and home groups (and to mention start and search) such windows short comings?
Logged
Larry
HTPC, , JRiver.  Music Source:Network share drive.  Speakers:B&W P6, AMP:Yaqin 100b, DAC:BiFrost Uber, Headphones:Audeze LCD2, Sens HD600, AT W5000, Headphone Amps:XCAN v8, Woo Fireflies, Original EarMax.

Bccc1

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Duplicate file idea...
« Reply #8 on: June 08, 2017, 07:33:50 pm »

I like the idea, but would prefer the following:

Do the expansion only to check for duplicates and import with original path. For that to work the library paths also would have to be expanded at compare time. I'm not sure how to do that fast enough.
I would like a dialog if the imported file after path expansion seems to be a duplicate. Let me choose if I want to skip those those files or import them with the non expanded path. Default should be skip. Also add a checkbox to not ask again for a) this import or b) in general.
Logged
Pages: [1]   Go Up