Browse Source

wifi_ui_3

info@shuvit.org 2 years ago
parent
commit
5f14fe2a0c
4 changed files with 16 additions and 10 deletions
  1. 1
    0
      .gitignore
  2. 1
    2
      lib/sLoadSound.py
  3. 11
    8
      lib/utils.py
  4. 3
    0
      user/songs/default.sng

+ 1
- 0
.gitignore View File

43
 *.WAV
43
 *.WAV
44
 *.MP3
44
 *.MP3
45
 *.sng
45
 *.sng
46
+*.sco
46
 *__pycache__/
47
 *__pycache__/
47
 lib/__pycache__/
48
 lib/__pycache__/
48
 lib/*.pyc
49
 lib/*.pyc

+ 1
- 2
lib/sLoadSound.py View File

106
 					self.FSM.ToTransition('toMain')
106
 					self.FSM.ToTransition('toMain')
107
 
107
 
108
 	def get_file_list(self, o):
108
 	def get_file_list(self, o):
109
-		dirs = os.listdir(o.load_sound_dir)
110
-		dirs.sort()
109
+		dirs = u.get_files(o.load_sound_dir, '.wav')
111
 		return dirs
110
 		return dirs
112
 
111
 
113
 	def draw_main(self, o):
112
 	def draw_main(self, o):

+ 11
- 8
lib/utils.py View File

182
 
182
 
183
 	for file in files:
183
 	for file in files:
184
 	    if file.lower().endswith(ext):
184
 	    if file.lower().endswith(ext):
185
-	    	print(file, ' does end with ext')
186
 	    	if os.path.isdir(path + file):
185
 	    	if os.path.isdir(path + file):
187
-	        	#out.append(file)
188
 	        	pass
186
 	        	pass
189
 	    	else:
187
 	    	else:
190
-	    		#pass
191
 	        	out.append(file)
188
 	        	out.append(file)
192
-	    else:
193
-	    	print(file, ' does not end with ext')
194
-	    	#pass
195
-
196
-	return out
189
+	    else:	 
190
+	    	pass
191
+	
192
+	out2 = []
193
+	for f in out:
194
+		if f[0] == '.':
195
+			pass
196
+		else:
197
+			out2.append(f)
198
+
199
+	return out2
197
 
200
 
198
 def scroll_ud(o, self):
201
 def scroll_ud(o, self):
199
 	since_up = 0		
202
 	since_up = 0		

+ 3
- 0
user/songs/default.sng
File diff suppressed because it is too large
View File


Loading…
Cancel
Save