NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 28 29 30 31 32 … 93 Next »
Rename Recording

 
  • 0 Vote(s) - 0 Average
Rename Recording
David
Offline

Senior Member

Posts: 435
Threads: 18
Joined: Oct 2005
#221
2006-06-16, 04:01 PM
turkey Wrote:Sure, I can do this. Do you just want it to rename to the show name, or do you want anything else added on like the date or time? While I'm asking, is there any other function that anyone wants that I should add to this utility?
Actually, I need the "Episode Name" only, which was the default of renamerecording. Renamerecording added the -t parameter to get "show name_episode name", like your utility does. I'd be happy with a single -e to get episode only.

If you could make the command line switch accept a format string, then you would probably satisfy a lot of people at once, but I am sure this would be a bit of programming work up front. Maybe something like:

addepisode.exe -f sn_ep_ddmm %1

Where:
sn = showname
ep = episodename
dd = two digit day of recording
mm = two digit month of recording
David

PVR PC: Win2K3, Athlon x2 64 4600+, 1280MB Ram, 40+400 GB HD's, Gigabyte Network
PVR-250, ATSC-110 digital x2, GBPVR v1.3.7 w/SQLite DB
Extras: Addepisode 41, Comskip 79.46, EWA 76, Zaptools

DSM-520 (D-Link Media Lounge) FW 1.04 using TVersity Media Server 0.9.11.4
DSM-320 (D-Link Media Lounge) FW 1.09
MediaMVP

More specs
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#222
2006-06-16, 10:51 PM
I have uploaded the newest version of addepisode.exe to this post.

I have added in the ability to rename to only the episode name if it exists. Also, I have added a switch to keep a log file of each file renamed, as well as some of the sqlite errors if they come up. Also, I have cleaned up the code a bit. See this post for the command line switches and format.
b00sfuk
Offline

Senior Member

Posts: 319
Threads: 26
Joined: Mar 2005
#223
2006-06-18, 09:11 PM
New version working well but had a problem tonight with it failing to update the database. I.e. I had a correctly renamed file in the recording directory but the programme had disappeared from the database. Also had this in the log, can only think it had something to do with the episode name having a quote in it:

[SIZE="2"][SIZE="1"]$iRval<> $SQLITE_OK , $sOutput=
Incomplete SQL: UPDATE RECORDING_SCHEDULE SET filename= 'E:\CAPTURE-DIRECTORY\Supernatural - Devil's Trap.mpg' WHERE ROWID= 5;
commit;
E:\CAPTURE-DIRECTORY\Supernatural_20060618_21002200 Renamed to E:\CAPTURE-DIRECTORY\Supernatural - Devil's Trap at 22:01 06/18/2006[/SIZE][/SIZE]


Cheers
Silverstone LC10M with iMON
Gigabyte 780G+4850e, AMD 6570
Blackgold BGT3620, Harmony 555 Remote
Win7 32-bit, SAF
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#224
2006-06-18, 11:09 PM
b00sfuk Wrote:it had something to do with the episode name having a quote in it:

