Automated Finding and Organising

Bartdesign

26-10-2008 00:53:58

Hi,

One of the features i would like to see is automated Finding and Organising. I use some scripts to autodownload my tvshows. After that i use "finding and organising" to copy the files to the proper directory's. However the finding and organising is always an manual step, i would love to see this automated.

I can think of 2 solutions:
* Intergrate an schedule system that enables you to run the finding and organising task periodically.
* intergrate an console argument to tvrename.exe, so that it runs the finding and organising; without starting the GUI. eg. tvrename.exe /findandorganise /move

The latter solution seems the most clean and elegant to implement, because you can use the windows inbuilt scheduler to run the task when your not logged on.

I hope you'll find my request usefull and hopefully it will end on your todo list someday ;)

Keep up the good work :D

sstteevvee

26-10-2008 12:16:51

Having it completely automatic has been on my to-do list for a while. I could put option in the preferences, so if you didn't trust it, you wouldn't have to turn it on. Since someone else has asked for it, I'll bump it up my priority list a bit.

Command-line options are interesting.. I hadn't thought of those. I'll add it to my to-do list, too. All they'd have to do is simulate hitting various buttons in the UI (while keeping the UI hidden).

Bartdesign

26-10-2008 13:03:10

It's interesting indeed because it can open up a lot of new posibillty's. Not only will it give access to periodically execution but it will also be possible to run tvrename from external applications, like sabNZBd. That would rock ;)

Also to compliment the automated "finding and organising" feature i have another suggestion. While there is an option to leave the source file, there also could be an option to remove the directory where the file resides. Most usenet downloaders create directory's in the download folder with the video files in them, it's a pain to check those and remove them by hand.

Thanks ;)

sstteevvee

26-10-2008 14:20:52

Heh.. Removing left-behind empty folders was added to my list about a week ago :) You could also optionally define "empty" as "having just a .NFO file left behind".

primüs

26-10-2008 16:28:19

On that, this might be a biggy though, maybe AUTOMATIC de-compression. TVRename finds the folder where the 20 .rar's are, extracts the file, moves it, renames it, gets rid of rar's and the folder :)

Bartdesign

26-10-2008 23:01:24

Heh.. Removing left-behind empty folders was added to my list about a week ago :) You could also optionally define "empty" as "having just a .NFO file left behind".

Hehe, very cool ;) Can't wait to see it in the release.

On that, this might be a biggy though, maybe AUTOMATIC de-compression. TVRename finds the folder where the 20 .rar's are, extracts the file, moves it, renames it, gets rid of rar's and the folder :)

Some downloading program do this on the fly. Like sabnzbd, that unrar's your files automaticlly and will remove the rar files after decompressing. Utorrent has similar functionality, but you'll have to use it with external programs. http://forum.utorrent.com/viewtopic.php?pid=218465

generator

18-11-2008 23:07:04

I would love to see this functionality. This is actually the reason I downloaded this software, and I was very dissapointed to see this wasn't possible (yet).

One tip: I was previously using Natbur Tv renamer. This software is great at this task, maybe you could take a look at that? The only problem I had with that software (and the reason I tried TVRename) is that it doesn't unlock the file before copying. So if the torrent software is still using it (for uploading), the file copy fails.

I hope this feature will be implemented soon!

sstteevvee

23-11-2008 17:24:53

If I was to implement looking inside archives, what formats are the most common? ZIP and RAR? Any others?

Regarding unlocking before copying... If the torrent is still being seeded by (say) uTorrent, TVRename will be able to copy it, but it won't be able to move it. Forcibly unlocking the file that another program is using is bad manners, so I don't really want to do that! I have a clever trick I'm working on to have TVRename modify the .torrent file, before it gets passed to uTorrent, so that the download-to location is correct right from the start - eliminating any need for a copy/move/rename step.

ScoopD

25-11-2008 00:07:10

I have a clever trick I'm working on to have TVRename modify the .torrent file, before it gets passed to uTorrent, so that the download-to location is correct right from the start - eliminating any need for a copy/move/rename step.

Hmmmm Tasty

buzz

14-12-2008 16:09:01

I'm glad I'm not the only one realizing that an automated "finding and organizing" would be useful. I also like to see the cmdline approach so that i could task schedule it. This would save much manual clicking every day or 2.

