Skip to content

Commit

Permalink
Update endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyRacer1337 committed Mar 5, 2024
1 parent bc27193 commit 8bda2dd
Show file tree
Hide file tree
Showing 12 changed files with 1,530 additions and 1,440 deletions.
2 changes: 1 addition & 1 deletion install_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To start off with windows you only really need to manually install one thing and

**Step 4:** Now that you have the default config, you have to set it up correctly. I'm not going to go into detail about every setting as they are mostly labeled, I'll just do the ones to get you running. You are going to need to get an API key for namer to talk to TPDB.

To do that go [here](https://metadataapi.net) and make an account if you haven't already. Once you do go into your profile and create an API key. Call it whatever you want and then copy that key into the config in the `porndb_token` section.
To do that go [here](https://theporndb.net) and make an account if you haven't already. Once you do go into your profile and create an API key. Call it whatever you want and then copy that key into the config in the `porndb_token` section.

Scroll down until you see the `Watchdog` section. This is where we are going to setup your directories for your folders that namer will look for. It's super important that these are named correctly and **NOT INSIDE ONE ANOTHER**. Putting folders inside each other could result in unexpected errors and outputs.

Expand Down
2 changes: 1 addition & 1 deletion namer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
the form SITE.[YY]YY.MM.DD.String.of.performers.and.or.scene.name.<IGNORED_INFO>.[mp4|mkv|...]. In the name, read the
periods, ".", as any number of spaces " ", dashes "-", or periods ".".
Provided you have an access token to the porndb (free sign up) https://www.metadataapi.net/, this program will
Provided you have an access token to the porndb (free sign up) https://www.theporndb.net/, this program will
attempt to match your file's name to search results from the porndb. Please note that the site must at least be
a substring of the actual site name on the porndb, and the date must be within one day or the release date on the
porndb for a match to be considered. If the log file flag is enabled then a <original file name minus ext>_namer.json.gz
Expand Down
4 changes: 2 additions & 2 deletions namer/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class NamerConfig:
porndb_token: str
"""
token to access porndb.
sign up here: https://metadataapi.net/
sign up here: https://theporndb.net/
"""

name_parser: str = '{_site}{_optional_date}{_sep}{_ts}{_name}{_dot}{_ext}'
Expand Down Expand Up @@ -270,7 +270,7 @@ class NamerConfig:
Cleanup final filename
"""

override_tpdb_address: str = 'https://api.metadataapi.net'
override_tpdb_address: str = 'https://api.theporndb.net'
"""
Used only for testing, can override the location of the porn database - usually to point at a locally
running server that responds like tpdb to predefined queries.
Expand Down
4 changes: 2 additions & 2 deletions namer/metadataapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def download_file(url: str, file: Path, config: NamerConfig) -> bool:
headers = {
'User-Agent': 'namer-1',
}
if 'metadataapi.net' in url:
if 'theporndb.net' in url:
headers['Authorization'] = f'Bearer {config.porndb_token}'

http_file = Http.download_file(url, headers=headers)
Expand Down Expand Up @@ -554,7 +554,7 @@ def share_hash(metadata: LookedUpFileInfo, scene_hash: SceneHash, config: NamerC

def main(args_list: List[str]):
"""
Looks up metadata from metadataapi.net base on file name.
Looks up metadata from theporndb.net base on file name.
"""
description = """
Command line interface to look up a suggested name for an adult movie file based on an input string
Expand Down
2 changes: 1 addition & 1 deletion namer/namer.cfg.default
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[namer]

# token to access porndb.
# sign up here: https://metadataapi.net/register
# sign up here: https://theporndb.net/register
porndb_token = ****************************************

# You should likely never edit this, unless you know regex really well and wont ask for help when you mess up.
Expand Down
2 changes: 1 addition & 1 deletion namer/namer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
File names are assumed to be of the form SITE.[YY]YY.MM.DD.String.of.performers.and.or.scene.name.<IGNORED_INFO>.[mp4|mkv].
In the name, read the periods, ".", as any number of spaces " ", dashes "-", or periods ".".
Provided you have an access token to the porndb (free sign up) https://www.metadataapi.net/, this program will
Provided you have an access token to the porndb (free sign up) https://www.theporndb.net/, this program will
attempt to match your file's name to search results from the porndb. Please note that the site must at least be
a substring of the actual site name on the porndb, and the date must be within one day or the release date on the
porndb for a match to be considered. If the log file flag is enabled then a <original file name minus ext>_namer.json.gz
Expand Down
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.2",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"datatables.net": "^1.13.8",
"datatables.net-bs5": "^1.13.8",
"datatables.net-buttons": "^2.4.2",
"datatables.net-buttons-bs5": "^2.4.2",
"datatables.net-colreorder": "^1.7.0",
"datatables.net-colreorder-bs5": "^1.7.0",
"datatables.net-fixedheader": "^3.4.0",
"datatables.net-fixedheader-bs5": "^3.4.0",
"datatables.net-responsive": "^2.5.0",
"datatables.net-responsive-bs5": "^2.5.0",
"datatables.net": "^2.0.0",
"datatables.net-bs5": "^2.0.0",
"datatables.net-buttons": "^3.0.0",
"datatables.net-buttons-bs5": "^3.0.0",
"datatables.net-colreorder": "^2.0.0",
"datatables.net-colreorder-bs5": "^2.0.0",
"datatables.net-fixedheader": "^4.0.0",
"datatables.net-fixedheader-bs5": "^4.0.0",
"datatables.net-responsive": "^3.0.0",
"datatables.net-responsive-bs5": "^3.0.0",
"jquery": "^3.7.1",
"lodash": "^4.17.21"
},
"devDependencies": {
"@babel/core": "^7.23.7",
"@babel/preset-env": "^7.23.8",
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.9.1",
"css-loader": "^6.10.0",
"css-minimizer-webpack-plugin": "^5.0.1",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
Expand All @@ -44,14 +44,14 @@
"html-minimizer-webpack-plugin": "^4.4.0",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"mini-css-extract-plugin": "^2.7.7",
"postcss": "^8.4.33",
"mini-css-extract-plugin": "^2.8.0",
"postcss": "^8.4.35",
"postcss-loader": "^7.3.4",
"postcss-preset-env": "^9.3.0",
"sass": "^1.70.0",
"postcss-preset-env": "^9.4.0",
"sass": "^1.71.1",
"sass-loader": "^13.3.3",
"terser-webpack-plugin": "^5.3.10",
"webpack": "^5.89.0",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4"
}
}
Loading

0 comments on commit 8bda2dd

Please sign in to comment.