Skip to content
This repository was archived by the owner on Jan 1, 2021. It is now read-only.

Commit 82f5ebd

Browse files
committed
Merge branch 'master' of github.com:Radarr/RadarrAPI.TMDB
2 parents 01062e7 + 095cdc2 commit 82f5ebd

1 file changed

Lines changed: 65 additions & 30 deletions

File tree

mappings/brainstorming.md

Lines changed: 65 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@
22

33
Master Table:
44

5-
| id | tmdbid | imdbid | report_count | locked |
6-
|---|----|----|---|---|
7-
| 1 | 11 | tt000011 | 13 | true |
8-
| 2 | 2 | tt000002 | -4 | true |
9-
| 3 | 11 | tt000011 | -5 | true |
10-
| 4 | 2 | tt000002 | 4 | false |
5+
| id | tmdbid | imdbid | report_count | total_reports | locked |
6+
|---|----|----|---|---|---|
7+
| 1 | 11 | tt000011 | 13 | 15 | true |
8+
| 2 | 2 | tt000002 | -4 | 6 | true |
9+
| 3 | 11 | tt000011 | -5 | 10 | true |
10+
| 4 | 2 | tt000002 | 4 | 50 | false |
1111

1212
Title Mappings:
1313

14-
| master_id (Foreign Key) | aka_title |
15-
|----------|---------------------|
16-
| 1 | Star Wars: Whatevs |
17-
| 2 | Ariel: What a beach |
18-
| | |
14+
| mappingsid (Foreign Key) | aka_title | aka_clean_title |
15+
|----------|---------------------|---------|
16+
| 1 | Star Wars: Whatevs | starwarswhatevs |
17+
| 2 | Ariel: What a beach | arielwhatbeach |
18+
| | | |
19+
20+
**Note:** Clean title is used to ensure that only one mapping per aka_title exists (should be unique). It also should help mapping with e.g. files.
1921

2022
Year Mappings:
2123

22-
| master_id (Foreign Key) | aka_year |
24+
| mappingsid (Foreign Key) | aka_year |
2325
|----------|----------|
2426
| 3 | 1978 |
2527
| 4 | 1999 |
@@ -54,7 +56,9 @@ Add new Mapping
5456
"type" : "title",
5557
"tmdbid" : 11,
5658
"imdbid" : "tt0000011",
57-
"aka_title" : "Star Wars"
59+
"aka_title" : "Star Wars",
60+
"report_count" : 1,
61+
"total_reports" : 1
5862
}
5963
```
6064

@@ -63,7 +67,9 @@ Add new Mapping
6367
"type" : "year",
6468
"tmdbid" : 11,
6569
"imdbid" : "tt0000011",
66-
"aka_year" : 1978
70+
"aka_year" : 1978,
71+
"report_count" : 1,
72+
"total_reports" : 1
6773
}
6874
```
6975

@@ -76,29 +82,58 @@ Retrieve mappings for movie
7682
|--------|----------|---------------------|------|
7783
| tmdbid | int | only when imdbid is present | - |
7884
| imdbid | string (must match: /tt\d{7}/) | only when tmdbid is present | - |
85+
| type | string (either "title", "year" or "all" | yes | all |
7986
| min_report | int | yes | 3 |
8087

8188
#### Sample Request
8289

83-
`GET /mappings/get?tmdbid=11&min_report=5`
90+
`GET /mappings/get?tmdbid=11&min_report=-50`
91+
`GET /mappings/get?tmdbid=11&min_report=5&type=title`
8492

8593
#### Sample Response
8694

8795
```
88-
[
89-
{
90-
"type" : "title",
91-
"tmdbid" : 11,
92-
"imdbid" : "tt0000011",
93-
"aka_title" : "Star Wars"
94-
},
95-
{
96-
"type" : "year",
97-
"tmdbid" : 11,
98-
"imdbid" : "tt0000011",
99-
"aka_year" : 1978
100-
}
101-
]
96+
{
97+
"tmdbid" : 11,
98+
"imdbid" : "tt0000011",
99+
"titles" : [
100+
{
101+
"id" : 1,
102+
"type" : "title",
103+
"aka_title" : "Star Wars",
104+
"report_count" : 15,
105+
"total_reports" : 20,
106+
"locked" : false
107+
}
108+
],
109+
"years" : [
110+
{
111+
"id" : 2,
112+
"type" : "year",
113+
"aka_year" : 1978,
114+
"report_count" : -4,
115+
"total_reports" : 6,
116+
"locked" : true
117+
}
118+
]
119+
}
120+
```
121+
122+
```
123+
{
124+
"tmdbid" : 11,
125+
"imdbid" : "tt0000011",
126+
"titles" : [
127+
{
128+
"id" : 1,
129+
"type" : "title",
130+
"aka_title" : "Star Wars",
131+
"report_count" : 15,
132+
"total_reports" : 20,
133+
"locked" : false
134+
}
135+
]
136+
}
102137
```
103138

104139
## "Rate Limiting"
@@ -107,7 +142,7 @@ Each IP Address can only "vote" on a mapping once a day.
107142

108143
### Table for IP Addresses
109144

110-
| ip | masterid |
145+
| ip | mappingsid |
111146
|--|--|
112147
| 192.168.1.117 | 2 |
113148

0 commit comments

Comments
 (0)