Browse the code

 

Differences between 231 and 232 on /.
Number of edited files: 1 (0 added, 0 deleted and 1 modified)
Revision 232

About 1 month and 2 days ago.

* Fixed a little bug happening after a playlist deletion (and related to total length couting)
Added file(s) Deleted file(s) Modified file(s)

 

Old New Code
114
114

                                        
115
115
                length = 0
116
116
                for item in model:
117
 
                    element = self.playlist_content[item[4]]
 
117
                    if item[4] in self.playlist_content: 
 
118
                        element = self.playlist_content[item[4]]
118
119

                                        
119
 
                    try:
120
 
                        length += element.length
121
 
                    except AttributeError:
122
 
                        for sng in element.tracks:
123
 
                            length += sng.length
 
120
                        try:
 
121
                            length += element.length
 
122
                        except AttributeError:
 
123
                            for sng in element.tracks:
 
124
                                length += sng.length
124
125

                                        
125
126
                self.playlist_length = length
126
127
                time = self.functions.human_length(length, True)
127
128