NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) ZTools and UltraXMLTV v
« Previous 1 … 7 8 9 10 11 12 Next »
ZRename - Beta COMPLETE!

Thread Closed 
 
  • 0 Vote(s) - 0 Average
ZRename - Beta COMPLETE!
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#1
2007-05-01, 05:13 AM (This post was last modified: 2007-05-23, 06:05 AM by zehd.)
Introducing yet another Post-Processing Recording Renamer...

[SIZE="5"]ZRename[/SIZE]

Edit: This page has been unstuck. For most current information please see the wiki page
http://gbpvr.com/pmwiki/pmwiki.php/Utility/ZRename

The key feature of this utility is skimming the epguides.com and extracting a season and episode number, to be used in file naming...

It uses epguides.com to check episode information. It compares some information to data from Zap2It. This is kinda North America oriented, but I will try to incorporate information from other regions of the world in later releases...

Since this is a beta, I would suggest using ZRename on a couple of files Manually.. (that means not from the postprocessing.bat)

[SIZE="4"]Install[/SIZE]

Unzip the two files in this zip into your '...Third Party\ZRename' folder. Create it if it doesn't exist.

ZRename assumes:
  • that you will also have sqlite3 in the same directory as itself
  • GB-PVR is located c:\Program files\devnz\gbpvr. If it isn't, when you have ZRename expanded, double-click on the GB-PVR folder and find the .db3 file

  • Also, there may be some trouble if you do not have I-XMLTV installed. I haven't had a chance to uninstall it and test it with the default Zap2it data.

[SIZE="4"]First Run[/SIZE]
[ATTACHMENT NOT FOUND]

When you open ZRename you will see a fairly lean GUI. In manual mode, it just sits and waits. Double-click the Input File text box and you can browse to a recorded file that GB-PVR has just recorded, and is also still in the database.

I've done that with an episode of 'Star Trek Enterprise'. After I selected it,

  1. it automatically checked the database for the episode title,
  2. checked the internet for a match on the episode title,
  3. and then retrieved Season and Episode values.
  4. Finally, it previews the new filename,
  5. building it with the Program Title, Season and Episode number, and Episode Title.

Clicking 'Commit' will rename the file and adjust the reference in the GB-PVR database.

If you click the 'more' button

[ATTACHMENT NOT FOUND]

You'll see a few checkboxes. Here's what they mean...

Episode Number Lookup - unchecked will defeat the internet lookup and use the Air Date if available...

No Spaces in Filenames - This is something that seems to be a standard with sharing files, no spaces means no silly troubles with long file names

Ep Num in Caps - Just to be neat, the whole season and episode number is the same size letters to numbers...

I know that many people will be wanting to have some modifications to formatting. I will try to work it out. Here's some reasoning for a couple of conventions already in place.

It may be a Canadian thing to have a date start with a year. (It took me years to feel comfortable with that) but when you have Year - Numeric Month - and Day, files will automatically sort in ascending order.

There are other ways of representing the season and episode number but SxxExx is very common. Another is SxEE (2x12 - Season 2, Ep 12). I will be adding the option to choose between the two most common type...

[SIZE="4"]PostProcessing.bat[/SIZE]
If you feel that it's doing a good job and you want to start using it in the PostProcessing.bat, here's the syntax....

Code:
"C:\Program Files\devnz\gbpvr\Third Party\ZRename\ZRename" %1

Place this anywhere that the file extension does not change (eg with a transcoder, from mpg to avi)

If you are going to transcode from mpg to avi for instance, you will have to do some fancy batch file wrangling, or you can wait a bit while I integrate ZRename into ZProcess. It's my intention to have ZProcess take care of all the file renaming as it steps through all the processes...

[SIZE="4"]Good luck[/SIZE]

Latest build in last post...
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#2
2007-05-02, 02:28 AM (This post was last modified: 2007-05-02, 04:32 AM by zehd.)
Daily release: 1.0.34

