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

 
  • 0 Vote(s) - 0 Average
imageGrabLite 1.1
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,191
Threads: 958
Joined: May 2006
#51
2012-02-24, 07:25 AM
Sorry I asked for the wrong files I want Plugins\SearchLite\Series\30 Rock.xml

Rob is interesting because if you look on thetvdb it is called ¡Rob! I am not sure what to do about that.

I will see about meta xml, for now, if it is hidden just unhide it before calling imageGrabLite attrib -h "%1"

Martin
ttfitz
Offline

Senior Member

Posts: 285
Threads: 46
Joined: Sep 2008
#52
2012-02-24, 08:45 AM
mvallevand Wrote:Sorry I asked for the wrong files I want Plugins\SearchLite\Series\30 Rock.xml

Rob is interesting because if you look on thetvdb it is called ¡Rob! I am not sure what to do about that.

I will see about meta xml, for now, if it is hidden just unhide it before calling imageGrabLite attrib -h "%1"

Martin

Okay, here's the 30 Rock file.

I'm not sure "hidden" was the right word - I'm talking about the ADS file which NPVR attaches to recordings on NTFS volumes. See http://forums.nextpvr.com/showthread.php...post407189

For now, I have StoreSeparateMetadataXml set to "true" in my Config.xml so I get a separate file (I don't know if I still get the ADS or not, I haven't looked), and that file also lists the filename. I've attached the 30 Rock one just so you can see it.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,191
Threads: 958
Joined: May 2006
#53
2012-02-24, 04:20 PM
@ttfitz, "30 Rock" was failing because your EPG has the original air date for future recordings, mine doesn't. Here is the fix plus a bit more

- fix first run with original air date
- strip alpha numerics for matching with thetvdb (to find ¡Rob!)
- adjust first run lookups to look within week of recording not of current date
- get a new file from thetvdb when the subtitle is "TBA"
- rename inside NextPVR metadata files (but not ADS) likely not necessary for NextPVR

Martin
ttfitz
Offline

Senior Member

Posts: 285
Threads: 46
Joined: Sep 2008
#54
2012-02-24, 10:48 PM
mvallevand Wrote:@ttfitz, "30 Rock" was failing because your EPG has the original air date for future recordings, mine doesn't. Here is the fix plus a bit more

- fix first run with original air date
- strip alpha numerics for matching with thetvdb (to find ¡Rob!)
- adjust first run lookups to look within week of recording not of current date
- get a new file from thetvdb when the subtitle is "TBA"
- rename inside NextPVR metadata files (but not ADS) likely not necessary for NextPVR

Martin

So far so good. This worked manually for both 30 Rock and Rob (once I remembered to delete the skip file previous created), and it did the rename within both the VPrj and the separate metadata file. Just FYI, I checked one of my recent recordings made with the StoreSeparateMetadataXml flag set, and NPVR apparently does both the separate file and the ADS when this flag is set. Don't know if anything uses that ADS information, so I don't know if it matters that the filename is different there.

Thanks for the help, I really like this add-on. And I'll let you know if anything else pops up.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,191
Threads: 958
Joined: May 2006
#55
2012-02-25, 02:02 AM
Thanks for testing and following up. I should have an update to deal with renaming US/UK variants like "Being Human" tomorrow.

Martin
ttfitz
Offline

Senior Member

Posts: 285
Threads: 46
Joined: Sep 2008
#56
2012-02-26, 08:57 AM
mvallevand Wrote:Thanks for testing and following up. I should have an update to deal with renaming US/UK variants like "Being Human" tomorrow.

Martin

Looking forward to it. So far everything has been working great.

One last question/request - any chance imageGrabLite returns an errorlevel? And if it doesn't, any chance it could to indicate it wasn't able to rename the files? I've got some stuff I'd like to do after running it, but only if it was successful in renaming. I guess I could just compare the filename to the original name, but it seems cleaner to check for an error.

Thanks again.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,191
Threads: 958
Joined: May 2006
#57
2012-02-26, 04:48 PM
ttfitz Wrote:One last question/request - any chance imageGrabLite returns an errorlevel?

I considered an errorlevel, but there are many states where a rename will fail that aren't errors

