INTERACT FORUM

Please login or register.

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

Author Topic: Auto-Import  (Read 1156 times)

nathanchavez

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 291
  • I know nothing except for the fact of my ignorance
Auto-Import
« on: December 17, 2021, 05:02:34 pm »

Is there a settings file for auto-import?  Ideally, I'd like to be able to add/edit entries by editing that file rather than using the GUI, because it would be must faster since I have 100+ directories to add and a lot of them are a little bit the same.  Also, once I do get them all added is there a way I can back that list up, just in case?
Logged

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 983
  • Hoisted by his own petard - Lock him up!
Re: Auto-Import
« Reply #1 on: December 17, 2021, 06:27:45 pm »

100 directories... wow!

You might be able to figure out how edit the User Settings. ini file located here:  C:\Users\username\AppData\Roaming\J River\Media Center 28\Library\Settings

Using Notepad++, I searched for Auto Import (with the space) and it found 4 instances, which matches the measly number of directories that I use for import  :) .  The 4 lines below that start with XMLPH version looks like the lines to edit, but also looks pretty hairy to edit.  I guess just make a copy before you do.  That said, I have not tested this, nor do I know if these are the correct entries to edit, so proceed at your own risk.  My user settings file has 4500+ lines, so there very well may be other locations that must be edited.

Might be easier to consolidate some of those directories first. Maybe sort them into several parent directories where the import settings would be the same for all the sub-directories, and then just import the parent.
Logged

nathanchavez

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 291
  • I know nothing except for the fact of my ignorance
Re: Auto-Import
« Reply #2 on: December 17, 2021, 06:48:10 pm »

Yeah, it doesn't look very user-friendly.  I'm probably better off just entering everything manually using MC.  Thanks!
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: Auto-Import
« Reply #3 on: December 17, 2021, 07:09:23 pm »

I'm not sure if you are aware that Auto Import can look in subdirectories too.  My Music folder has probably 100 or more Artist folders.  But auto import just looks in "Music" and then looks through all of the subdirectories by itself.

I can't imagine any organizational scheme that has 100 top level music folders.  Perhaps I'm not trying hard enough to imagine.  :)

Brian.
Logged

nathanchavez

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 291
  • I know nothing except for the fact of my ignorance
Re: Auto-Import
« Reply #4 on: December 17, 2021, 07:23:26 pm »

In my case, it's a directory called "TV" with subdirectories for each show.  Each show has it's own genre and series fields, so blacked import rules won't work.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: Auto-Import
« Reply #5 on: December 19, 2021, 08:14:24 am »

I only have one auto import directory for TV.  Under that are dozens of directories, each with their own show.  The Genre, Show title, etc are all determined by the lookup at auto import time.  You only need ONE auto import entry for your master TV folder.

Brian.
Logged

nathanchavez

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 291
  • I know nothing except for the fact of my ignorance
Re: Auto-Import
« Reply #6 on: December 20, 2021, 03:47:12 pm »

I only have one auto import directory for TV.  Under that are dozens of directories, each with their own show.  The Genre, Show title, etc are all determined by the lookup at auto import time.  You only need ONE auto import entry for your master TV folder.

Brian.


That might work for you, but that doesn't work for everyone.   The naming conventions are off, there is no ability for the user to determine for themselves what the genre is, the episodes may or may not be listed in the correct order, etc.  This is why I prefer to manually enter the tags, which requires a lot of auto import entries.  Now if there was a way to tweak the information that's scraped when you auto-lookup information then that would be different, but to my knowledge you can't.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2401
Re: Auto-Import
« Reply #7 on: December 21, 2021, 06:42:38 am »

Since the Genre/Series tags for all episodes of a given series are the same, why not add some magic to copy them from a previous episode when importing a new one? This way you would only need to set the tags for the first episode of a new series, and the new ones would inherit them. You could then have a single AutoImport rule for the whole \Series folder.

Something like this for the import tags:
Code: [Select]
Series: firstnotempty(listitem(fieldquery(filename /(path/), filepath(), Series,1,1),0),filefolder(,0))
Genre: listitem(fieldquery(filename /(path/), filepath(), Genre,1,1),0)

Other tags could also be copied in the same way. The expressions look for the first existing file that shares the same Folder name, and copy the needed Field from it.
If you use subfolders for each episode within each series, then a more complex expression is needed (also doable).
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: Auto-Import
« Reply #8 on: December 21, 2021, 06:49:21 am »

