INTERACT FORUM

Please login or register.

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

Author Topic: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)  (Read 9995 times)

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14464
  • I won! I won!

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
Logged
JRiver CEO Elect

astromo

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2251
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #1 on: March 10, 2016, 09:24:12 pm »

Just spotted this.

Looks useful.

Nice one.

Will provide feedback if I can.
Logged
MC33, Win10 x64, HD-Plex H5 Gen2 Case, HD-Plex 400W Hi-Fi DC-ATX / AC-DC PSU, Gigabyte Z370 ULTRA Gaming 2.0 MoBo, Intel Core i7 8700 CPU, 4x8GB GSkill DDR4 RAM, Schiit Modi Multibit DAC, Freya Pre, Nelson Pass Aleph J DIY Clone, Ascension Timberwolf 8893BSRTL Speakers, BJC 5T00UP cables, DVB-T Tuner HDHR5-4DT

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14464
  • I won! I won!
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #2 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!
Logged
JRiver CEO Elect

astromo

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2251
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #3 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?
Logged
MC33, Win10 x64, HD-Plex H5 Gen2 Case, HD-Plex 400W Hi-Fi DC-ATX / AC-DC PSU, Gigabyte Z370 ULTRA Gaming 2.0 MoBo, Intel Core i7 8700 CPU, 4x8GB GSkill DDR4 RAM, Schiit Modi Multibit DAC, Freya Pre, Nelson Pass Aleph J DIY Clone, Ascension Timberwolf 8893BSRTL Speakers, BJC 5T00UP cables, DVB-T Tuner HDHR5-4DT

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14464
  • I won! I won!
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #4 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
Logged
JRiver CEO Elect

astromo

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2251
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #5 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.
Logged
MC33, Win10 x64, HD-Plex H5 Gen2 Case, HD-Plex 400W Hi-Fi DC-ATX / AC-DC PSU, Gigabyte Z370 ULTRA Gaming 2.0 MoBo, Intel Core i7 8700 CPU, 4x8GB GSkill DDR4 RAM, Schiit Modi Multibit DAC, Freya Pre, Nelson Pass Aleph J DIY Clone, Ascension Timberwolf 8893BSRTL Speakers, BJC 5T00UP cables, DVB-T Tuner HDHR5-4DT

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14464
  • I won! I won!
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #6 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!
Logged
JRiver CEO Elect

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #7 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.
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

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14464
  • I won! I won!
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #8 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).
Logged
JRiver CEO Elect

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #9 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.
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

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14464
  • I won! I won!
Re: Guide: MC Media Checker (Check for Items on HDD but Missing in MC)
« Reply #10 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
Logged
JRiver CEO Elect
Pages: [1]   Go Up