INTERACT FORUM

Please login or register.

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

Author Topic: Re-import previously deleted files  (Read 1655 times)

johndonaldson

  • Recent member
  • *
  • Posts: 15
Re-import previously deleted files
« on: November 19, 2020, 04:37:23 pm »

How can I re-import a few previously deleted files into my Library. I need to use the "Import a single file" option. Auto-import with ignore previously deleted files unchecked would add many hundreds of files that need to stay deleted. A modification to the file names will get them back into my library but causes problems with other program that are using the original file name.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Re-import previously deleted files
« Reply #1 on: November 19, 2020, 04:48:32 pm »

As you have many files deleted from the Library that you don't want to import again, probably the easiest way to re-import a few files is to select them in Windows Explorer and use the "right-click > Media Center > Import" function.

Shell Integration will need to be enabled in Options.
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

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Re-import previously deleted files
« Reply #2 on: November 19, 2020, 11:39:09 pm »

You can remove them from the Removed Items database, and then MC's Auto-Import functionality will pick them up again as "fresh".

The Removed Items database is a hidden database within your MC Library. It is relatively easy to access, though you have to make a custom View or Smartlist to see it. To see only the removed items database items, make a Smartlist with the following rule:
~d=r

Which equates to Modify Results: Limit Database to Removed in the Search Wizard.

Once you have that, you can simply select the files there, and "delete" them again. When MC asks how you want to delete them, choose Remove from Media Library only (the top option). It will remove them from the database. Occasionally, you have to do it twice if you have stacked items in there so just refresh the view and make sure none of them come right back.

From that moment, Auto-Import will consider them "new", though it won't "trigger" on them until some other change is made on disk. You can run the Auto-Import scan manually, though, and it'll find and re-import them, or it will do so by itself next time it does a full scan.

However, you may find it more convenient if you need to access this regularly, to make an All Databases View. To do this, you'll need to make a new "top level" view in your Tree not under Audio, Video, or Images (so that it isn't filtered to show only those Media Types). I call mine "Advanced" but you can call yours whatever you want.*

Then, under that, make a new Panes-style View called All Databases (or whatever) with the following characteristics:
Set Rules for File Display search: ~d=a ~sort=[Filename]
Add an Expression Category called Database with this expression to Group-By: FileDBLocation()
  • Leave Expression to Display blank
  • Sorting: Ascending
  • Matching: Match Any
  • Grouping: unchecked
I find it also useful to add a Location pane, so add a second Category of type File Path, and leave the select path box empty. You can also add any other categories you'll find useful (mine has Media Type, Media Sub Type, File Type, Artist, and Series, but YMMV).

Then, you'll have a view that can see all of the MC databases, sorted by Filename/path, and you can subfilter them by type, path, or whatever you want. It is handy to have. Some of the other databases can occasionally be handy. The Bad one, for example, is files Auto-Import has seen, but has "determined are bad" and so ignores on future scans. If you have a file that got erroneously flagged, you can use the same method described above to remove them from that list (show the database, select the files, and remove them from MC). Most of the other databases in there aren't exceedingly useful, but they are neat to see.

* It is worth noting that you only have to make a separate top-level Advanced View if you want to be able to see all Media Types within the View. If you only care about Audio, you can skip this step and just make the All Databases View underneath Audio in the Tree. Or, of course, you could uncheck Use parent scheme rules for file display when creating it wherever you'd like and it will show all Media Types even if you create it under Audio in the Tree. But, it'd be weird to go to Audio to access a View that includes Images, Data files, and Videos, so making the Advanced top-level view makes more sense if you use multiple Media Types in MC. Plus it is handy to have for other organizational reasons. You can put "utility" and "tagging" Views your family doesn't need to see in there.
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: Re-import previously deleted files
« Reply #3 on: November 19, 2020, 11:47:15 pm »

It is also worth noting, for just a one-off here and there, you can drag-drop files onto MC from Windows Explorer, and choose Import. This ignores the Removed Items database and imports whatever you drop, much like the Shell Extension method Rod mentioned above.

A caution, though: With both drag-drop and shell-integration import, none of the Tag on Import rules you have defined, if any, get applied, nor does Carnac or Auto-Metadata Lookup. So, importing through Auto-Import is usually better.

More info:
https://wiki.jriver.com/index.php/Import
Logged
"Some cultures are defined by their relationship to cheese."

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

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Re-import previously deleted files
« Reply #4 on: November 20, 2020, 12:11:56 am »