Auto Import is just the first step in organizing your collection.  I frequently need to change things that auto import got wrong.  I don't have any Genre fields that I personally use for TV, but you can certainly easily change them after import.

Same with shows that have DVD order vs Aired Order.  You just select the series and run "get movie and TV info" and then tweak the dialog with whatever you need:  Change the name of the series it's looking up; make it use DVD order, etc.

All of the effort you would put into making individual "rules" for auto importing each show can simply be done right at the show level without having to fill out "field = value" for every show.  Just select the show (once imported) and change whatever you want.

Presumably you are aware that you can select as many episodes as you want, and change them all at once?  You can select multiple shows at once also.  So if you wanted to set every show with a Genre of Drama, you could go down your show list, selecting each one, and then set the Genre field *once* and it would set the genre for every selected show and every episode of that show.

As you said, not every solution works for everyone.  I'm taking the time to reply to you because you seem like a real collector who has collector type desires.  But you also seem new to MC and I think learning the "MC way" will help you in the long run.

Good luck to you. 

Brian.
Logged

nathanchavez

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 291
  • I know nothing except for the fact of my ignorance
Re: Auto-Import
« Reply #9 on: December 21, 2021, 01:51:26 pm »

Since the Genre/Series tags for all episodes of a given series are the same, why not add some magic to copy them from a previous episode when importing a new one? This way you would only need to set the tags for the first episode of a new series, and the new ones would inherit them. You could then have a single AutoImport rule for the whole \Series folder.

Something like this for the import tags:
Code: [Select]
Series: firstnotempty(listitem(fieldquery(filename /(path/), filepath(), Series,1,1),0),filefolder(,0))
Genre: listitem(fieldquery(filename /(path/), filepath(), Genre,1,1),0)

Other tags could also be copied in the same way. The expressions look for the first existing file that shares the same Folder name, and copy the needed Field from it.
If you use subfolders for each episode within each series, then a more complex expression is needed (also doable).

This is cool!  This is the kind of stuff I need to better understand.  I tried using your import fields above for the entire "TV" root directory and it seemed to work, but not the as I want.  The genre game me a result of "Genre: Comedy" in the tag, rather just "Comedy", and the series game me "Series: It's Always Sunny In Philadelphia"  As a result there is a Genre: Comedy and Series: It's Always Sunny In Philadelphia listing now and I'd rather not have that.  I want to get rid of the "Series:"and "Genre:" pretext.  Is there a way to eliminate that?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2401
Re: Auto-Import
« Reply #10 on: December 21, 2021, 02:27:51 pm »

Ah, sorry for misleading you. You just need to remove the header from each of them:
Series:
Code: [Select]
firstnotempty(listitem(fieldquery(filename /(path/), filepath(), Series,1,1),0),filefolder(,0))Genre:
Code: [Select]
listitem(fieldquery(filename /(path/), filepath(), Genre,1,1),0)
Better fix your existing entries first, or the expressions may copy them to the new files (thus keeping that prefix in place). Once you remove all occurrences of "Genre: Comedy" from your files it will no longer show anywhere. Same for the bad "series: blablabla" value.
Logged

nathanchavez

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 291
  • I know nothing except for the fact of my ignorance
Re: Auto-Import
« Reply #11 on: December 21, 2021, 02:43:10 pm »

Ah, sorry for misleading you. You just need to remove the header from each of them:
Series:
Code: [Select]
firstnotempty(listitem(fieldquery(filename /(path/), filepath(), Series,1,1),0),filefolder(,0))Genre:
Code: [Select]
listitem(fieldquery(filename /(path/), filepath(), Genre,1,1),0)
Better fix your existing entries first, or the expressions may copy them to the new files (thus keeping that prefix in place). Once you remove all occurrences of "Genre: Comedy" from your files it will no longer show anywhere. Same for the bad "series: blablabla" value.

That's what I was thinking, but I thought it best to let someone smarter than me confirm.  Also, I only used one single file as a test, so that was good.

In case this helps anyone else, my global import rules work perfectly and are as follows:

Series:

Code: [Select]
firstnotempty(listitem(fieldquery(filename /(path/), filepath(), Series,1,1),0),filefolder(,0))
Genre:

Code: [Select]
listitem(fieldquery(filename /(path/), filepath(), Genre,1,1),0)
Type:

Code: [Select]
TV

Name:

Code: [Select]
filename(,0)
Date:

Code: [Select]
(blank)
Logged
Pages: [1]   Go Up