hey thanks for the compliment, glad you like addepisode...
the sq lite error is something i don't have control over. I have had the database lock on me in the past, and the only way i found to fix it was to restart the recording service. I also do not know what causes the database lock, so it may or may not have anything to do with addepisode. If anyone knows what causes this error, please let me know!
As for the error pop up, that shouldn't be happening. I have added in a graceful exit (no pop up) to addepisode for this specific error and have uploaded the fixed script to the regular place. Incidentally, this error should only be coming up when addepisode is run on a file that does not have the original file name produced by gbpvr, ie: "show name_date of recording_start and end time.mpg" (addepisode pulls the date from the filename to be faster)
Thanks for the bug report, let me know if you have any more problems!
hobdes Wrote:I've written a little script to capture the newly generated filename to an environment variable for additional postprocessing.
I haven't completely tested it yet so use with caution.
Here it is:
-----------------------------------
@echo off
:: addepisode.bat
:: Runs addepisode.exe (in current folder) and then grabs name of newly created file
:: and stores in environment variable addEpisodeFile.
addepisode.exe "%~1" "%~2"
:: get newest file (should be renamed one) and store in variable addEpisodeFile
for /f "delims=" %%A in ('dir /b /s /a-d /od *%~x1') do (
rem echo %%~nxA
set addEpisodeFile=%%~nxA
)
rem echo %addEpisodeFile%
-----------------------------------
Help. Just the tool I wanted, if only I could get it to work. Downloaded it on 5th Jan - don't know what version it was. Ran it from the command line and hard coded the filename just to get it working i.e.
addepisode.exe "e:\TV Recorded Progs\The Simpsons_20070104_18001830.mpg" "{show}{[ _ ]}{episode}{[ _ ]}{year}-{month}-{day}"
It worked the first time, but I can't get it to work again (on other episodes of the simpsons which are hard coded by cutting and pasting from explorer into above batch file). I don't see any error messages, the addepisode.log has not changed, it still reports the first success. I have restarted the pc a few times. I have made the token to just be {show}. Still no success.
What am I doing wrong ?
PS. It would be nice to have some log messages to aid debugging.
Asus P5B mobo, Core 2 Duo E6600, 2Gig mem, 500Gb HD, NVidia 7600GS, Hauppauge Nova-T pci x 3, WinXP Pro
Addepisode was not built to be run from a command line, but from postprocessing.bat immediately after the file has been made. As such, it will only work if the file is named as gbpvr named it, and if there is a reference to it in the gbpvr database, since that is where all of this metadata is stored.
From the situation you are describing, i would say that the files you are trying to rename are no longer in the gbpvr database. Is this correct?
From the situation you are describing, i would say that the files you are trying to rename are no longer in the gbpvr database. Is this correct?
That's just the problem. All the files are still named as recorded by gbpvr (except the one success), and are still in the database - I had a quick look to check if addepisode had changed the info in the db, but hadn't renamed the file.
It is almost as if addepisode isn't being run, but I've added a couple of dos 'dir' commands around the addepisode line in the batch file used to run addepisode. The 'dir' commands are run ok. I still can't understand why it worked once and hasn't worked again. I have tried to rename a couple of other recordings which have nothing to do with the simpsons, just in case there was some subtle difference, but that hasn't worked either. Hmmm I'm stuck.
Do you think it could be something damaged in my db. I have tried to upload a zip of the gbpvr.db3 file to attach to this reply, but it keeps failing. Will try again later just in case you can spot why it won't rename 'T4The Simpsons_20070105_09551025.mpg'.
It would be nice to a log message in addepisode to just show it is being called.
Asus P5B mobo, Core 2 Duo E6600, 2Gig mem, 500Gb HD, NVidia 7600GS, Hauppauge Nova-T pci x 3, WinXP Pro
I am sure addepisode is running, and is coming across some error, and exiting. I did not spend the time to add in comprehensive error handling, basically because it would be a lot of boring work that i would rather spend making the functions work right in the first place.
Are you running addepisode from postprocessing.bat? (It sounds like you are not) If you havent tried that, try it and see if it works with a new recording. That will narrow it down for us.
Do you have sqlite.exe in the gbpvr directory?
If you figure out a way to get me your database, I would be happy to look at it and debug...if the forum wont let you, pm me and ill send you my email addy.
I have put addepisode to postprocessing.bat and it works. I have echoed stuff from postprocessing.bat to a log file to check params for addepisode etc. and it doesn't seem to do anything different from my addepisode.bat file that I tried to run from a dos cmd window. Shame the addepisode.bat file doesn't work because I wanted to change all my existing recordings. Particularly my sons simpsons recordings, to make it easy to delete duplicates. Will have to leave it.
For your info, I have found a problem. I guess this is as expected....when watching a program which is currently recording, the program does not appear on gbpvr. Probably because addepisode changes the name in the db, but the filename rename fails because the file is in use. This is a problem for me because I watch quite a few progs like this.
Also, the program name in the file metadata data stream which contains the original filename is not changed to match the new filename. I'm not sure, but I think this info is used by the utility (can't remember it's name, and can't find on wiki) to recreate the recording-dump.xml data to re-import all the recordings back into the database if the database is damaged. Haven't had to use this yet, but could be a problem if I wanted to. (Use notepad <filename>.mpg:metadata.xml to view stream data).
The above aren't complaints. Well done, but I think the timeslip problem means I can't use it.
Asus P5B mobo, Core 2 Duo E6600, 2Gig mem, 500Gb HD, NVidia 7600GS, Hauppauge Nova-T pci x 3, WinXP Pro
Like many others, I need to use PostProcess.bat, but I also wish to rename the recording to include Episode. I would like to propose a way to return the new recording name back to the PostProcess.bat.
In your addepisode.au3, if you change the recording name:
FileWriteLine(@ScriptDir & "\NewFileName.bat","Set new=" & $NewFileName)
then in PostProcess.bat an example:
@echo off
set new=%1
addepisode.exe %1 "{show}{[-(]}{episode}{[)]}-{monthnameshort}-{day}-{yearshort}"
if NOT EXIST NewFileName.bat goto nonew
call NewFileName.bat
del NewFileName.bat
:nonew
"D:\Program Files\AutoXvid\AutoXvid.exe" %new%
If your program creates the NewFileName.bat, my program gets the new name.