NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 2 3 4 5 6 56 Next »
imageGrabLite 1.2

 
  • 0 Vote(s) - 0 Average
imageGrabLite 1.2
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,089
Threads: 957
Joined: May 2006
#61
2013-09-23, 03:55 PM
johnsonx42 Wrote:Can you enhance the rename functionality so that it updates the filename in the PLAYBACK_POSITION table too?

I've thought about it but your use case is tough because iGL will fail if the file is in use. Since iGL renaming is more for archival and later viewing outside NextPVR (the Recordings view is not filename aware). I doubt many people watch 15 minutes, and then want to start from the resume point after it moved from recent recordings. More likely this is for external viewing in Plex and XBMC and they don't use the resume point anyway.

I think a better thing to do after the Recordings View is season/episode aware and sortable is for me to update the season/episode fields in the recordings database since this is not locked during playback. I'd love a season view in Recordings.

Martin
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#62
2013-09-23, 04:16 PM
I already have code in my script that waits until the file is closed before calling IGL.

here's the tail end of my ParallelProcessing.bat (this portion doesn't run until Comskip and therefore the recording is finished):
Code:
:makename
REM I used to have a long sequence of commands to build a new name here, but now imagegrablite does all that

REM ok, ready to rename the file... but first check to make sure no one is watching it!
REM try renaming the file to the same name, see if gets an error
echo checking if %1 is open >>"%~dp0\recording.log"
:checkopen
ren %1 "%~nx1"
if errorlevel 1 goto waitandcheck
echo %1 wasn't open >>"%~dp0\recording.log"
goto rename
:waitandcheck
REM if we got here, the rename failed so wait a minute and try again
echo %1 still open, waiting 1 minute >>"%~dp0\recording.log"
sleep 60
goto checkopen

:rename
REM finally, all is clear.  run imagegrablite against the file
echo %date%,%time% - renaming oid %3, file %1 >>"%~dp0\recording.log"
"c:\program files\npvr\imageGrabLite.exe" --oid %3 --rename --zap2it >>"%~dp0\recording.log"

REM now grab the log output and save it for possible later examination
type "c:\users\public\npvr\logs\imageGrabLite.log" >> "%~dp0\recording.log"
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,089
Threads: 957
Joined: May 2006
#63
2013-09-23, 04:31 PM
johnsonx42 Wrote:I already have code in my script that waits until the file is closed before calling IGL.

Understood, but I expect that is normally not how it is run and all hell could break loss if someone watches and deletes the file.

Martin
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#64
2013-09-23, 05:07 PM
I guess I'm just not understanding where the problem could come from. You're already updating the filename in the SCHEDULED_RECORDINGS table, why would doing the same in the PLAYBACK_POSITION table pose any problem? You're right, in most cases there'll be no record to update because no one will have been watching the recording yet, but if the record is there I can't see any downside to updating it.

It's your program though....
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#65
2013-09-23, 05:11 PM
You could probably use NScriptHelper in your batch file to do what you want. I haven't really looked at NScriptHelper to know for sure though.
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#66
2013-09-23, 05:16 PM
Nscripthelper doesn't update the PLAYBACK_POSITION table either, and certainly has no separate command to update just that table for a recording that's already been renamed by another utility.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,089
Threads: 957
Joined: May 2006
#67
2013-09-23, 05:59 PM
johnsonx42 Wrote:I guess I'm just not understanding where the problem could come from.

It isn't going to be a problem in your world, but it could with others not running your script. I don't really want to add yet another command line option for something like this.

iGL does return the renamed filename to stdout http://forums.nextpvr.com/showthread.php...post432106 so you should be able to enhance your script to use sqlite to update the PlaybackPostion table yourself, if you need a hand with this let me know.

Martin
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#68
2013-09-23, 07:37 PM
I can't help but think we're talking about two different things, because I can't fathom a scenario where doing what I want would create a problem no matter what the use case or method, nor can I imagine why it would need to be another command line option. If a playback_position record for a given file is present, what possible reason could there be NOT to update it when the scheduled_recording record is updated? Why would you want an invalid playback_position record to remain for a filename that no longer exists?

However, you've made clear that you don't want to add this functionality and I've no right to hassle you further over a program you provide for free.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#69
2013-09-23, 07:55 PM
I have to say I'm with johnsonx42 on this.
If iGL renames a file, it should really update all references to the old file name in the database, not just some of them (and thereby leaving orphan records in the playback_position table ad infinitum)
I think Sub fixed this same thing in Nscripthelper

http://forums.nextpvr.com/showthread.php...st-2012%29
"- when renaming recordings with NScriptHelper.exe, it will now also update the playback position history to reflect the new filename."

just my 2c, I am not aware of being affected by this issue myself and really value having iGL in my system. tx
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#70
2013-09-23, 08:05 PM
thanks gEd for pointing out sub has updated NScriptHelper already. I had asked for this change a long time ago when I used to roll my own re-name, but didn't notice he'd done it.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (10): « Previous 1 … 5 6 7 8 9 10 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Considering dropping support for imageGrabLite mvallevand 8 4,211 2016-01-08, 08:23 AM
Last Post: liteswap
  imageGrabLite Beta mvallevand 84 61,955 2013-10-04, 06:40 PM
Last Post: mvallevand
  imageGrabLite 1.1 mvallevand 118 42,724 2012-08-30, 11:25 AM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode