mirror of
				https://github.com/SuperBFG7/ympd
				synced 2025-10-31 05:43:01 +00:00 
			
		
		
		
	mpd_get_title: call basename only when using path
Otherwise, traks like "Morning Bell/Amnesiac" get trimmed to "Amnesiac"
This commit is contained in:
		 Philippe Mongeau
					Philippe Mongeau
				
			
				
					committed by
					
						 Andrew Karpow
						Andrew Karpow
					
				
			
			
				
	
			
			
			 Andrew Karpow
						Andrew Karpow
					
				
			
						parent
						
							dcc4823bc3
						
					
				
				
					commit
					6f8d5ef732
				
			| @@ -266,8 +266,9 @@ char* mpd_get_title(struct mpd_song const *song) | |||||||
|     char *str, *ptr; |     char *str, *ptr; | ||||||
|  |  | ||||||
|     str = (char *)mpd_song_get_tag(song, MPD_TAG_TITLE, 0); |     str = (char *)mpd_song_get_tag(song, MPD_TAG_TITLE, 0); | ||||||
|     if(str == NULL) |     if(str == NULL){ | ||||||
|         str = (char *)mpd_song_get_uri(song); |         str = basename((char *)mpd_song_get_uri(song)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     if(str == NULL) |     if(str == NULL) | ||||||
|         return NULL; |         return NULL; | ||||||
| @@ -277,7 +278,7 @@ char* mpd_get_title(struct mpd_song const *song) | |||||||
|         if(*ptr=='"') |         if(*ptr=='"') | ||||||
|             *ptr='\''; |             *ptr='\''; | ||||||
|  |  | ||||||
|     return basename(str); |     return str; | ||||||
| } | } | ||||||
|  |  | ||||||
| int mpd_put_state(char *buffer, int *current_song_id, unsigned *queue_version) | int mpd_put_state(char *buffer, int *current_song_id, unsigned *queue_version) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user