- file has a skip file
- file not on thetvdb or thetvdb\network\internet not available
- file(s) already renamed
- file in use

Instead when successful I will return the new filename which you should be able to process.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,191
Threads: 958
Joined: May 2006
#58
2012-02-26, 05:06 PM
Here is an update to imageGrabLite that takes a few new features was working on in GUI version and a couple of other things

1. Special cases American spinoffs that are named "Series Name (US)" on thetvdb. This check will be the default in the North American time zones. It is also possible to properly name episodes if you are recording both the original and spinoff let me know if you want this documented. Here "Being Human (UK)" and "Being Human (US)" are on each week but I couldn't find any other current examples.

2. Uses Plex style renaming of back-to-back episodes which are combined into on in the EPG. An example is the forthcoming episode of Alcatraz with the subtitle "The Ames Bros.; Sonny Burnett" This is really two episodes S01E09 and S01E10 so the proper name by Plex rules is Alcatraz.S01E09-E10.The Ames Bros.; Sonny Burnett.ts". Unfortunately the thetvtb has it wrong right now (they swapped the episode numbers and called the second episode "The Ames Brother" which is why users who want to use thetvdb should contribute time to help keep it accurate.

3. Returns the new filename if the rename is success. To use this in a batch file try something like this

Code:
set newfile=
FOR /F "tokens=*" %%i in ('imageGrabLite --oid %3 --zap2it --rename') do SET newfile=%%i
if not exist "%newfile" goto end
echo %newfile
:end

4. Misc tweaks and changes

Martin
ttfitz
Offline

Senior Member

Posts: 285
Threads: 46
Joined: Sep 2008
#59
2012-02-26, 06:23 PM
mvallevand Wrote:I considered an errorlevel, but there are many states where a rename will fail that aren't errors

- file has a skip file
- file not on thetvdb or thetvdb\network\internet not available
- file(s) already renamed
- file in use

Instead when successful I will return the new filename which you should be able to process.

Martin

Well, except for the skip file one, to me those are all errors - not your fault, but still it didn't do what it was expected to do, so an error. Even the skip file one could be seen in some cases as an error, like with Rob for me, since the program created the skip file in the first place. Different errorlevels could be returned for different circumstances, which could be trapped or processed by the user (for example, right now I added testing to make sure comskip has finished before I call imageGrabLite, and haven't had any of the "file in use" problems I had run into before).

Okay, so if you were able to rename, it returns the new name. But what if you couldn't?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,191
Threads: 958
Joined: May 2006
#60
2012-02-26, 07:19 PM
ttfitz Wrote:Well, except for the skip file one, to me those are all errors - not your fault, but still it didn't do what it was expected to do, so an error. Even the skip file one could be seen in some cases as an error, like with Rob for me, since the program created the skip file in the first place. Different errorlevels could be returned for different circumstances, which could be trapped or processed by the user (for example, right now I added testing to make sure comskip has finished before I call imageGrabLite, and haven't had any of the "file in use" problems I had run into before).

Okay, so if you were able to rename, it returns the new name. But what if you couldn't?

I guess it's really of question of what you'd want to do with all those errorlevel values after processing the file and give some explanation why it would be important. As you wrote "if not exist "%1" will tell you if it didn't work and posted code on how to handle the new name. if you wanted to expand it to do further processing maybe change it to things like these

Code:
set newfile=
FOR /F "tokens=*" %%i in ('imageGrabLite --oid %3 --zap2it --rename') do SET newfile=%%i
if exist "newfile goto  nextstep
set newfile=%1
:nextstep
dostuff %newfile

or

Code:
set newfile=
FOR /F "tokens=*" %%i in ('imageGrabLite --oid %3 --zap2it --rename') do SET newfile=%%i
if not exist "%1" goto  nextstep
rem nscripthelper %1 etc
:nextstep

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Considering dropping support for imageGrabLite mvallevand 8 4,321 2016-01-08, 08:23 AM
Last Post: liteswap
  imageGrabLite 1.2 mvallevand 90 37,089 2013-10-04, 10:00 PM
Last Post: johnsonx42
  imageGrabLite Beta mvallevand 84 62,336 2013-10-04, 06:40 PM
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