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

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#51
2005-02-28, 01:34 PM
[b Wrote:Quote[/b] (KingArgyle @ Feb. 28 2005,01:08)]Here is a version of the source code that can be run without requiring the RecordingUtils.dll file.  One of the main methods that the RenameRecording.exe used changed, and was causing problems.  So I moved the small portion that deals with Datbases into the code itself.  I've only included source here.  I'll try and get and update on the Wiki tomorrow.

Note: I've hard coded the path to the GBPVR database, because I needed a quick a dirty test.  It's been busted for the last several days, and I finally became annoyed enough to fix it.  Once I had this working, it was hard for me to not have it still working.  Also, Pioneer your fix for the Comskip should be included in this version as well.  

Again, this is only source code, and not the executable.  You'll need a C# compiler to get it to work.
I see that you have line of code referring to Star Trek with the difference being a ":" Did you figure out that that is the problem with STNG not working with rename? It would make sense, because one other thing that didn't work for me was
"Metropolis: The Power of Cities". I honestly couldn't figure out your code on that part, but the ":" did seem like the item you were catching, but it seemed like it would add it not remove it. I really only understand Basic, but code is code, logic wise. And I can look things up.

Also one of the things I changed was
if (!File.Exists(newFile)) {
archEp.updateScheduleTitle(program.getOID(), newFile);
File.Move(args[0], newFile);
}
I think the program was updating the database, even if the file name existed. I haven't tested that part, and what I was thinking of doing was, if it existed, adding a "_2" or something to the end.
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#52
2005-02-28, 02:19 PM
Yeah, when I was recording "Enterprise", the program guide has it has "Star Trek: Enterprise". Since : are illegal characters for filenames, GBPVR removes the : and you get "Star Trek Enterprise_xxxxxxx_xxxxx.xxx" as the filename. Short term fix for me was to add code to look for "Star Trek E" in the title name, and replace it with "Star Trek: E". Long term solution is probably to have a key word list that contains those titles that GBPV strips out the : and add them back in.

The IndexOf function returns a position within the string that the search string occurs. If it doesn't find it, it returns -1.

As I said, this was a quick a dirty fix just so I could get it working on my end.
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#53
2005-02-28, 02:51 PM
OOOHHHH! I understand. I thought it was adding the :, but I was wondering why. You were just putting it back for the search for the episode name. That also explains why last week's "Lost" didn't work. It was failing on any show that had the illegal characters stripped. (BTW, you need to strip "." also)

I couldn't find out how you were calling comskip directly from this new code, or did I misunderstand your post earlier?

How about keeping the original name, and doing a lookup on it, and using a different variable for the actual rename?
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
jrockintuitive
Offline

Senior Member

Posts: 292
Threads: 19
Joined: Dec 2004
#54
2005-03-01, 03:04 AM
I was about to do fix the references in RenameRecording, but it looks like you removed the references. I'd imageing I'm off the hook?
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#55
2005-03-01, 03:46 AM
Yeah, you are off the hook. It appeared that getProgramsByTitle had a Date check added to it, which was causing problems when trying to use that method in the RenameRecording program since the refactoring on CDK Scheduler was done. No big deal, just drove me insane for a while. [Image: smile.gif]
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#56
2005-03-01, 03:48 AM
Pioneer,

I don't do a call to comskip directly in this code, I just added your fix for the rename of the comskip file. Again, I didn't test it as I don't use Comskip.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#57
2005-03-03, 01:45 PM
Unfortunately, Tipstir, I don't have the time to develop a plugin for the CDK Scheduler. I'm sure that Jorm and Jrock will iron out the bugs.

As for RenameRecording. I'll post my new version on the Wiki today. Look for a message here once I get it posted.
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#58
2005-03-03, 02:07 PM
I was going to look at it this afternoon. The patched one that I have been using is working fine. The only thing left I really would like is it catching files it has to remove characters, and I'd like it to run before comskip.

I thank you again for the idea and source!
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#59
2005-03-03, 02:21 PM
Pioneer4x4:

I've uploaded the new version to the wiki with the source included. Also included some sample code that can be used to remove the hard coding of the path. Feel free to download and add the missing feature to it (i.e. removing the hard coded path to the config). Just remember to post your modified version on the Wiki. Contact Blader if you need a signon for the Wiki.

RenameRecording
ZaDDaZ
Offline

Member

Posts: 96
Threads: 6
Joined: Mar 2005
#60
2005-03-21, 04:12 AM
KingArgyle,

I hope you don't mind, but I used your code as a template and modified it to remove the hardcoded path, although it needs to be in the GBPVR folder. I also changed some of the exception handling to how I commonly do it. I'm uploading a zip file with the modified source, executable and readme. I haven't gotten into updating the WiKi yet, but I'd be happy to.

I also used your code to write another utility that allows one to specify the maximum number of recordings that are allowed per show. Its on another thread for PriorityRecordings and its called MaxRecordings.

If you don't mind, could you look over this and make sure I didn't make any mistakes that are going to mess up anything?

Cheers
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


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