NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
« Previous 1 … 92 93 94 95 96 … 193 Next »
xmltv filter to remove unwanted shows from tv listings

 
  • 0 Vote(s) - 0 Average
xmltv filter to remove unwanted shows from tv listings
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#11
2007-01-17, 08:25 PM
I've got cygwin installed, but not sure on passing command/directories etc from windows. Will experiment. There's always a DOS grep from Borland or similar.
gEd
Offline

Posting Freak

London
Posts: 3,514
Threads: 100
Joined: Jan 2005
#12
2007-01-17, 08:54 PM
grep on it's own won;t work as you need to remove the n lines that make up the show object. It can almost certainly be done in awk.

Cheers Carlito, I'll give that a try.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#13
2007-01-17, 09:10 PM
gEd Wrote:It can almost certainly be done in awk.

but only by gods Smile
Carlito
Offline

Posting Freak

Posts: 817
Threads: 41
Joined: May 2006
#14
2007-01-17, 09:44 PM
adding these three lines to the bottom of my UpdateEPG.bat file seems to do the trick.

SET GBPVROutputAvoid=TVGuide2.xml
SET Shows_To_Avoid=C:\\I-xmltv\\shows_to_avoid.txt

FOR /F "DELIMS=;" %%A IN (%Shows_To_Avoid%) DO %XMLTV_Prog% tv_grep --not --title "%%A" <%I-xmltv_DIR%%GBPVROutput% >%I-xmltv_DIR%%GBPVROutputAvoid%



Make sure you add them right before the line that reads
REM ***Do not add commands below this line***

The file shows_to_avoid.txt needs to be a ; separated list of show names
I have attached an example....
----------------------
[SIZE="1"]PVRX2 1.3.11
Shuttle SG33G5 Case
Core2Duo E8400 3Ghz -- 4 GB RAM
Hauppauge PVR-150
Adaptec AVC-3610 Dual Tuner
Onboard Intel GMA 3100 through HDMI -- 500GB
37" Westinghouse LCD (1920 x 1080p)

Projects
Program Image Tool[/SIZE]
Carlito
Offline

Posting Freak

Posts: 817
Threads: 41
Joined: May 2006
#15
2007-01-17, 09:46 PM
NOTE
You will need to point gbpvr to the file c:\i-xmltv\TVGuide2.xml for the guide data as well...
----------------------
[SIZE="1"]PVRX2 1.3.11
Shuttle SG33G5 Case
Core2Duo E8400 3Ghz -- 4 GB RAM
Hauppauge PVR-150
Adaptec AVC-3610 Dual Tuner
Onboard Intel GMA 3100 through HDMI -- 500GB
37" Westinghouse LCD (1920 x 1080p)

Projects
Program Image Tool[/SIZE]
Carlito
Offline

Posting Freak

Posts: 817
Threads: 41
Joined: May 2006
#16
2007-01-17, 09:51 PM
NOTE 2
I guess you should probably add this line after the first 2 lines

IF EXIST %GBPVROutputAvoid% del "%GBPVROutputAvoid%"
----------------------
[SIZE="1"]PVRX2 1.3.11
Shuttle SG33G5 Case
Core2Duo E8400 3Ghz -- 4 GB RAM
Hauppauge PVR-150
Adaptec AVC-3610 Dual Tuner
Onboard Intel GMA 3100 through HDMI -- 500GB
37" Westinghouse LCD (1920 x 1080p)

Projects
Program Image Tool[/SIZE]
gEd
Offline

Posting Freak

London
Posts: 3,514
Threads: 100
Joined: Jan 2005
#17
2007-01-18, 12:10 AM
thanks for your help Carlito. ok, here is what I found.

I couldn't get it to recurse through the show list with the DELIMS=;, so I changed it so that show_to_avoid.txt has one show name per line and I use "DELIMS=¶" . This works ok.

The other thing is that the output file from the first pass need to be the input file for the second pass. i.e. the output file has to be renamed to be the input file. I dont' know how you can run more that one command with the FOR /F command, so I split the operation out to another (yeh!!) batch file called parse.cmd.

FOR /F "DELIMS=¶" %%A IN (%Shows_To_Avoid%) DO call parse "%%A"

