INTERACT FORUM

Windows => Third Party Plug-ins, Programs, and Skins => Topic started by: jmone on March 03, 2016, 12:30:46 am

Title: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: jmone on March 03, 2016, 12:30:46 am
Last Updated: 03 MAR 16

Background:  MC has the Ability to check for "Missing Filenames" for items that are in the MC Library but not on the HDD.  Unfortunately the opposite is not easy to do (eg check what might be missing from the MC Library that is present on the HDD).  As an example, you can end up with "orphaned" files when using MC's delete function if you have selected "Remove from Media Library" when you really wanted either "Remove from Media Library & ..Delete / ...send to the Recycle Bin" options.... and they can be hard to find later.

MC Media Checker allows you to select a Folder and it will check each file under that folder (and all sub folders) to see if they exist in the MC Library.  Any items that do not exist will be written out to a TXT File called "FileList.txt" that you can then examine.

Notes, Limitations, Future Stuff:  
- There is no logic in this script, it just reads a file and checks if it is in MC so you can end up with a big list of sidecar files, coverart, and in the case of Blu-ray / DVD rips a whole list of subfiles that MC does not display even though the "Main" file exists
- Files that are in MC but have a different name than the file system will also be reported
- It does not handle some extended characters sets well, so keep an eye on your files.  I got some "false positives" due to some "non std" characters not matching well from MC and the File system
- At this stage this script does not change anything it either MC or the HDD.  I was thinking of adding a buttons like "Add all to MC" and "Delete all from HDD" but ..... best to check manually at this stage.
- I could also offer a "Filter" so that it only checked for particular extensions (eg MP3, FLAC etc) to help avoid finding stuff like valid sidecar files

Setting Up Media Server Access:  This script uses MC's Web Services (MCWS) to Import, Export, and Update your Library.  For this to work, you will need to ensure that:
- Media Server is running (In "MC --> Tools--> Options--> Media Network")
- When you first Run MC Media Checker, it will ask you to enter your Connection Details, and allow you to test it works.  If you ever need to change these just delete the "MC Media Checker.ini" file in the same directory.  The second time the menu will be presented

Notes:  
- I've attached both a compiled Version and the original AHK Script if you want to see what it does

Let me know of any bugs!

Thanks
Nathan
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: astromo on March 10, 2016, 09:24:12 pm
Just spotted this.

Looks useful.

Nice one.

Will provide feedback if I can.
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: jmone on March 10, 2016, 09:46:37 pm
Please do - I wrote it as I knew I had folders that I did not delete..... I found those but also a folder with 100 songs I'd not imported!
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: astromo on March 13, 2016, 01:07:43 am
I've given the executable a go and on the first entry it logged a show that was registered in the MC library but it was missing key meta data, viz. series, season and episode.

This is useful but not the script's intent, hey?
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: jmone on March 13, 2016, 06:07:34 am
Mmmm, all it does is read the filename and check with MC.  So if it is actually in MC it could be:
- A special char in the filename that is not being translated well, or
- It is a filename where MC changes the extension in the DB (eg DVD, BD etc).

What is the filename?

Thanks
Nathan
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: astromo on March 13, 2016, 07:01:26 am
ABC TV recording - A Quiet Word with ... Richard E. Grant [date].ts

The above is from memory. I forget the precise date. The file name was generated by the FTA/OTA EPG, so no season, series or episode details that align with MC standard.
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: jmone on March 13, 2016, 02:31:44 pm
I think it could be all the extra extra "...." in the middle confusing things.  Thanks however as I ran it over my TV Recordings folder and I have a heap of old garbage to delete!
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: RoderickGI on March 13, 2016, 05:53:29 pm
Thanks however as I ran it over my TV Recordings folder and I have a heap of old garbage to delete!

Now this could be a particularly interesting use of your tool jmone. I think I will have to give it a test. The result may be scary though, as I have a heap of stuff I haven't imported yet, as it is duplicates or old low quality video.

Should be very useful on TV recordings though. As long as it understands the JTV format.
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: jmone on March 13, 2016, 06:04:48 pm
The script is dumb as (at present).  It just checks ALL filenames in a directory structure to see if a file name is in MC.  As an example, if you record in JTV it will report that all the cnk,jta,jtf,xml,etc files etc are not in MC as these don't appear in the MC Database but are on the FileSystem.  I've been pondering adding some smarts (esp for BD structures as you can have thousands of files associated with one Blu-ray).
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: RoderickGI on March 13, 2016, 06:29:44 pm
Ok. I thought from your description above that may be an issue.

Some smarts with a filter of what to exclude (XML, JTA, JTS, etc.) and what to explicitly include (JTV for example) would be good. I will give it a try later anyway.

Thanks jmone.
Title: Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
Post by: jmone on August 29, 2016, 03:16:29 am
I'm going to close this thread, as future updates will be part of MC Tool Box (http://yabb.jriver.com/interact/index.php/topic,106802.0.html)