Skip to content

Commit 776ae1a

Browse files
committed
perform more thorough test when updating a station
1 parent 2a0116b commit 776ae1a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyradio/common.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,11 @@ def update_stations_csv(self, print_messages=True):
384384
self.counts[2] += 1
385385
self._stations.pop(self._stations.index(an_item))
386386
for n in self.versions[k][1]:
387-
found = [x for x in self._stations if x[0] == n[1][n[0]]]
387+
found = []
388+
if n[0] == 0:
389+
found = [x for x in self._stations if x[0] == n[1][0] and x[1] != n[1][1]]
390+
elif n[0] == 1:
391+
found = [x for x in self._stations if x[1] == n[1][1] and x[0] != n[1][0]]
388392
if found:
389393
if print_messages:
390394
if PY3:

0 commit comments

Comments
 (0)