INTERACT FORUM

Please login or register.

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

Author Topic: Disable auto-import when restoring backup?  (Read 3455 times)

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Disable auto-import when restoring backup?
« on: June 12, 2014, 02:34:35 pm »

I rearranged some of the drives in my system today, including swapping some of the drive letters around.
This also involved a fresh install of Windows, so I had to restore a library backup before using Media Center.
 
To prevent Media Center considering any of the files new imports, I had to very quickly open up the options window, disable auto-import, and then restart MC.
I've had to do this a couple of times before too, when restoring a backup for other reasons.
 
It would be useful to have an option when restoring backups that would disable auto-import the next time MC launches to prevent any headaches.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Disable auto-import when restoring backup?
« Reply #1 on: June 12, 2014, 03:00:36 pm »

Somewhere there's a thread where I requested the same thing, but I can't find it.  I wanted a command line option that turns it off for that run.  So, +1 for me.
Logged
The opinions I express represent my own folly.

arin

  • Junior Woodchuck
  • **
  • Posts: 97
Re: Disable auto-import when restoring backup?
« Reply #2 on: June 12, 2014, 04:45:37 pm »

+1 for me also!
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Disable auto-import when restoring backup?
« Reply #3 on: June 12, 2014, 05:58:16 pm »

+1
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

sKiZo

  • World Citizen
  • ***
  • Posts: 158
Re: Disable auto-import when restoring backup?
« Reply #4 on: June 12, 2014, 07:57:24 pm »

Seems to me restore resets the library to the time and date the library was saved and ignores any new additions that auto import may have inadvertently made anyway. Just have to remember to turn off auto import before restoring. I don't believe MC flips any switches in options during a restoration?

I also build a list of "watch" folders for MC, and it ignores everything else. Works great, as I have two servers set up, one for video, and one for audio, both auto importing only the folders I want.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Disable auto-import when restoring backup?
« Reply #5 on: June 12, 2014, 09:20:59 pm »

Seems to me restore resets the library to the time and date the library was saved and ignores any new additions that auto import may have inadvertently made anyway. Just have to remember to turn off auto import before restoring. I don't believe MC flips any switches in options during a restoration?

I also build a list of "watch" folders for MC, and it ignores everything else. Works great, as I have two servers set up, one for video, and one for audio, both auto importing only the folders I want.
Restoring a backup will also restore your previous settings - which is especially useful when you have just done a clean install of the OS or are moving to a new machine.
But that also means restoring the backup will enable auto-import if it was on when the backup was created. (which it was in my case)
 
I have a lot of custom rules for auto-import - some of which are specific to certain drives - so if something happens like the drive letters being changed (which was the case today) then I want to be able to restore a backup, have MC reboot with auto-import disabled, and point everything to the correct location before re-enabling auto-import.
 
It's one of those things that's a lot easier to fix by making a small manual change before you let auto-import take over again, than to try and fix after the fact.
Logged

RussellS

  • Galactic Citizen
  • ****
  • Posts: 259
Re: Disable auto-import when restoring backup?
« Reply #6 on: June 13, 2014, 12:49:11 am »

+1
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41937
  • Shoes gone again!
Re: Disable auto-import when restoring backup?
« Reply #7 on: June 13, 2014, 10:06:59 am »

Next build:
NEW: Media Center can be run with a -NoImport command line switch to disable importing.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41937
  • Shoes gone again!
Re: Disable auto-import when restoring backup?
« Reply #8 on: June 13, 2014, 10:07:38 am »

And a note that it disables the first auto import, but subsequent runs can still happen if changes are detected.
Logged
Matt Ashland, JRiver Media Center

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Disable auto-import when restoring backup?
« Reply #9 on: June 13, 2014, 11:08:19 am »

Awesome, thanks Matt.
 
I assume that when MC restarts after restoring a backup, it's using the -noimport command?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41937
  • Shoes gone again!
Re: Disable auto-import when restoring backup?
« Reply #10 on: June 13, 2014, 12:50:22 pm »

I assume that when MC restarts after restoring a backup, it's using the -noimport command?

MC will never automatically use the command line.  After it restore a backup it would normally be good to run again.
Logged
Matt Ashland, JRiver Media Center

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Disable auto-import when restoring backup?
« Reply #11 on: June 13, 2014, 12:55:05 pm »

I see. Would it be possible to add another option to the "restore backup" dialog box which disables auto-import? (either for the next run, or "permanently" requiring you to manually enable it later)
 
The issue is that Media Center restores your previous settings when restoring a backup, which typically re-enables auto-import, and then restarts automatically.
 
So without quick user intervention, it ends up running auto-import - which is what I was hoping to prevent.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Disable auto-import when restoring backup?
« Reply #12 on: June 13, 2014, 08:35:16 pm »

I see. Would it be possible to add another option to the "restore backup" dialog box which disables auto-import? (either for the next run, or "permanently" requiring you to manually enable it later)

Not the permanent thing, but otherwise I agree.

I fight with it sometimes.  While the Library Manager's Restore from Backup or Make a Backup dialog is open, it should stop those kind of background tasks.  I've had it crash MC before, and even if not, as 6233638 pointed out above, it can actually cause issues if you're only restoring settings (and not the full Library).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Disable auto-import when restoring backup?
« Reply #13 on: June 13, 2014, 08:36:59 pm »

I have a technical question about the option:

* Does it only work when used to launch MC, or can it disable Auto-Import for an already running copy (maybe one in Library Server mode)?
* Assuming #1 is true, then how do you resume?  Just restart?
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41937
  • Shoes gone again!
Re: Disable auto-import when restoring backup?
« Reply #14 on: June 16, 2014, 01:25:55 pm »

I have a technical question about the option:

* Does it only work when used to launch MC, or can it disable Auto-Import for an already running copy (maybe one in Library Server mode)?

Only at launch.
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Disable auto-import when restoring backup?
« Reply #15 on: June 16, 2014, 03:57:05 pm »

Thanks.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up