play url from filesystem if found in music folder
This commit is contained in:
		
							parent
							
								
									ea437e6401
								
							
						
					
					
						commit
						20f5e8d3ed
					
				
							
								
								
									
										18
									
								
								gameview.py
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								gameview.py
									
									
									
									
									
								
							| @ -3743,18 +3743,22 @@ class GUI(QtGui.QWidget): | ||||
|         elif self.userPickedMusicItem: | ||||
|             _musl = self.musicList[self.musicItems.currentItem().text()] | ||||
|             if exists(AOpath + 'sounds/music/' + _musl): | ||||
|                 if isinstance(_musl, unicode): | ||||
|                     if platform.system() == "Windows": | ||||
|                         musl = _musl.encode('mbcs') | ||||
|                     else: | ||||
|                         musl = _musl.encode('utf-8') | ||||
|                 else: | ||||
|                     musl = _musl | ||||
|                 musl = _musl | ||||
|                 playLocal = True | ||||
|         elif musl.startswith("http"): | ||||
|             _musl = urllib.unquote(basename(mus)) | ||||
|             if exists(AOpath + 'sounds/music/' + _musl): | ||||
|                 musl = _musl | ||||
|                 playLocal = True | ||||
|                  | ||||
|         self.userPickedMusicItem = False | ||||
|          | ||||
|         if playLocal: | ||||
|             if isinstance(musl, unicode): | ||||
|                 if platform.system() == "Windows": | ||||
|                     musl = musl.encode('mbcs') | ||||
|                 else: | ||||
|                     musl = musl.encode('utf-8') | ||||
|             self.music = audio.loadHandle(False, AOpath + 'sounds/music/' + musl, 0, 0, BASS_SAMPLE_LOOP) | ||||
|             if self.music: | ||||
|                 audio.setHandleAttr(self.music, BASS_ATTRIB_VOL, self.sliMusicVolume.value() / 100.0) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user