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
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#201
2006-06-13, 06:43 AM (This post was last modified: 2006-06-14, 06:05 AM by turkey.)
I have just written a new utility that does the same thing that renamerecording did. This will work only if you have switched to the sqlite database. It is used the same way renamerecordings was used:

In postprocessing.bat:
addepisode.exe %1

The utility will add an episode name to the show name if there is one, otherwise it will just be the show name. It will then update the database with the new filename.

The file "sqlite3" must be in the same directory as the utility. Although I have tested it on my own computer, it is not guaranteed to work on your computer.

EDIT: I have updated it to not hardcode the directory, but these files MUST be in the same directory as the gbpvr database.
_gl
Offline

Member

Posts: 118
Threads: 11
Joined: Dec 2005
#202
2006-06-13, 01:13 PM (This post was last modified: 2006-06-13, 01:46 PM by _gl.)
turkey Wrote:I have just written a new utility that does the same thing that renamerecording did. This will work only if you have switched to the sqlite database. It is used the same way renamerecordings was used:

In postprocessing.bat:
addepisode.exe %1

The utility will add an episode name to the show name if there is one, otherwise it will just be the show name. It will then update the database with the new filename.

The file "sqlite3" must be in the same directory as the utility. The gbpvr directory is hard coded to be "program files\devnz\gbpvr\", but if anyone wants me to write a unique version for your specific directory structure, i would be happy to do so. Also, although i have tested it on my own computer, it is not guaranteed to work on your computer.

Hey, nice work. Except harcoding the path is a bad idea (it won't work for me for example). What language are you working in? In C/C++ you can get the path the .exe is located in via:

const TCHAR currdir [MAX_PATH];
GetModuleFileName(NULL, currdir, MAX_PATH);


Also do you strip characters that shouldn't be in filenames (see my earlier msg in this thread)?
GBPVR System:
XP Pro SP2, AMD XP1800+, 512MB DDR, NVidia 6200 AGP (1.90.62 drivers), PVR-150 (2.0.43.24108 drivers), nVidia Purevideo Mpeg2 codec, PVRX2 1.4.7
b00sfuk
Offline

Senior Member

Posts: 319
Threads: 26
Joined: Mar 2005
#203
2006-06-13, 01:22 PM
I'm also interested in this and would like confirmation on whether it does strip bad characters and also if it handles duplicate filenames if there is no episode name. Both of these were handled by Renamerecordings and I'm waiting on this being upgraded before I change to SQLite.
Thanks for working on this.
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
#204
2006-06-13, 03:14 PM
I have updated the script to not have a hardcoded directory and have uploaded it to the above post.

As for stripping invalid charachters, as well as handling double names, I will add that stuff in over the next couple of days.

This is my first published script, so be kind!
b00sfuk
Offline

Senior Member

Posts: 319
Threads: 26
Joined: Mar 2005
#205
2006-06-13, 03:29 PM
Thanks, I don't know what you've written this in but have you seen that KingArgyle included the source (C#) with RenameRecordings. This includes code for these extra functions and I think I saw him post somewhere that provided he got some credit you can use it (but please doublecheck).
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
#206
2006-06-15, 04:27 AM (This post was last modified: 2006-06-18, 10:51 PM by turkey.)
edit: THIS POST HAS THE LATEST VERSION OF THIS UTILITY

This will only work if you have switched over to sqlite for the database.

Useage: add the following line to postprocessing.bat (the -log and -eponly are optional)

addepisode.exe %1 -log -eponly

-log: appends a line to "addepisode.log" for each file renamed, as well as some sqlite errors
-eponly: will rename the file to the episode only (ie. Episode Name.mpg) if it exists. If not, it will rename the file to only the shaow name.

Installation:

Place both files in the gbpvr directory, and add the previously mentioned line to postprocessing.bat.

As before, this has only been tested on my setup, so there is no guarantee that it will work for you. If anyone has any problems with it, please let me know.

addepisode.zip v0.41
b00sfuk
Offline

Senior Member

Posts: 319
Threads: 26
Joined: Mar 2005
#207
2006-06-15, 02:13 PM
Hi, Turkey, I converted over to SQLite and tried this out on 3 programmes. For each (all with episode names) though I got this AutoIt error.

Line 0 (File "C:\Program Files\devnz\gbpvr\addepisode.exe")

$programme_oid = $temp[2]
$programme_oid = ^ERROR

Error: Array variable has incorrent number of subscripts or subscript dimension range exceeded.


Any thoughts?
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
#208
2006-06-15, 02:45 PM
Sorry about that, I think I uploaded the wrong version. I have fixed the problem, you can download it again from the above link.

Sorry!
b00sfuk
Offline

Senior Member

Posts: 319
Threads: 26
Joined: Mar 2005
#209
2006-06-15, 02:52 PM
turkey Wrote:Sorry about that, I think I uploaded the wrong version. I have fixed the problem, you can download it again from the above link.

Sorry!
Link is not working for me (or is it that I have to have registered at the AutoIT forums?). Cheers
Silverstone LC10M with iMON
Gigabyte 780G+4850e, AMD 6570
Blackgold BGT3620, Harmony 555 Remote
Win7 32-bit, SAF
_gl
Offline

Member

Posts: 118
Threads: 11
Joined: Dec 2005
#210
2006-06-15, 03:05 PM
I had the same problem. Trying the new version now. BTW the link works for me.
GBPVR System:
XP Pro SP2, AMD XP1800+, 512MB DDR, NVidia 6200 AGP (1.90.62 drivers), PVR-150 (2.0.43.24108 drivers), nVidia Purevideo Mpeg2 codec, PVRX2 1.4.7
« Next Oldest | Next Newest »

Users browsing this thread: 3 Guest(s)

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 684 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 452 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 1,119 2023-11-09, 02:14 PM
Last Post: mvallevand
  Recording direct to GPhotos API rgonzalez 0 1,511 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 3,058 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 14,442 2019-08-15, 09:34 PM
Last Post: sub
  Unexpected result when deleting a pending recording scJohn 5 3,868 2018-05-06, 10:09 PM
Last Post: sub
  How to best verify success when adding a recurring recording drmargarit 1 2,873 2017-03-02, 03:13 PM
Last Post: mvallevand
  Change recording filename programmatically immediately before recording starts? craigrs84 5 6,195 2015-07-13, 09:28 PM
Last Post: patco444
  Recording a specific episode based on season and episode number cbgifford 26 10,742 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