This project has moved. For the latest updates, please go here.

Exclude Folders - How does it work?

Dec 10, 2013 at 7:40 AM
I've added four folders to the Exclude Folders from Scrape option in General Preferences, but it doesn't appear to have any effect on my scrapes. Is there a specific format I should use for the folder names? Does it only affect Movie scraping?

The four folders in question contain TV episodes that can't be scraped because they're one-off things like interviews and the like that don't exist in scraping databases. Whenever I tell Media Companion to search for new episodes it always scrapes those folders regardless and tells me it can't add any of the items to my library because it can't match them to anything at tvdb.

Any clue what's going wrong here?
Coordinator
Dec 10, 2013 at 7:54 AM
excluding folders is very simple.
If you have a folder called "Ignore" then just add "Ignore" to the ignore list.

MC will exclude the folder "Ignore" and also any sub folders.

I believe it covers Movies and TV Shows, but its been a while since I've looked over that section of code.
Dec 10, 2013 at 7:57 AM
Here are the folders I've added, exactly as they appear in the config.xml after I added them through the UI:

<ExcludeFolders>
<Exclude name="Z:\TV\ANTHONY BOURDAIN NO RESERVATIONS\SPECIALS" />
<Exclude name="Z:\TV\BUBBLEGUM CRISIS\EXTRAS" />
<Exclude name="Z:\TV\GOOD EATS\SPECIALS" />
<Exclude name="Z:\TV\GORDON RAMSAY COOKALONG LIVE\TRAINING VIDEOS" />
</ExcludeFolders>

If it is supposed to cover TV shows and for some reason isn't excluding these folders, any idea what I can do to start troubleshooting? The files in question are on a network share that I have mapped to Z:, if that matters.
Coordinator
Dec 10, 2013 at 5:04 PM
You've gone too specific.

Entries should be
"Specials"
"Extras"
"Training Videos"

Not with full path. This way every folder called "Specials" or "Extras" etc, will be excluded from scanning.
Marked as answer by vbat99 on 10/16/2015 at 12:18 PM
Dec 10, 2013 at 5:18 PM
Perfect, that makes sense. That makes the feature a bit broadly more specific than I need, but I guess I can just create a new naming scheme for the extra files and move the episodes into that. Something like 'Additional' or just name them all 'Extras' might work. I can't use Specials because I'm using Specials as a season name for the rest of my shows.

Thanks muchly for the help. I'm a fan of MC and I'm really impressed at how responsive your community is.
Dec 19, 2013 at 12:14 AM
I started using MC a little while ago and I think I am starting to get the hang of it. Great software.

My apologies up front if this has been previously covered.
Is there any way there could be an empty file in folders you want to exclude that MC could look for and if present ignore that folder and/or any subfolders?
Something along the lines of .MCignorefolder. This which would be a hidden file on linux based NAS devices etc (because of the dot) so it would be reasonably unobtrusive to people's libraries.

The reason I ask is that if you want to do a clean install of MC and do a complete rescan from nfo files you don't have to go in each time an set up the excluded folders.
For me this would be very useful when I try out a new version of MC and I want it to be a clean install and don't want to risk having issues from one version carry over to the next.
Coordinator
Dec 19, 2013 at 12:57 AM
There are some exclude folders already built into Media Companion, some of them 'Apple' folders.
.appledouble
.tb
.ds_store
(noscan)

These are probably the best examples to use, though first time I've noticed the (noscan), that might be a simple one to use.
Dec 19, 2013 at 1:08 AM
Thanks for the quick reply.

I'll try out the (noscan) one as that looks like what I was thinking of.
Feb 1, 2015 at 11:34 PM
Hi

Back again asking another question about excluding folders.
I am using the profiles functionality to be able to separate some of the library into smaller chunks so it is faster to scan through my library.
I put a single folder name, OTHER, in the "Exclude Folders from scrape" field in General Preferences for a profile. The exclude function then works as it should.
However every time I select the profile, it duplicates the folder name in the "Exclude Folders from scrape" field in General Preferences. MC then appears to get confused and does not ignore that folder.
So as soon as I switch to another profile and then switch back to the first one again I get the following in the "Exclude Folders from scrape" field in General Preferences.
OTHER
OTHER
If I change to another profile, and then back to the first one I get the following in the "Exclude Folders from scrape" field in General Preferences.
OTHER
OTHER
OTHER
So every time I change profiles I get extra entries in the exclude folders field.
Am I doing something wrong or is this a bug I should be reporting?

I am using version 3.6.1.3 at the moment, but I have been having trouble with this for a while now so it was happening with older versions as well.
When I change versions, I basically start from scratch and put all the settings in again, recreate the profiles, add source folders etc. I then do a refresh all to bring the library back into MC. This way I don't end up with conflicts between settings files over different versions. The exclude folder functionality is key to making sure this works cleanly though.

MC is otherwise working very well for my needs, but I am still finding functionality all the time which makes it even more useful. Keep up the good work.
Coordinator
Feb 2, 2015 at 1:09 AM
that looks like we are not clearing the exclude list when changing Profiles

Should be an easy fix and will make the next release
Coordinator
Feb 2, 2015 at 8:00 AM
Fix in place for the next release. Hope to get a new release out this week.
Feb 4, 2015 at 11:33 PM
Thanks vbat99

That will be awesome. Thanks for the quick response.
Coordinator
Feb 6, 2015 at 1:30 AM
New release out now. MC3.614b
Feb 8, 2015 at 10:25 PM
Hi vbat99

