INTERACT FORUM

Please login or register.

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

Author Topic: Is there an "undo" function of MC?  (Read 1730 times)

baldo

  • Galactic Citizen
  • ****
  • Posts: 251
Is there an "undo" function of MC?
« on: February 28, 2023, 11:45:55 am »

I'm just wondering if there is a way to go back and undo an action that I have just done on MC.

So for example, if I delete some tracks from a playlist that I did not mean to delete, can I undo that?

many thanks.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Is there an "undo" function of MC?
« Reply #1 on: February 28, 2023, 11:50:17 am »

You can restore a backup.  MC makes them automatically.

You might find the files in Recently Played or Recent Playing Now's.
Logged

baldo

  • Galactic Citizen
  • ****
  • Posts: 251
Re: Is there an "undo" function of MC?
« Reply #2 on: February 28, 2023, 12:50:59 pm »

Thanks JimH

The backup restore only takes me back to when the last back up was made, normally at the start of a session. That will loose everything that I have done since I opened the session up. I just want to go back a few actions not loose everything that I have done.

A lot of software applications have the undo facility, Eg word, Excel etc.  I assume that the actions are stored somewhere in memory, perhaps....
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Is there an "undo" function of MC?
« Reply #3 on: February 28, 2023, 12:55:13 pm »

You could look under Edit  ;)
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 438
  • MC33.0.30 x64bit
Re: Is there an "undo" function of MC?
« Reply #4 on: February 28, 2023, 02:40:11 pm »

Ctrl+Z
Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1101
  • Goodnight and Good Luck
Re: Is there an "undo" function of MC?
« Reply #5 on: February 28, 2023, 05:50:03 pm »

In addition to the Undo option in the edit menu and Ctrl+z previously mentioned by lepa and MusicBringer, you can also customize the top toolbar by adding the Undo/Redo icons for easy access. 

That said, I think undo/redo is primarily for file tag operations - it will recover thousands of original tags if you made an inadvertent change to many files all at once.  But from my experimenting, files deleted from a playlist (as you ask your initial post), or files deleted from the playing now queue, or deleted from the database for that matter - none of the above undo options will bring those files back.

