Excluded Station Names feature doesn't seem to work
GoogleCodeExporter opened this issue · 4 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Given the config line:
EXCLUDED_STATION_NAMES = NDR FERNSEHEN|Das Erste|3sat|ZDF|WDR Kln|Sdwest BW/RP
2. Running MarkCommercials all gives output like this:
> 2. Processing "Babel" on [Das Erste] channel [1]...
> Channel: 1 , not skipped
> Title: Babel , not skipped
> Station name: Das Erste , not skipped
What is the expected output? What do you see instead?
I'd expect this recording to be skipped du to the station name. Maybe it's
because of the
trailing whitespace in the name? However I tried changing MarkCommercials.py to
call
stationName.trim():
> if stationName.strip() in excludedStationNames:
> ...
But that doesn't seem to make a difference.
Original issue reported on code.google.com by mrtnpr...@googlemail.com
on 20 Oct 2009 at 4:47
- Merged into: #10
GoogleCodeExporter commented
Given that the names of the stations appear to be in a non-english language
(German?)
I suspect that may be part of the problem.
For printing purposes, MarkCommercials.py strips non-ascii characters from the
station name, and replaces them with an ascii compatible version. This is
necessary
to prevent a crash.
msg=' Station name: %s' % stationName
==> print msg.encode("ascii","replace"),
if stationName in excludedStationNames:
However, the actual comparison is done on the full unicode version of the
station
name. Does the actual station name "Das Erste" contain umlauts or some
non-ascii
character? If so, can you change the line in the config file to match the
actual
station name?
Alternately, you might want to try comparing the ascii version:
if stationName.encode("ascii","replace") in excludedStationNames:
Finally, you could try using station number instead.
-Jon
Original comment by jon.chri...@gmail.com
on 20 Oct 2009 at 5:30
GoogleCodeExporter commented
No, "Das Erste" is the literal name, without any umlauts, so this should not be
an encoding problem. I will try
your code change, lets see if this helps.
I field another bug for umlauts within MarkCommercials.cfg (not supported atm).
Original comment by mrtnpr...@googlemail.com
on 20 Oct 2009 at 6:12
GoogleCodeExporter commented
Please note that this problem is already fixed in the 0.3.1 version of
MarkCommercials.py which I attached to my old bug report here:
http://code.google.com/p/etv-comskip/issues/detail?id=10
Original comment by m...@jens-maus.de
on 20 Nov 2009 at 3:01
GoogleCodeExporter commented
Fixed by patch from bug #10
Original comment by jon.chri...@gmail.com
on 19 Apr 2010 at 8:50
- Changed state: Duplicate