diff --git a/hu.py b/hu.py index 8b1373b1..e7a9cfdf 100755 --- a/hu.py +++ b/hu.py @@ -788,12 +788,17 @@ def udisk_rem( device ): # 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" Sources.sourceStop() + print "DEBUG 3" x = Sources.next(reverse=True) #x = Sources.next() - print "DEBUG: {0}".format(x) + print "DEBUG 4: {0}".format(x) hu_play() + print "DEBUG 5" + # display overview printSummary(Sources) diff --git a/hu_source.py b/hu_source.py index 5021cbfa..1789bea4 100755 --- a/hu_source.py +++ b/hu_source.py @@ -217,12 +217,14 @@ def source_iterator(i_start, i_end, j_start, reverse): if reverse: step = -1 logtext = "to prev." + print "DEBUG A - reverse" else: step = 1 logtext = "to next" + print "DEBUG A - forward" for source in self.lSource[i_start:i_end:step]: - #print "DEBUG A -- {0}".format(source) + print "DEBUG B -- {0}".format(source) # no sub-source and available: if not source['template'] and source['available']: self.__printer('NEXT: Switching {0} {1}: {2:s}'.format(logtext,i_start,source['displayname'])) @@ -233,8 +235,8 @@ def source_iterator(i_start, i_end, j_start, reverse): # sub-source and available: elif source['template'] and source['available']: for subsource in source['subsources'][j_start::step]: + print "DEBUG C {0}".format(subsource) if subsource['available']: - #print "DEBUG 4" self.__printer('NEXT: Switching {0}: {1}/{2}: {3:s}'.format(logtext,i_start,j_start,subsource['displayname'])) self.iCurrentSource[0] = i_start self.iCurrentSource[1] = j_start @@ -318,7 +320,7 @@ def source_iterator(i_start, i_end, j_start, reverse): if res == None: # Let's start from the beginning till current ssi_start = 0 - #print "DEBUG still here..." + print "DEBUG still here..." return source_iterator(0, si_cur-1, ssi_start, reverse) else: return res