Of course if you delete files from the database, you can just re-import them (assuming you didn't delete them to the recycle bin or erase them completely).
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 438
  • MC33.0.30 x64bit
Re: Is there an "undo" function of MC?
« Reply #6 on: March 02, 2023, 04:46:30 pm »


Of course if you delete files from the database, you can just re-import them

I am not going to test it, but I am pretty sure Ctrl+Z brings back deleted file errors for me.
Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1101
  • Goodnight and Good Luck
Re: Is there an "undo" function of MC?
« Reply #7 on: March 02, 2023, 06:57:33 pm »

I am not going to test it, but I am pretty sure Ctrl+Z brings back deleted file errors for me.
I did test it, and it doesn't. Ctrl+Z is nothing more than a hotkey for Undo, so it's not going to behave any differently than choosing Undo from the edit menu, or clicking the Undo icon (and none of them will bring back a deleted file).
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 438
  • MC33.0.30 x64bit
Re: Is there an "undo" function of MC?
« Reply #8 on: March 03, 2023, 04:29:50 am »

Thanks so much for testing it - now I remember - I go directly to the Recycle Bin and restore from there - in MC the restored file is easy to spot - its the one with No Tag Data 😊
Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1101
  • Goodnight and Good Luck
Re: Is there an "undo" function of MC?
« Reply #9 on: March 03, 2023, 07:45:32 am »

Thanks so much for testing it
No problem.  I always keep a test artist folder with a test album folder within it - that way, I can drag-and-drop music files from my "real" folders to do testing on those files without affecting my carefully curated library/database (and then just delete those extra/duplicate files when I'm done testing).  It does make sense though, that undo should bring back a deleted file.  Maybe that is something Matt can look into. 

What would really be welcome IMO though, is if Undo included a list of the last 20 actions (or 100 actions if I'm going to make the request :o!) that are available to be undone.  Often times I find myself blindly clicking the undo icon trying to revert an erroneous tagging action, but I don't know how many actions were performed prior to the action I want to undo. A list of the last X number of actions where I can see definitively what the recent operations were and how many of them will be undone would be incredibly helpful.  The user would simply right-click on the Undo icon to bring up the recent actions available for "undoing". 

An Undo list is something I have seen in in many (most?) programs I use.  Perhaps this is very difficult to implement within MC, but I have great confidence Matt could figure it out.
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 438
  • MC33.0.30 x64bit
Re: Is there an "undo" function of MC?
« Reply #10 on: March 03, 2023, 09:08:39 am »

...Often times I find myself blindly clicking the undo icon trying to revert an erroneous tagging action, but I don't know how many actions were performed prior to the action I want to undo.

Me Too.
In fact only a few minutes ago I was doing this very thing, click click click, oh one more wont hurt, click ...and its one too many Grrhh.
Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Is there an "undo" function of MC?
« Reply #11 on: March 03, 2023, 11:42:05 am »

I guess it somewhat hard to log these things inside mc. Then again "Undo: 20 file changes" isn't too helpful for user as can't be sure what operation is going to be undone and which files is affected. It can be e.g moving 20 UHD remuxes back from server  ;D
Logged

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1101
  • Goodnight and Good Luck
Re: Is there an "undo" function of MC?
« Reply #12 on: March 03, 2023, 12:52:06 pm »

Then again "Undo: 20 file changes" isn't too helpful for user as can't be sure what operation is going to be undone and which files is affected
Which is exactly why I suggested there be a list, and not simply: undo 1 change, undo 2 changes... undo 20 changes.  If that were all it did, it would be effectively no different than what it is now.

What I am suggesting is a context menu/list with very brief descriptions.  Right-clicking on the undo icon could bring up a list of recent changes, such as:
  • Deleted import date 15 places
  • Replaced Elten John with Elton John 36 places
  • ...
  • ...
  • ...
  • Revised Star Rating 3 places
This is basically what I have seen in many programs, for example Microsoft Word and Excel
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Is there an "undo" function of MC?
« Reply #13 on: March 03, 2023, 01:08:13 pm »

If that were all it did, it would be effectively no different than what it is now.
I was describing what it does now and why current situation is worth as much as saying just undo / redo  ;)
Logged

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1101
  • Goodnight and Good Luck
Re: Is there an "undo" function of MC?
« Reply #14 on: March 03, 2023, 01:11:30 pm »

Sorry lepa, that wasn't clear to me.

So I assume this makes you another vote for adding this enhancement?  That makes 3 - Let's keep this ball rolling and get Matt excited about trying to implement it!
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Is there an "undo" function of MC?
« Reply #15 on: March 03, 2023, 02:41:43 pm »

Me Too.
In fact only a few minutes ago I was doing this very thing, click click click, oh one more wont hurt, click ...and its one too many Grrhh.
Think of it as us trying to train you to be more thoughtful.  ;)

MC makes automatic backups but you can make a manual one when you plan to make many changes.  If you run into a problem, restore the backup.  The wiki has a topic.
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 438
  • MC33.0.30 x64bit
Re: Is there an "undo" function of MC?
« Reply #16 on: March 03, 2023, 04:03:58 pm »

Think of it as us trying to train you to be more thoughtful.  ;)

MC makes automatic backups but you can make a manual one when you plan to make many changes.

Ha, do you know what Jim I had thought of that. In fact, I did make a manual backup just in case. But the relied on the Ctrl + Z. 😊
Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Is there an "undo" function of MC?
« Reply #17 on: March 04, 2023, 03:42:17 am »

MC makes automatic backups but you can make a manual one when you plan to make many changes.

Hindsight is 20/20 ;D

... in reality one rarely thinks "I will for sure mess this up accidentally, let me take some precaution". It's more like "let me just make this simple change... oh, crap!"
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 438
  • MC33.0.30 x64bit
Re: Is there an "undo" function of MC?
« Reply #18 on: March 04, 2023, 11:16:24 am »

Hindsight is 20/20 ;D

... in reality one rarely thinks "I will for sure mess this up accidentally, let me take some precaution". It's more like "let me just make this simple change... oh, crap!"

Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1101
  • Goodnight and Good Luck
Re: Is there an "undo" function of MC?
« Reply #19 on: March 04, 2023, 04:02:46 pm »

MC makes automatic backups but you can make a manual one when you plan to make many changes.  If you run into a problem, restore the backup.  The wiki has a topic.
I would think (hope?) most experienced MC users know to initiate an MC backup prior to making a change that will affect many (thousands) of files, especially since it is so easy to do. 

But as zybex noted, sometimes a change that affects a lot of files is accidental and a manual backup was not initiated.  The auto backups can of course save your bacon, but if you've made a large number of (planned) changes in a session and then have an accident, the last auto backup is of marginal value since you will lose all those changes in the current session (as the OP also pointed out earlier in this thread).

