From 979bf0c13a044f3a5a7589f96423256ece4accfb Mon Sep 17 00:00:00 2001 From: Sjoerd82 Date: Sun, 18 Feb 2018 18:41:19 +0100 Subject: [PATCH] 1841 --- hu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hu.py b/hu.py index e7a9cfdf..8a17d0e3 100755 --- a/hu.py +++ b/hu.py @@ -782,12 +782,14 @@ def udisk_rem( device ): ix_ss = Sources.getIndexSub(ix, 'device', partition) if not ix_ss is None: + # check current index, to check if we're playing this to-be removed sub-source + arIxCurr = Sources.getIndexCurrent() + # remove sub-source printer(' > Removing {0}...'.format(partition)) Sources.remSub(ix, ix_ss) # stop playing, if removed source is current source - arIxCurr = Sources.getIndexCurrent() print "DEBUG 1: {0}".format(arIxCurr) if ix == arIxCurr[0] and ix_ss == arIxCurr[1]: print "DEBUG 2"