I have loaded up 3.614b and added some profiles. I can switch to a profile, however if I try to change the settings on the profile and then switch to another profile it throws up an error with the sad face. If I attempt to continue after the error, it brings up the changing profiles dialog box (Message box?) and freezes. Once It does this once, then every time I use MC from that point on and attempt to load a profile it just brings up the changing profiles dialog box and freezes. If I delete the profiles.xml file in settings I can set up the profiles and switch between them again until I attempt to change the settings.
I did get one time when I could change settings and switch to another profile (and your fix for the doubling up of the excluded folder names appears to have worked), but as soon as I attempted to make any changes to settings in the new profile, I then couldn't change to another without the crash. I'm not sure what I did to make it work this one time, but I haven't been able to re-create it.

Here is briefly what I did when first setting up the new version.
Downloaded MC3.614b
Extracted to a folder named Media Commander in My Documents\Media Commander\
Run MC
Go to General Preferences and create 4 profiles : Movies, Movies - Sort, TV, TV - Sort
switch to Movies Profile
Add Folder "Other" to general preferences exclude
Apply Changes
Change Movie Filename Rename to %T (%Y) %S %V %A in General tab of movie preferences
Apply Changes
Attempt to change Profiles
At this point I get the sad face error.

This is on a 64 Bit Windows 8 machine.

The error log is showing a problem accessing actorcache.xml (in this case I was changing to the profile which uses actorcache7) as below

System.IO.IOException: The process cannot access the file 'E:\Users\Anthony\Documents\Media Companion\Media Companion\Settings\actorcache7.xml' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Media_Companion.Movies.LoadPersonCache(List`1 peopleDb, String typeName, String fileName)
at Media_Companion.Movies.LoadActorCache()
at Media_Companion.Movies.LoadPeopleCaches()
at Media_Companion.Movies.LoadCaches()
at Media_Companion.Form1.util_ProfileSetup()
at Media_Companion.Form1.ProfilesToolStripMenuItem_DropDownItemClicked(Object sender, ToolStripItemClickedEventArgs e)


THe Profile.xml file reads as follows

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile>
<default>Default</default>
<startup>Default</startup>
<profiledetails>
<actorcache>\Settings\actorcache.xml</actorcache>
<directorcache>\Settings\directorcache.xml</directorcache>
<config>\Settings\config.xml</config>
<moviecache>\Settings\moviecache.xml</moviecache>
<profilename>Default</profilename>
<regex>\Settings\regex.xml</regex>
<filters>\Settings\filters.txt</filters>
<genres>\Settings\genres.txt</genres>
<tvcache>\Settings\tvcache.xml</tvcache>
<musicvideocache>\Settings\musicvideocache.xml</musicvideocache>
</profiledetails>
<profiledetails>
<actorcache>\Settings\actorcache5.xml</actorcache>
<directorcache>\Settings\directorcache5.xml</directorcache>
<config>\Settings\config5.xml</config>
<moviecache>\Settings\moviecache5.xml</moviecache>
<profilename>Movies</profilename>
<regex>\Settings\regex5.xml</regex>
<filters>\Settings\filters5.txt</filters>
<genres>\Settings\genres5.txt</genres>
<tvcache>\Settings\tvcache5.xml</tvcache>
<musicvideocache>\Settings\musicvideocache5.xml</musicvideocache>
</profiledetails>
<profiledetails>
<actorcache>\Settings\actorcache6.xml</actorcache>
<directorcache>\Settings\directorcache6.xml</directorcache>
<config>\Settings\config6.xml</config>
<moviecache>\Settings\moviecache6.xml</moviecache>
<profilename>Movies - Sort</profilename>
<regex>\Settings\regex6.xml</regex>
<filters>\Settings\filters6.txt</filters>
<genres>\Settings\genres6.txt</genres>
<tvcache>\Settings\tvcache6.xml</tvcache>
<musicvideocache>\Settings\musicvideocache6.xml</musicvideocache>
</profiledetails>
<profiledetails>
<actorcache>\Settings\actorcache7.xml</actorcache>
<directorcache>\Settings\directorcache7.xml</directorcache>
<config>\Settings\config7.xml</config>
<moviecache>\Settings\moviecache7.xml</moviecache>
<profilename>TV</profilename>
<regex>\Settings\regex7.xml</regex>
<filters>\Settings\filters7.txt</filters>
<genres>\Settings\genres7.txt</genres>
<tvcache>\Settings\tvcache7.xml</tvcache>
<musicvideocache>\Settings\musicvideocache7.xml</musicvideocache>
</profiledetails>
<profiledetails>
<actorcache>\Settings\actorcache8.xml</actorcache>
<directorcache>\Settings\directorcache8.xml</directorcache>
<config>\Settings\config8.xml</config>
<moviecache>\Settings\moviecache8.xml</moviecache>
<profilename>TV - Sort</profilename>
<regex>\Settings\regex8.xml</regex>
<filters>\Settings\filters8.txt</filters>
<genres>\Settings\genres8.txt</genres>
<tvcache>\Settings\tvcache8.xml</tvcache>
<musicvideocache>\Settings\musicvideocache8.xml</musicvideocache>
</profiledetails>
</profile>

Let me know if you need any more info to help track down this issue.
Coordinator
Feb 9, 2015 at 5:18 AM
From the error message, I see you have Media Companion extracted to:
E:\Users\Anthony\Documents\Media Companion\Media Companion\Settings\actorcache7.xml'

It is not recommended to have Media Companion in a Secure folder like Documents.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
Instead, Cut Media Companion folder, and paste into the root of your E: Drive.

Then attempt the changing of profiles again.

Also from the error message, it seems there is a race condition where a file is locked in use, when it is attempted to be accessed...because it is being used by another process