You are correct, thanks for finding this problem. I have added two things to the utility that will help in this and similar situations. First, I have made it so apostrophes (') are stripped from the episode name. I am fairly sure that GBPVR strips them from the regular file names, so I think this is an acceptable option.

Also, I have added in a check to see if the database has been updated correctly before renaming the file. Now the utility checks to make sure both the file can be renamed properly, and the database can be updated properly.

Hope everything works well for a while, as I will be away from my computer for a few days. Keep posting any problems you are having, and I'll fix them when I get back.

Get the new version here.
a_dee
Offline

Junior Member

Posts: 3
Threads: 0
Joined: Jun 2006
#225
2006-07-03, 01:11 AM
Just hit this problem when recording an episode containing ? in the file name. See the log below:

RenameRecording v1.1 build20051223
Title: CSI Crime Scene Investigation
Argument: -t D:\My Videos\Recordings\CSI Crime Scene Investigation\CSI Crime Scene Investigation_20060702_16001700.mpg
Episode name: CSI Crime Scene Investigation - Paper or Plastic?
Episode Oid: 194
System.ApplicationException: Error renaming program 'D:\My Videos\Recordings\CSI Crime Scene Investigation\CSI Crime Scene Investigation_20060702_16001700.mpg' to 'CSI Crime Scene Investigation - Paper or Plastic?' (oid 194) ---> System.ArgumentException: Illegal characters in path.
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.FileInfo..ctor(String fileName)
at RenameRecording.RenameRecordingClass.RenameRecording(String sEpisodeName, Int32 iEpisodeOid)
--- End of inner exception stack trace ---
at RenameRecording.RenameRecordingClass.RenameRecording(String sEpisodeName, Int32 iEpisodeOid)
at RenameRecording.RenameRecordingClass.RenameRecordingTitle(String sEpisodeName, Int32 iEpisodeOid)
at RenameRecording.RenameRecordingClass.DoMain()
System.ArgumentException: Illegal characters in path.
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.FileInfo..ctor(String fileName)
at RenameRecording.RenameRecordingClass.RenameRecording(String sEpisodeName, Int32 iEpisodeOid)
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#226
2006-07-08, 10:20 AM
Hi.... Is there any information available in the zap2it xml, or even the extended data, that indicates the season number and episode number of a tv show?

A lot of rips have filenames like: lost.s02e04.avi

I just wondered if someone knew before I started trying myself...
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]
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#227
2006-07-08, 12:53 PM
zehd Wrote:Hi.... Is there any information available in the zap2it xml, or even the extended data, that indicates the season number and episode number of a tv show?

This information is not available from zap2it.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#228
2006-07-08, 03:57 PM
Hah I think I might have to parse epguides.com
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]
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#229
2006-07-08, 04:06 PM
zehd Wrote:Hah I think I might have to parse epguides.com

That's the way to do it. I do a similar thing on my gbpvr system, but I have been reluctant to release it to the public because I am not quite sure about the how the owners of the television information websites like epguides.com would react. However, if you would like to use my utility "addepisode" to rename the file once you have the data on your computer, I would be happy to give you a version that has the ability to add in the episode and season numbers. Let me know if your interested, and i'll give more details.
Jim_
Offline

Senior Member

Posts: 696
Threads: 21
Joined: Dec 2005
#230
2006-07-08, 04:32 PM
zehd Wrote:Hah I think I might have to parse epguides.com

Actually Zap2It sends an onscreen episode-number field that contains that information. Some shows (like the example below) give the season “8” and episode number “06” but others just give the episode number.
<episode-num system="onscreen">806</episode-num>

TVGuide Supercharger adds the EP number to the beginning of the subtitle, so RemaneRecording uses it in the filename by default.
If a subtitle doesn’t exist, the Original-Air-Date is also added to the subtitle so the filename ends up looking like this.
Fear Factor - 305 - (2002-10-14).mpg

I have a feeling we're all thinking along parallel lines.
Using the actual EPG entry, it would be possible to define the filename based on all the Zap2It information sent, not just the fields saved in the GBPVR database. Or save a txt file with extended information like cast and crew.
[SIZE="1"]HP e9240f| Phenom II X4-945| Radeon HD4650 1-gig | 8 gig ram | Blu-Ray
Windows 7 64bit | 1TB system | 1.5TB Recordings | 3-TB Library
HDMI >> Sony 40" 1080p LCD TV
HVR-2250 | HVR-1290 | WinTV PVR USB2 | WinTV HD-PVR | GBPVR 1.4.7[/SIZE]
Projects: I-xmltv (Unsupported at this time) |
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (31): « Previous 1 … 21 22 23 24 25 … 31 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 728 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 486 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 1,151 2023-11-09, 02:14 PM
Last Post: mvallevand
  Recording direct to GPhotos API rgonzalez 0 1,530 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 3,087 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 14,609 2019-08-15, 09:34 PM
Last Post: sub
  Unexpected result when deleting a pending recording scJohn 5 3,910 2018-05-06, 10:09 PM
Last Post: sub
  How to best verify success when adding a recurring recording drmargarit 1 2,891 2017-03-02, 03:13 PM
Last Post: mvallevand
  Change recording filename programmatically immediately before recording starts? craigrs84 5 6,246 2015-07-13, 09:28 PM
Last Post: patco444
  Recording a specific episode based on season and episode number cbgifford 26 10,827 2014-12-19, 10:28 PM
Last Post: cbgifford

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

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

Linear Mode
Threaded Mode