Skip to content

Commit

Permalink
Merge pull request #123 from jvlflame/dev
Browse files Browse the repository at this point in the history
2.1.1
  • Loading branch information
jvlflame authored Oct 5, 2020
2 parents 0414e2c + c3ee6e4 commit dce60dc
Show file tree
Hide file tree
Showing 11 changed files with 273 additions and 66 deletions.
17 changes: 17 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ 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.1.1]

### Added
- Setting `sort.format.outputfolder` to create a static or dynamic output folder for sorted movies in the destination path (#115)
- This setting accepts a format string (i.e. `"sort.format.outputfolder": "<STUDIO>"` will sort movies into a folder of their studio name in the destination path)
- Setting `sort.metadata.nfo.altnamerole` to add the actress `<altname>` as the actress role (#110)
- Setting `javlibrary.cookie.session` and `javlibrary.cookie.userid` to set a path of movies as 'Owned' on JavLibrary. This runs on a single thread and is not affected by throttlelimit (#119)
- Log into JavLibrary and view browser cookies [www.javlibrary.com / Cookies / session] and [www.javlibrary.com / Cookies / userid] and define them in your settings
- Usage: `Javinizer -Path 'C:\JAV\Sorted' -Recurse -SetOwned`
- Setting `sort.metadata.nfo.originalpath` to add the path the movie was last sorted from to the nfo file under field `<originalpath>` (#116)

### Changed
- `<altname>` in the actress metadata in the nfo is now dynamic based on the selected actress name language (#110)

### Fixed
- Sort no longer fails when newlines are present in R18 maker and label metadata output (#121)

## [2.1.0]

### Added
Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ Javinizer [[-Path] <String>] [[-DestinationPath] <String>] [-Recurse] [-Depth <I
[-SettingsPath <FileInfo>] [-Strict] [-MoveToFolder <Boolean>] [-RenameFile <Boolean>] [-Force] [-HideProgress]
[-Update] [-IsThread] [-Set <Hashtable>] [<CommonParameters>]
Javinizer [[-Path] <String>] [-Recurse] [-Depth <Int32>] -UpdateNfo [<CommonParameters>]
Javinizer [[-Path] <String>] [-Recurse] [-Depth <Int32>] [-SettingsPath <FileInfo>] -UpdateNfo [<CommonParameters>]
Javinizer [[-Path] <String>] [-Recurse] [-Depth <Int32>] [-SettingsPath <FileInfo>] [-Strict] [-HideProgress]
[-SetOwned] [-Set <Hashtable>] [<CommonParameters>]
Javinizer [-SettingsPath <FileInfo>] [-Find] <PSObject> [-Aggregated] [-Nfo] [-R18] [-R18Zh] [-Dmm] [-DmmJa]
[-Javlibrary] [-JavlibraryZh] [-JavlibraryJa] [-Javbus] [-JavbusJa] [-JavbusZh] [-Jav321Ja] [-Set <Hashtable>]
Expand Down Expand Up @@ -242,6 +245,9 @@ PARAMETERS
-Set <Hashtable>
Specifies a hashtable to update specific settings on the command-line.
-SetOwned [<SwitchParameter>]
Specifies to set a path of movie files as owned on JavLibrary.
-Version [<SwitchParameter>]
Specifies to display the Javinizer module version.
Expand Down Expand Up @@ -379,6 +385,14 @@ Description
-----------
Opens the settings file.
-------------------------- EXAMPLE 15 --------------------------
PS > Javinizer -Path 'C:\JAV\Sorted' -Recurse -SetOwned
Description
-----------
Sets movies detected in a directory as owned on JavLibrary.
```

### Supported multi-part-video naming schemes
Expand Down Expand Up @@ -554,6 +568,8 @@ For example, if your jvGenres.csv file looks like this:
| `sort.format.delimiter` | Specifies the delimiter between actresses when using \<ACTORS> in the format string. | Any string value
| `sort.format.file` | Specifies the format string when renaming a file. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.folder` | Specifies the format string when creating the folder. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.outputfolder` | Specifies the format string when creating an output folder in the destination path. Leaving this blank will omit creating the output folder. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.thumbimg` | Specifies the format string when creating the thumbnail image. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.posterimg` | Specifies an array of format strings when creating the poster image. Multiple strings will allow you to create multiple poster image files. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.thumbimg` | Specifies the format string when creating the thumbnail image. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.trailervid` | Specifies the format string when creating the trailer video. | [Format Strings](#Metadata-Format-Strings)
Expand All @@ -562,6 +578,7 @@ For example, if your jvGenres.csv file looks like this:
| `sort.format.screenshotfolder` | Specifies the format string when creating the screenshot images folder. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.actressimgfolder` | Specifies the format string when creating the actress image folder. | [Format Strings](#Metadata-Format-Strings)
| `sort.metadata.nfo.mediainfo` | Specifies to add media metadata information to the nfo file. This requires the MediaInfo command line application. | 0, 1
| `sort.metadata.nfo.altnamerole` | Specifies to set the actress role in the nfo as the altname. | 0, 1
| `sort.metadata.nfo.translatedescription` | Specifies to translate the description. | 0, 1
| `sort.metadata.nfo.translatedescription.language` | Specifies which language to translate to. | Check [here](https://developers.google.com/admin-sdk/directory/v1/languages) for language codes
| `sort.metadata.nfo.displayname` | Specifies the format string of the displayname in the metadata nfo file. | [Format Strings](#Metadata-Format-Strings)
Expand All @@ -570,6 +587,7 @@ For example, if your jvGenres.csv file looks like this:
| `sort.metadata.nfo.format.tagline` | Specifies the format string to add a tagline to the aggregated data object | [Format Strings](#Metadata-Format-Strings)
| `sort.metadata.nfo.actresslanguageja` | Specifies to prefer Japanese names when creating the metadata nfo. | 0, 1
| `sort.metadata.nfo.unknownactress` | Specifies to add an 'Unknown' actress to scraped movies without any actresses | 0, 1
| `sort.metadata.nfo.originalpath` | Specifies to add an 'originalpath' field to the nfo specifying the location the movie was last sorted from. | 0, 1
| `sort.metadata.thumbcsv` | Specifies to use the thumbnail csv when aggregating metadata. | 0, 1
| `sort.metadata.thumbcsv.autoadd` | Specifies to automatically add missing actresses to the thumbnail csv when scraping using the R18 or R18Zh scrapers. | 0, 1
| `sort.metadata.thumbcsv.convertalias` | Specifies to use the thumbnail csv alias field to replace actresses in the metadata. | 0, 1
Expand Down
2 changes: 1 addition & 1 deletion 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.1.0'
ModuleVersion = '2.1.1'

# Supported PSEditions
# CompatiblePSEditions = @('Core')
Expand Down
4 changes: 3 additions & 1 deletion src/Javinizer/Private/Scraper.R18.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function Get-R18Maker {

process {
$maker = ((($Webrequest.Content -split '<dd itemprop="productionCompany" itemscope itemtype="http:\/\/schema.org\/Organization\">')[1] -split '<\/a>')[0] -split '>')[1]
$maker = Convert-HtmlCharacter -String $maker
$maker = Convert-HtmlCharacter -String ($maker -replace '\n', ' ')

if ($maker -eq '----') {
$maker = $null
Expand Down Expand Up @@ -211,6 +211,8 @@ function Get-R18Label {
}
}

$label = $label -replace '\n', ' '

if ($label -eq '----') {
$label = $null
}
Expand Down
48 changes: 0 additions & 48 deletions src/Javinizer/Private/Set-JavlibraryOwned.ps1

This file was deleted.

6 changes: 4 additions & 2 deletions src/Javinizer/Private/Test-JVSettings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ function Test-JVSettings {
'sort.download.thumbimg',
'sort.download.trailervid',
'sort.metadata.genrecsv',
'sort.metadata.nfo.altnamerole',
'sort.metadata.nfo.actresslanguageja',
'sort.metadata.nfo.firstnameorder',
'sort.metadata.nfo.translatedescription',
'sort.metadata.nfo.originalpath',
'sort.metadata.thumbcsv.convertalias',
'sort.metadata.thumbcsv.autoadd',
'sort.metadata.thumbcsv',
Expand All @@ -115,8 +117,8 @@ function Test-JVSettings {
'emby.apikey',
'emby.url',
'javlibrary.baseurl',
'javlibrary.sessioncookie',
'javlibrary.username',
'javlibrary.cookie.session',
'javlibrary.cookie.userid',
'match.regex.string',
'sort.format.actressimgfolder',
'sort.format.file',
Expand Down
46 changes: 43 additions & 3 deletions src/Javinizer/Public/Get-JVNfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ function Get-JVNfo {
[Boolean]$ActressLanguageJa,

[Parameter()]
[Boolean]$NameOrder
[Boolean]$NameOrder,

[Parameter()]
[String]$OriginalPath,

[Parameter()]
[Boolean]$AltNameRole
)

process {
Expand Down Expand Up @@ -128,6 +134,15 @@ function Get-JVNfo {
"@

if ($OriginalPath) {
$originalPathNfoString = @"
<originalpath>$OriginalPath</originalpath>
"@
$nfoString = $nfoString + $originalPathNfoString

}

foreach ($item in $Tag) {
$tagNfoString = @"
<tag>$item</tag>
Expand All @@ -150,6 +165,13 @@ function Get-JVNfo {
if ($ActressLanguageJa) {
if ($null -ne $item.JapaneseName) {
$actressName = ($item.JapaneseName)
if ($null -ne $item.FirstName -or $null -ne $item.LastName) {
if ($NameOrder) {
$altName = ("$($item.FirstName) $($item.LastName)").Trim()
} else {
$altName = ("$($item.LastName) $($item.FirstName)").Trim()
}
}
}

if ($null -eq $actressName) {
Expand All @@ -159,6 +181,7 @@ function Get-JVNfo {
} else {
$actressName = ("$($item.LastName) $($item.FirstName)").Trim()
}
$altName = $null
}
}
} else {
Expand All @@ -168,25 +191,42 @@ function Get-JVNfo {
} else {
$actressName = ("$($item.LastName) $($item.FirstName)").Trim()
}

if ($null -ne $item.JapaneseName) {
$altName = ($item.JapaneseName)
}
}

if ($null -eq $actressName) {
if ($null -ne $item.JapaneseName) {
$actressName = ($item.JapaneseName).Trim()
}
$altName = $null
}
}

if ($AltNameRole) {
$actressNfoString = @"
<actor>
<name>$actressName</name>
<altname>$altName</altname>
<thumb>$($item.ThumbUrl)</thumb>
<role>$altName</role>
</actor>
$actressNfoString = @"
"@
} else {
$actressNfoString = @"
<actor>
<name>$actressName</name>
<altname>$($item.JapaneseName)</altname>
<altname>$altName</altname>
<thumb>$($item.ThumbUrl)</thumb>
<role>Actress</role>
</actor>
"@
}

$nfoString = $nfoString + $actressNfoString
}

Expand Down
Loading

0 comments on commit dce60dc

Please sign in to comment.