parse.cmd
----------
xmltv tv_grep --not --title %1 <data.xml > data.tmp
del data.xml
ren data.tmp data.xml

It works!

Also, I can see that with xmlltv, I could remove all "Soaps" by doing this
xmltv tv_grep --not --genre "Soap" <data.xml > data.tmp

It's rather inefficient as it has to parse the xml file many times but that's not a biggie.

The next uber-gEd idea would be if there was an option in the tv guide to add a show to the exclusion list.

I'm off to see if I can build this into my xmltv download script.

thanks team!
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
Carlito
Offline

Posting Freak

Posts: 817
Threads: 41
Joined: May 2006
#18
2007-01-18, 12:16 AM
With the suggestions I gave above all should work normally.
All you would have to do is rename TVGuide2.xml to TVGuide.xml after the FOR line...
----------------------
[SIZE="1"]PVRX2 1.3.11
Shuttle SG33G5 Case
Core2Duo E8400 3Ghz -- 4 GB RAM
Hauppauge PVR-150
Adaptec AVC-3610 Dual Tuner
Onboard Intel GMA 3100 through HDMI -- 500GB
37" Westinghouse LCD (1920 x 1080p)

Projects
Program Image Tool[/SIZE]
Carlito
Offline

Posting Freak

Posts: 817
Threads: 41
Joined: May 2006
#19
2007-01-18, 07:00 AM
Okay, i see what you mean. if you add this to your UpdateEPG.bat file everything should run ok


SET GBPVROutputAvoid=TVGuide2.xml
SET Shows_To_Avoid=C:\\I-xmltv\\shows_to_avoid.txt

del %GBPVROutputAvoid%

FOR /F "TOKENS=* DELIMS=;" %%A IN (%Shows_To_Avoid%) %XMLTV_Prog% tv_grep --not --title "%%A" <%I-xmltv_DIR%%GBPVROutput% >%I-xmltv_DIR%%GBPVROutputAvoid% & del %GBPVROutput% & move %GBPVROutputAvoid% %GBPVROutput%

Then just put each show you want skipped on it's own line in shows_to_avoid.txt and place that file in the c:\I-Xmltv\
----------------------
[SIZE="1"]PVRX2 1.3.11
Shuttle SG33G5 Case
Core2Duo E8400 3Ghz -- 4 GB RAM
Hauppauge PVR-150
Adaptec AVC-3610 Dual Tuner
Onboard Intel GMA 3100 through HDMI -- 500GB
37" Westinghouse LCD (1920 x 1080p)

Projects
Program Image Tool[/SIZE]
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#20
2007-01-18, 08:02 PM
Well, in answer to this:

gEd Wrote:Thanks Ton. EPGfilter sounds very close to what I am looking for but can it run an expression against the <title> field only, rather than all fields in the show i.e. not on the sub-title or description fields?

Sure it can!!! That's how I fix my "Mythbusters" shows... I match against title starting with "mythbusters" and then do the replace processing...
//Ton
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unhighlight recorded shows artmetz 0 345 2024-10-19, 05:05 PM
Last Post: artmetz
  All shows page buntay20 15 1,884 2024-01-28, 08:39 PM
Last Post: mvallevand
  Request for XMLTV EPG Export Link or/and File t2t4 3 1,406 2022-11-24, 01:15 PM
Last Post: mvallevand
  Titles no visible on web EPG for very long shows JP23 4 1,169 2022-07-01, 04:34 PM
Last Post: sub
  Remove failed recurring recording artmetz 0 757 2021-11-17, 07:55 PM
Last Post: artmetz
  method=channel.xmltv - Add Category tag bzellinger 0 983 2021-06-04, 01:22 PM
Last Post: bzellinger
  V5 filter guide by search ctrlbrk 0 1,166 2020-06-06, 11:31 PM
Last Post: ctrlbrk
  Folder change detection (database update) to avoid missing shows Faravid 2 1,987 2019-05-03, 03:16 PM
Last Post: Faravid
  Remove articles in search Tacoma 0 1,255 2018-06-24, 04:56 PM
Last Post: Tacoma
  "Speculative recording" - record a title that is not currently in listings martinu 4 2,462 2017-11-09, 10:52 AM
Last Post: martint123

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

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

Linear Mode
Threaded Mode