Even if the above scenarios are not at play, an undo list with brief descriptions of the last 20+ actions where user's can roll back to a selected point would simply be a very nice enhancement. A capability available in many other programs (including another popular media player, whose name is verboten here ;D).
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 438
  • MC33.0.30 x64bit
Re: Is there an "undo" function of MC?
« Reply #20 on: March 05, 2023, 05:52:08 am »

But as zybex noted, sometimes a change that affects a lot of files is accidental and a manual backup was not initiated.  The auto backups can of course save your bacon, but if you've made a large number of (planned) changes in a session and then have an accident, the last auto backup is of marginal value since you will lose all those changes in the current session (as the OP also pointed out earlier in this thread).

Even if the above scenarios are not at play, an undo list with brief descriptions of the last 20+ actions where user's can roll back to a selected point would simply be a very nice enhancement. A capability available in many other programs (including another popular media player, whose name is verboten here ;D).

Hear! Hear!
Well said
Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Is there an "undo" function of MC?
« Reply #21 on: March 23, 2023, 12:13:28 pm »

Implementation proposal:

- Add an "UndoHistory" database table with columns: ActionID, ChangeDate, FileKey, FieldID, PreviousValue (add more if needed)
- On all DB writes, add an entry to that table with the previous value that is about to be overwritten
- Add an option for "Days to track undo history: 30" (or alternatively, number of entries/max size)
- periodically trim the undo database, deleting entries older than that
- add UI elements to allow Undo/CTRL+Z/Retrieving any old entry in the History

This may have performance impact for huge changes (like changing thousands of entries in one go), but otherwise should be OK.
Some tables/fields should not be covered, like for instance the TV programming guide, and calculated fields.
ActionID groups many changes into one logical operation; changing 100 records is one action, and can be undone in 1 step if desired.
Logged

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1101
  • Goodnight and Good Luck
Re: Is there an "undo" function of MC?
« Reply #22 on: March 26, 2023, 09:25:44 am »

- Add an "UndoHistory" database table with columns: TaskID, ChangeDate, FileKey, FieldID, PreviousValue (add more if needed)
- On all DB writes, add an entry to that table with the previous value that is about to be overwritten
- Add an option for "Days to track undo history: 30" (or alternatively, number of entries/max size)
- periodically trim the undo database, deleting entries older than that
- add UI elements to allow Undo/CTRL+Z/Retrieving any old entry in the History
Unsurprisingly, zybex has developed a much more refined and definitive "undo" implementation than my suggestion above - Nice work!  Regarding that last item:

Right clicking on the already existing undo icon (assuming the user has added it to the toolbar) could show the last X number of "un-doable" actions. The further down the list you select (1st item being the most recent action), the more actions that will be "un-done".  But I think you are suggesting users be able to select any item in the list, and only that single action would be undone… Is that correct?  If that is possible, that would be truly awesome - I don't think I've ever seen that granular level of "undo" control in any other program. It could/would certainly be yet another "best in class" MC feature.

All that remains now is to see if Matt is convinced it's worth his time to implement  ;D.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Is there an "undo" function of MC?
« Reply #23 on: March 26, 2023, 10:09:59 am »

It's not always possible to undo an older action without undoing the other actions that come after it, due do dependencies and cumulative actions. It should work, but you may not get exactly what you expect. It's definitely easier to undo from 1 to N in order.

It could work like this:
- undoing the last N actions would remove those actions from the top of the History DB. You can keep hitting CTRL-Z and it just keeps going through the history and undoing 1 at a time.
- undoing a specific action (not last) would *add* another undo entry to do DB to record that change. That could then also be undone. Alternatively, it could instead remove that one entry as well and not add a new one, but I'm not sure if that's a good idea.
Logged

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1101
  • Goodnight and Good Luck
Re: Is there an "undo" function of MC?
« Reply #24 on: March 26, 2023, 10:20:30 am »

It's not always possible to undo an older action without undoing the other actions that come after it, due do dependencies and cumulative actions. It should work, but you may not get exactly what you expect. It's definitely easier to undo from 1 to N in order.
Thanks for clarifying… dependencies/cumulative actions is exactly why I assumed that no program (that I've seen anyway) allows you select a single item from anywhere within an "undo" list.  In any event, you still have detailed how MC can go about implementing a very nice enhancement.  Crossing my fingers it might happen.
Logged
Pages: [1]   Go Up