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

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#1
2007-01-17, 12:21 AM
I could really use a filter to remove shows that I am totally uninterested in from the xmltv file that I download.

The idea is a could create a file called unwantedshows.txt containing (but not limited to)

Big Brother
Emmerdale
.

then run xmlfilter data.xml > newdata.xml

The filter would do and exact match on the <title> field.

Over time, I would only end up with shows that I am interested in appearing in the EPG, which would be marvelous!

I guess it would also be possible to write some sql to delete these shows from the database but I am not sure how you could do this safely.

Any ideas anyone?
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,595
Threads: 387
Joined: Dec 2004
#2
2007-01-17, 01:32 AM
LOL I like it. Big Grin

Quote:...create a file called unwantedshows.txt...

At the moment though (post Christmas Season) it'd probably be easier to have a file called wantedshows.txt - it would be smaller Smile.

Quote:I guess it would also be possible to write some sql to delete these shows from the database...
It wouldn't be necessary to delete from the DB as they wouldn't be imported in the first place. You'd only have to do an Empty EPG before processing your XMLTV file, then importing.

The problem I see is that you'd end up with lots of gaps with the GB-PVR background showing through. You could always just replace the title of the programme in the XMLTV file to 'Unwanted'. You could also add an 'Unwanted' genre to the XMLTV file and then colour code that genre - an easy visual guide to help skip past the dross.

Cheers,
Brian
K.S.
Offline

Senior Member

Posts: 526
Threads: 12
Joined: Oct 2006
#3
2007-01-17, 09:23 AM
bgowland Wrote:At the moment though (post Christmas Season) it'd probably be easier to have a file called wantedshows.txt - it would be smaller Smile

sure, but you would allways check your logs to see if EPG update really worked, cause it's allways empty Big Grin
sub Wrote:Yep, what he said.

curiosity killed the cat Big Grin
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#4
2007-01-17, 10:38 AM
By running SQL I meant as an alternative method of removing unwanted shows. Ideally it would be better to remove the shows (from data.xml) before loading the epg rather than deleting them (from the db) afterwards.

The genre idea is a good one but I think I would just be happy to have emptiness where the deleted shows were. It would be less of a distraction.
“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
#5
2007-01-17, 10:59 AM
I like it!.

You could write the filter to run within XMLTVgui as a 'postprocessor'. If you were worried about gaps you could just substitute 'carp' in it's place.
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#6
2007-01-17, 11:02 AM
Hmmm, I wrote something some time ago that can filter XMLTV files.... It's called "EPGFilter" and allows you to edit / delete XMLTV entries based on regular expressions here http://forums.nextpvr.com/showthread.php?t=11894 ....
//Ton
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#7
2007-01-17, 03:35 PM
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?
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
SWK
Offline

Member

Posts: 116
Threads: 12
Joined: Mar 2005
#8
2007-01-17, 06:53 PM
Here's some xmltv code I've used in the past to strip out TBAs :

xmltv tv_grep --not --title "^To Be Announced$" --and --not --category "^TBA$" <input.xml >output.xml
The truth will set you free - unless you guilty, in which case lie
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#9
2007-01-17, 07:17 PM (This post was last modified: 2007-01-17, 07:24 PM by gEd.)
cheers - I'll go and have a play

in unix i might do this:

for i in `cat shows_to_avoid.txt`
do
xmltv tv_grep --not --title "$i" <input.xml >>output.xml
done

[edit]: that works perfectly - cheers.
Could someone help with with the windows equivalent to the above script please!
yet more batch files.....:-)
“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
#10
2007-01-17, 07:34 PM
you could try something like this

FOR /F %%A IN (shows_to_avoid.txt) DO xmltv tv_grep --not --title "%%A" <input.xml >output.xml

haven't tested it but it should be close
----------------------
[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]
« 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
  Unhighlight recorded shows artmetz 0 427 2024-10-19, 05:05 PM
Last Post: artmetz
  All shows page buntay20 15 2,151 2024-01-28, 08:39 PM
Last Post: mvallevand
  Request for XMLTV EPG Export Link or/and File t2t4 3 1,573 2022-11-24, 01:15 PM
Last Post: mvallevand
  Titles no visible on web EPG for very long shows JP23 4 1,260 2022-07-01, 04:34 PM
Last Post: sub
  Remove failed recurring recording artmetz 0 826 2021-11-17, 07:55 PM
Last Post: artmetz
  method=channel.xmltv - Add Category tag bzellinger 0 1,039 2021-06-04, 01:22 PM
Last Post: bzellinger
  V5 filter guide by search ctrlbrk 0 1,211 2020-06-06, 11:31 PM
Last Post: ctrlbrk
  Folder change detection (database update) to avoid missing shows Faravid 2 2,048 2019-05-03, 03:16 PM
Last Post: Faravid
  Remove articles in search Tacoma 0 1,306 2018-06-24, 04:56 PM
Last Post: Tacoma
  "Speculative recording" - record a title that is not currently in listings martinu 4 2,581 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