With both drag-drop and shell-integration import, none of the Tag on Import rules you have defined, if any, get applied, nor does Carnac or Auto-Metadata Lookup. So, importing through Auto-Import is usually better.

That is a good point.

I just had a thought though. If a user wanted to restore field values from the previous time they were imported, the best way would be to Drag & Drop or right-click import, then copy fields from the Removed Database, and paste them to the newly imported file.

But there aren't many fields stored in the Removed Database, so that would be of limited value unless the file names didn't indicate what the file was, and hence CARNAC wouldn't be able to work it out. Might be worth it then. Otherwise, not so much.
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

johndonaldson

  • Recent member
  • *
  • Posts: 15
Re: Re-import previously deleted files
« Reply #5 on: November 20, 2020, 08:11:22 am »

Thanks for for all the help and information. I  wonder why you are prevented from re-importing previously deleted files with Import a single file without using these methods. Does this prevent some problem?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Re-import previously deleted files
« Reply #6 on: November 20, 2020, 11:56:28 am »

Thanks for for all the help and information. I  wonder why you are prevented from re-importing previously deleted files with Import a single file without using these methods. Does this prevent some problem?

The Import Single Folder command IS Auto-Import and obeys the settings enabled in that setup. It is just a special one-time-only version of Auto-Import.

You can, of course, disable this function. Tools > Options > Library & Folders > Configure auto-import. Then uncheck Ignore files previously removed from Library under Tasks.

And then you wouldn't have to worry about the Removed Items database at all.

PS. The reason it is the way it is is because it matches the behavior of iTunes. Otherwise, it would drive people crazy because if you removed a file from MC (but didn't delete it off of disk or move it to a different folder) then Auto-Import would just instantly re-import it (making it seem like the removal step was broken).

I keep the option above disabled because if a file is in one of my watched directories, I want MC to ALWAYS show it. But, different strokes for different folks.
Logged
"Some cultures are defined by their relationship to cheese."

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

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Re: Re-import previously deleted files
« Reply #7 on: November 24, 2020, 11:47:43 am »

I have unchecked "ignore previously deleted files". But one sub folder did not import usind "Import a single folder". Tried 3 times.
These tracks were listed in the 'removed' view. But I thought this should be ignored when this option is checked. Did I miss something ?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Re-import previously deleted files
« Reply #8 on: November 24, 2020, 04:28:48 pm »

I started writing the questions below, and then realised that I have a similar issue with a folder in my test Library. It is amongst a group of folders that I have done lots of testing in the past, with all other folders now deleted. But this one last folder of files exists, has been in MC in the past, and is in the Removed Database. So I used this folder to answer my own questions.

Do the files still exist in the sub-folder? Yes.

Can they be played using the right-click menu? Yes.

Did you have their file types selected in the Import Single Folder dialogue? Yes.

Are you selecting the lowest level folder that the files are actually stored in, and not some higher folder? Yes.

Can they be imported using the right-click menu? Yes, but...
MC reported that the file was updated for external changes, with the correct path and filename. It didn't show up in the Recently Imported Playlist. The file also can't be found in any MC Audio View. It also couldn't be found in any Video, Images, or Documents View. Or even the "All Files (empty search)" Smartlist.

But it was found in an "All Files" View I use, and played correctly. I tried with another file from the same Album folder. Same result. The files were removed from the Removed Database when I imported them. All other files in the Album were shown in the "All Files" View, and when I played the other files that I had not imported, they were removed from the Remove Database.

So to fix this I used the "All Files" View to select and delete all the files or the Album. I then deleted them from the Removed Database. Running a Single Folder import for the folder imported all the files correctly, and they appeared in the Audio Views and other locations as they should.

So, I guess with all the mucking around I do in my test Library, something got a bit messed up. I suppose that could have happened for you as well.


My "All Files" View is just a blank View, which I have under my tools group so that it isn't filtered to any particular Media Type. But you can build it anywhere. The only requirements are to specify a rule of "Limit Database to: All", and if you don't build it under the appropriate View group (i.e. under the Audio group for Audio files), then uncheck the "Use parent scheme rules for file display" setting. Only this works. Even ticking all other database types listed, but not the All item, won't show the problem files.

See how you go trying the above.



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
Pages: [1]   Go Up