Skip to content

Commit

Permalink
Fixed several issues (#353) (#350) (#349) (#346)
Browse files Browse the repository at this point in the history
Signed-off-by: Seeyabye <seeyabye91@gmail.com>
  • Loading branch information
seeyabye committed Feb 15, 2023
1 parent 26fc17b commit f4dcb93
Show file tree
Hide file tree
Showing 16 changed files with 2,943 additions and 3,087 deletions.
9 changes: 9 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.5.11]

### Fixed

- Fixed missing `sort.renamefolderinplace` in GUI (#353)
- Removed R18 support (#350)
- Fixed javbus screenshot not being recognized (#349)
- Fixed jav321 screenshots not being grabbed correctly (#346)

## [2.5.10]

### Fixed
Expand Down
3,440 changes: 1,718 additions & 1,722 deletions dashboard/pages/1.0 sort.ps1

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dashboard/pages/2.0 settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ New-UDPage -Name "Settings" -Content {
'JavlibraryZh',
'MGStageJa',
'R18',
'R18Zh',
'Javbus',
'JavbusJa',
'JavbusZh',
Expand Down
4 changes: 1 addition & 3 deletions src/Javinizer/Javinizer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Version number of this module.

ModuleVersion = '2.5.10'
ModuleVersion = '2.5.11'

# Supported PSEditions
# CompatiblePSEditions = @('Core')
Expand Down Expand Up @@ -100,8 +100,6 @@
'Get-MaleActors',
'Get-MgstageData',
'Get-MgstageUrl',
'Get-R18Data',
'Get-R18Url',
'Install-JVGui',
'Set-JavlibraryOwned',
'Set-JVEmbyThumbs',
Expand Down
266 changes: 127 additions & 139 deletions src/Javinizer/Private/Get-JVUrlLocation.ps1
Original file line number Diff line number Diff line change
@@ -1,139 +1,127 @@
function Get-JVUrlLocation {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
[PSObject]$Url,

[Parameter()]
[PSObject]$Settings
)

process {
$testUrlObject = @()
foreach ($link in $Url) {
if ($link -match 'r18.com') {
if ($link -match 'lg=zh') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'r18zh'
}
} else {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'r18'
}
}
} elseif ($link -match 'javlibrary.com' -or $link -match 'g46e.com' -or $link -match 'm45e.com' -or $link -match ($Settings.'javlibrary.baseurl' -replace 'http(s)?:\/\/')) {
if ($link -match '/ja/') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javlibraryja'
}
} elseif ($link -match '/cn/') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javlibraryzh'
}
} elseif ($link -match '/tw/') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javlibraryzh'
}
} else {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javlibrary'
}
}
} elseif ($link -match 'dmm.co.jp') {
if ($link -match '/en') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'dmm'
}
} else {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'dmmja'
}
}
} elseif ($link -match 'javbus') {
if ($link -match '/ja') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javbusja'
}
} elseif ($link -match '/zh') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javbuszh'
}
} else {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javbus'
}
}
} elseif ($link -match 'jav321.com') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'jav321ja'
}
} elseif ($link -match 'dl.getchu') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'dlgetchuja'
}
} elseif ($link -match 'mgstage') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'mgstageja'
}
} elseif ($link -match 'aventertainment') {
if ($link -match 'languageID=1') {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'aventertainment'
}
} else {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'aventertainmentja'
}
}
} elseif ($link -match 'javdb') {
if ($link -match 'locale=zh') {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'javdbzh'
}
} else {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'javdb'
}
}
} elseif ($link -match 'tokyo-hot') {
if ($link -match 'lang=ja') {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'tokyohotja'
}
} elseif ($link -match 'lang=zh') {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'tokyohotzh'
}
} else {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'tokyohot'
}
}
} else {
Write-JVLog -Write:$script:JVLogWrite -LogPath $script:JVLogPath -WriteLevel $script:JVLogWriteLevel -Level Warning -Message "[$($MyInvocation.MyCommand.Name)] [Url - $Url] not matched"
}
}
Write-Output $testUrlObject
}
}
function Get-JVUrlLocation {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
[PSObject]$Url,

[Parameter()]
[PSObject]$Settings
)

process {
$testUrlObject = @()
foreach ($link in $Url) {
if ($link -match 'javlibrary.com' -or $link -match 'g46e.com' -or $link -match 'm45e.com' -or $link -match ($Settings.'javlibrary.baseurl' -replace 'http(s)?:\/\/')) {
if ($link -match '/ja/') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javlibraryja'
}
} elseif ($link -match '/cn/') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javlibraryzh'
}
} elseif ($link -match '/tw/') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javlibraryzh'
}
} else {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javlibrary'
}
}
} elseif ($link -match 'dmm.co.jp') {
if ($link -match '/en') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'dmm'
}
} else {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'dmmja'
}
}
} elseif ($link -match 'javbus') {
if ($link -match '/ja') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javbusja'
}
} elseif ($link -match '/zh') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javbuszh'
}
} else {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'javbus'
}
}
} elseif ($link -match 'jav321.com') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'jav321ja'
}
} elseif ($link -match 'dl.getchu') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'dlgetchuja'
}
} elseif ($link -match 'mgstage') {
$testUrlObject += [PSCustomObject]@{
Url = $link
Source = 'mgstageja'
}
} elseif ($link -match 'aventertainment') {
if ($link -match 'languageID=1') {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'aventertainment'
}
} else {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'aventertainmentja'
}
}
} elseif ($link -match 'javdb') {
if ($link -match 'locale=zh') {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'javdbzh'
}
} else {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'javdb'
}
}
} elseif ($link -match 'tokyo-hot') {
if ($link -match 'lang=ja') {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'tokyohotja'
}
} elseif ($link -match 'lang=zh') {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'tokyohotzh'
}
} else {
$testUrlobject += [PSCustomObject]@{
Url = $link
Source = 'tokyohot'
}
}
} else {
Write-JVLog -Write:$script:JVLogWrite -LogPath $script:JVLogPath -WriteLevel $script:JVLogWriteLevel -Level Warning -Message "[$($MyInvocation.MyCommand.Name)] [Url - $Url] not matched"
}
}
Write-Output $testUrlObject
}
}
Loading

0 comments on commit f4dcb93

Please sign in to comment.