Add Pijamalı Koi (#3973)
* Add Pijamalı Koi * Remove extra path segment unconditionally Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> --------- Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									3862f49ad7
								
							
						
					
					
						commit
						33afc95944
					
				
							
								
								
									
										10
									
								
								src/tr/pijamalikoi/build.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/tr/pijamalikoi/build.gradle
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
ext {
 | 
			
		||||
    extName = 'Pijamalı Koi'
 | 
			
		||||
    extClass = '.PijamaliKoi'
 | 
			
		||||
    themePkg = 'mangathemesia'
 | 
			
		||||
    baseUrl = 'https://pijamalikoi.com/m'
 | 
			
		||||
    overrideVersionCode = 0
 | 
			
		||||
    isNsfw = false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
apply from: "$rootDir/common.gradle"
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-hdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-hdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 6.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-mdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-mdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 3.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-xhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-xhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 11 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-xxhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-xxhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 24 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-xxxhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/tr/pijamalikoi/res/mipmap-xxxhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 42 KiB  | 
@ -0,0 +1,37 @@
 | 
			
		||||
package eu.kanade.tachiyomi.extension.tr.pijamalikoi
 | 
			
		||||
 | 
			
		||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
 | 
			
		||||
import eu.kanade.tachiyomi.source.model.SChapter
 | 
			
		||||
import eu.kanade.tachiyomi.source.model.SManga
 | 
			
		||||
import okhttp3.Request
 | 
			
		||||
import java.text.SimpleDateFormat
 | 
			
		||||
import java.util.Locale
 | 
			
		||||
 | 
			
		||||
class PijamaliKoi : MangaThemesia(
 | 
			
		||||
    "Pijamalı Koi",
 | 
			
		||||
    "https://pijamalikoi.com/m",
 | 
			
		||||
    "tr",
 | 
			
		||||
    mangaUrlDirectory = "/seri",
 | 
			
		||||
    dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("tr")),
 | 
			
		||||
) {
 | 
			
		||||
    override fun chapterListRequest(manga: SManga): Request {
 | 
			
		||||
        return super.chapterListRequest(manga).fixupUrl()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    override fun mangaDetailsRequest(manga: SManga): Request {
 | 
			
		||||
        return super.mangaDetailsRequest(manga).fixupUrl()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    override fun pageListRequest(chapter: SChapter): Request {
 | 
			
		||||
        return super.pageListRequest(chapter).fixupUrl()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Fixes the extra `/m` in the manga URL
 | 
			
		||||
    //
 | 
			
		||||
    // In the database URLs are stored as `/m/seri/regina-rena-to-the-unforgiven/`
 | 
			
		||||
    // With `*Request()` it becomes `$baseUrl/m/seri/regina-rena-to-the-unforgiven/`
 | 
			
		||||
    // Since `baseUrl` contains the the extra `/m`, it will double up, leading to an invalid URL.
 | 
			
		||||
    private fun Request.fixupUrl(): Request {
 | 
			
		||||
        return newBuilder().url(url.newBuilder().removePathSegment(0).build()).build()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user