Fixed:
  • Verified that if there's no data available and no valid filename can be created, you cannot rename file
  • All shows that start with "The " will have the "The " removed before starting epguides.com (they don't use the the thes...)
  • Semi colons create bad filenames. Hardcoded replace with period or space, depending on "No Spaces in Filenames"
  • Hardcoded fudge where '24' epsiode information have times without space between '0' and AM or PM. (2:00AM) Insert space to conform to epguides format.
  • If ZRename is unable to get an Air Date, as a last resort it will use the Recording Date
  • If by fluke you have the same show, with the same episode information, you would have a conflict in renaming. Now, there are three choices for the conflict: Cancel, Overwrite, and Incremental Filename.


I have still not tested with system that do not have I-XMLTV installed, but OZ says it's OK, just don't have an Air Date...
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#3
2007-05-02, 04:30 AM (This post was last modified: 2007-05-03, 12:28 AM by zehd.)
Daily release: 1.0.40

Tweaked to work properly with PostProcessing.bat
This sample is set to be THE PostProcessing.bat, located in the GB-PVR folder...

sample: (a copy of this is also in the zip file)

Code:
@echo off

echo "%~dpn1.mpg"

pause

comskip "%~dpn1.mpg"

call comclean "%~dpn1.mpg"

".\Third Party\FFmpeg\ffmpeg.exe" -y -i "%~dpn1.mpg" -deinterlace -b 2400k -vcodec mpeg4 -ab 224 -ar 48000 -acodec mp3 -ac 2 -s 640x480 -f avi -vtag XVID -aspect 4:3 "%~dpn1.avi"

rem del "%~dpn1.log"
rem del "%~dpn1.logo.txt"
rem del "%~dpn1.txt"
rem del "%~dpn1_original.mpg"
rem del "%~dpn1.mpg"

call ".\Third Party\ZRename\ZRename.exe" "%~dpn1.mpg"

Pause

ZRename is written to check to see if, besides the original MPG, there is also an AVI file with the same name. It adjusts the paths to reflect the avi extension and updates the database with the avi...

ZRename must be the last process in the list, and no other process should modify the original MPG filename, until it's time for ZRename to do it...

Also, ZRename will batch rename all similarly named files, so that SRT, SMI, and comskip.txt files will still work even with the newly named file
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#4
2007-05-03, 12:28 AM (This post was last modified: 2007-05-03, 04:40 AM by zehd.)
Daily Release 1.0.41

More tweaking as per: http://forums.nextpvr.com/showthread.php?t=26492

Still can't handle accents and other extended character sets characters. However, the only thing that will happen is ZRename will not be able to query the internet. It will default to creating a filename based on the date.
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#5
2007-05-03, 04:39 AM (This post was last modified: 2007-05-05, 02:42 AM by zehd.)
Daily release 1.0.49

When there are accented letters in the episode title, there is a conflict between codepages: the results from a Sqlite3 query are not on the same page as VB6 internal processing. Accented characters look like gibberish...

This version fixes it. It should handle most if not all accented characters in Western European languages at least. Maybe more. (I'm not a linguistic scholar)
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#6
2007-05-05, 02:42 AM (This post was last modified: 2007-05-05, 06:32 PM by zehd.)
Daily release 1.0.61

In this release I have changed the way I access the sqlite db. Now you will require to also copy a dll into the ZRename folder...

I have fixed the western accented character issue.
Hardcoded a difference between '24' episodes' reference to midnight (12:00 AM)

And it seems that there was a difference between using IXMLTV and not. So there is a checkbox to check...

I don't know if anyone likes this, but I have also added a flag, so if there has been no original air date found, and the day of recording is used, I have prepended a 'REC.' The file name would look like this..

A.Charlie.Brown.Christmas-(REC.2006-12-17)-.mpg

I'd love feedback on that one...

Anyway here's the zip copy all files including the new dll into the ZRename folder...
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#7
2007-05-05, 06:32 PM (This post was last modified: 2007-05-14, 04:12 PM by zehd.)
Daily release 1.0.64

This should work well with both Standard Zap2it EPG and Default installed I-XMLTV

What follows is an explanation why I think I-XMLTV is better...

Code:
Zap2it:
Programme: Star Trek Enterprise
Sub_title: Similitude
Description: Dr. Phlox clones Trip after he is severely injured in an accident that disables the ship inside a hazardous space cloud.

Code:
IXMLTV:
Programme: Star Trek Enterprise
Sub_title: 062- Similitude
Description: (2003-11-19) Dr. Phlox clones Trip after he is severely injured in an accident that disables the ship inside a hazardous space cloud.

ZRename will work both these records. But with I-XMLTV, it captures and strips the productions number and original air date from the sub_title...

If there is no ProdNum or Airdate, it pulls it off the HTML. In this way, we can get a ProdNum or Airdate whether I-XMLTV or Zap2it.

So far so good. ZRename has been programmed to roll with either so far...

But all this depends on the Programme name AND the sub_title (Episode name to be unique. This is not the case always...

From Epguides these two episodes of 'Star Trek: Enterprise' are unique

94. 4-18 094 22 Apr 05 In a Mirror, Darkly (1)
95. 4-19 095 29 Apr 05 In a Mirror, Darkly (2)

But in the Zap2it EPG the Episodes are both
'In a Mirror, Darkly'.

With I-XMLTV they are
'094- In a Mirror, Darkly'
'095- In a Mirror, Darkly'

I personally don't like the production numbers in the episode titles, so I strip them, but I store them first, so when I search the HTML, I can differentiate between the (1) or (2)

The same goes for the Original Air Date that I-XMLTV displays in the description. It is stored and stripped, and used in building the New Filename...

---

A show like "A Charlie Brown Christmas", with no episode title, production number or original air date would default to...

Code:
With 'Last Resort: Use Record date' checked
C:\TV\Recorded\A Charlie Brown Christmas\A.Charlie.Brown.Christmas-(REC.2006-12-17)-.mpg

With 'Last Resort: Use Record date' unchecked
C:\TV\Recorded\A Charlie Brown Christmas\A.Charlie.Brown.Christmas.mpg

---

Shows like 'The Unit' will be displayed as 'The Unit' though epguides website will have the 'The' stripped
Shows like 'The O.C.' will be displayed as 'The O.C.' though epguides website will have the 'The' stripped and the extra characters like '.' removed...

'24' has the most hard coding. The convention for the episodes names changes day by day. Currently here are the changes

12:00 Midnight is changed to 12:00 AM
xx:00 A.M. has periods removed
xx:00AM has space inserted between 0 and A (or P)

This should be good for most of Season 5 and current Season 6. Unfortunately, if you have a look at the crazy naming convention that they use, you'd see that I would be spending a lot of time just for one TV show. Might be better getting the epguides folks to straighten it out. (though I think its FOX fault...

---
If anyone sees a bug, it may need a hardcode fix. Things like the "The " bug or Trailing Periods affects other shows too... ('The O.C.' and 'Andy Barker, P.I.' are both affected)

Please let me know so I can update the hardcoding.

Edit: 1.0.64 will take one more stab at getting season and episode even if the convention of the title is off. It will match only on prod num. That means that you have to have a Production Number, and Currently only I-XMLTV provides that...
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#8
2007-05-14, 04:12 PM (This post was last modified: 2007-05-22, 03:20 AM by zehd.)
Daily release 1.0.74

I caught a couple of bugs...

Names with apostrophes are now processed.

When in automatic mode (called from PostProcessing.bat) ZRename wasn't waiting for the download and parsing of the epguides html, before it renamed the file. It was using the wrong filename...

Now it waits properly...

Fixed redundancy. Now it's a third faster.
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#9
2007-05-22, 03:20 AM (This post was last modified: 2007-05-22, 08:31 AM by zehd.)
Daily Release 1.0.76
  • There was some difference between Manual and Automatic on how it would update the database. Now it's the same...


  • Input file can be any file extension. Output file extension will be the same extension as input extension (before it assumed MPG) Should now work with whatever extension is used, so long as there's a reference in the database including episode title...


  • In case an MPG is transcoded to an avi, but the db wasn't updated yet, ZRename will now search for either mpg or avi. This will make ZRename rename properly, in spite of file being transcoded first...


  • Made logging a bit easier to read, and discern between automatic and manual modes, and log if file rename was cancelled (Not Commited)


  • Added checkbox to force 'abort' if there was no information gathered, and file is endangered being named too generically... (eg c:\Star.Trek.mpg...)
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#10
2007-05-22, 08:31 AM (This post was last modified: 2007-05-23, 02:17 AM by zehd.)
Daily Release 1.0.79
  • A few more tweaks. Hard coded patch for semicolons in filename (season finale of 24 has two episodes int the same title separated wit semicolon)


  • Fixed incremental conflict resolve...
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Beta: UltraXMLTV Post-Process Renamer zehd 25 22,379 2011-11-14, 06:18 AM
Last Post: Ski098
  UltraXMLTV does not complete from UpdateEPG.bat agerdin 0 4,871 2011-11-01, 07:19 PM
Last Post: agerdin
  UltraXMLTV - New Beta zehd 46 31,137 2010-11-17, 09:08 PM
Last Post: zehd
  UltraXMLTV Enhancer Version 2 - Beta zehd 515 96,781 2009-04-04, 01:08 AM
Last Post: zehd
  Will ZRENAME rename all files associated with the mpeg? dvasco 2 2,014 2007-10-17, 02:16 AM
Last Post: dvasco
  ZProcess Beta with dvr-ms center cut support zehd 7 3,177 2007-09-24, 04:08 PM
Last Post: zehd
  ZSchedFix Beta Support and Suggestions zehd 54 14,984 2007-07-23, 04:18 AM
Last Post: zehd
  ZRename is failing zehd 0 1,588 2007-07-16, 04:00 PM
Last Post: zehd
  ZRename error Hinde01 1 1,837 2007-07-02, 12:29 AM
Last Post: zehd
  zrename download -Oz- 1 2,107 2007-06-11, 05:37 AM
Last Post: zehd

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

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

Linear Mode
Threaded Mode