Kemono: fix missing posts (#1587)
This commit is contained in:
		
							parent
							
								
									f6cb65688d
								
							
						
					
					
						commit
						37c80ab2f6
					
				| @ -2,4 +2,4 @@ plugins { | |||||||
|     id("lib-multisrc") |     id("lib-multisrc") | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| baseVersionCode = 10 | baseVersionCode = 11 | ||||||
|  | |||||||
| @ -60,7 +60,7 @@ class KemonoPostDto( | |||||||
|             if (file.path != null) add(KemonoAttachmentDto(file.name!!, file.path)) |             if (file.path != null) add(KemonoAttachmentDto(file.name!!, file.path)) | ||||||
|             addAll(attachments) |             addAll(attachments) | ||||||
|         }.filter { |         }.filter { | ||||||
|             when (it.name.substringAfterLast('.').lowercase()) { |             when (it.path.substringAfterLast('.').lowercase()) { | ||||||
|                 "png", "jpg", "gif", "jpeg", "webp" -> true |                 "png", "jpg", "gif", "jpeg", "webp" -> true | ||||||
|                 else -> false |                 else -> false | ||||||
|             } |             } | ||||||
| @ -91,6 +91,7 @@ class KemonoPostDto( | |||||||
| @Serializable | @Serializable | ||||||
| class KemonoFileDto(val name: String? = null, val path: String? = null) | class KemonoFileDto(val name: String? = null, val path: String? = null) | ||||||
| 
 | 
 | ||||||
|  | // name might have ".jpe" extension for JPEG, path might have ".m4v" extension for MP4 | ||||||
| @Serializable | @Serializable | ||||||
| class KemonoAttachmentDto(val name: String, val path: String) { | class KemonoAttachmentDto(val name: String, val path: String) { | ||||||
|     override fun toString() = "$path?f=$name" |     override fun toString() = "$path?f=$name" | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 stevenyomi
						stevenyomi