I use the built in rss downloader in utorrent. And i have it delete the torrent file when adding. not sure if that'll put a kink in your idea. But i think just the automated clicking of the buttons is good enough for now.

buzz

02-01-2009 08:16:42

Any chance for this in the next release? :)

sstteevvee

02-01-2009 17:27:53

The next version I upload will be a final release (i.e. non beta), with a few final bug fixes. I've got a bunch of new features planned in the next few weeks though, among which will be command line control, basic RSS support, and uTorrent magic.

DranDane

14-01-2009 22:05:57

I'm also interested by this automated feature. Also interested by the command line option.

sstteevvee

26-01-2009 16:18:16

Command line stuff is in the latest alpha (2.1.1a2), and you can find the download link here. You'll want to do something like:


tvrename.exe /renamingcheck /renamingdo /missingcheck /fnocheck /fnodo /quit

That will make it check for files needing to be renamed, then rename them, then check for missing files, do a finding&organising check for them, move/copy the files found, then quit. Add "/hide" if you want it all to happen without the window coming up. Have a look at the post in the Releases forum for other command line arguments to export the lists of missing, etc., episodes.

The command line arguments are the same as hitting the equivalent buttons in the program, so will work just as well. If anyone tries it, post back here and let me know how it goes. It's not something I'll be using myself, so feedback from others is good. :)

buzz

04-02-2009 05:54:27

Awesome! Scheduled a task. And working well. Thanks for this. :D

sstteevvee

04-02-2009 23:07:40

Excellent! No problem. :)

bnevets27

23-02-2009 08:43:40

Found a little problem running the command line. If it finds a missing folder it will hang waiting for an input. Maybe you could make it select "create" by default? Then it should run smooth. Oh and it doesn't really bother me but when its transferring files, that window is visible with the /hide command being used.

sstteevvee

23-02-2009 21:32:55

Ah.. I'd forgotten to take care of those dialogs. I'll sort it out soon.

farfromrefuge

24-02-2009 23:22:11

Hi everyone,

Just wanted to let you know about alittle piece of software http://www.nathanm.com/extractnow-development/

The goal of extractnow is to automatically extract all archive in a directory. You can add post process actions like delete archives. So you can use it with utorrent after a torrent finishes. The only problem right now is that if there is no archive to extract, extractnow doesnt close itself. Makes it hard to use it in a script.
You should try it, it s a really good solution for automation.

bnevets27

25-02-2009 16:16:07

Well except what I mentioned above I was able to get it run a couple times. But now it won't run. It just loops now and spits out this:

Error creating window handle.

at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.TextBoxBase.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Form.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Timer.TimerNativeWindow.OnThreadException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at main(String[] args)


I've tried it with the /hide command and with out. I have parallel downloads set to 1. Ok, I ran it again before this post and it ran ok. Ran it again just now and it didn't look like it ran right but didn't get an error output this time. Maybe that output above can help sort it out. Sorry if this is supposed to be in "bugs"

sstteevvee

01-03-2009 23:46:37

Grab the latest alpha (2.1.1a5). I've added a couple of new command line arguments to tell it what to do when the folder isn't there, and the download progress dialog is now hidden if /hide is specified. I've fixed another (silly) bug related to processing the command line arguments, so let me know if it stops that exception from occurring.

Bartdesign

19-03-2009 03:28:37

Awesome ;) Thanks!

Bartdesign

26-03-2009 01:10:08

Ok, quick howto for other people:
If you use sabnzbd, you can attach a default action to your download. Open notepad en paste this in:
@echo off
echo.
"C:\Program Files\TVRename\TVRename.exe" /missingcheck /fnocheck /fnodo /hide /quit
echo [Removal] EMPTY Directories
for /f "usebackq delims=" %%V in (`"dir E:\Downloads /ad/b/s | sort /R"`) do rd "%%V"

Save the file as fno.bat, and configure Sabnzbd to use the script as default script action in the Gui. Also configure SabNZBd to cleanup the following file types: .nfo, .sfv, .par2, .nzb That way you will get a empty directory after the Finding and Organising.

Now after every download, SabNZBD will launch TVrename, check for missing files and do the finding and organising automatically.
After that it will seek for empty folders, and delete them. Hope this helps somebody :)