Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Projet tutoré S5
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DUCRUET THIBAULT p2306959
Projet tutoré S5
Commits
33dda7a0
Commit
33dda7a0
authored
1 year ago
by
sacha
Browse files
Options
Downloads
Patches
Plain Diff
derniere maj
parent
c5c0f621
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/src/controllers/recommendation.js
+1
-7
1 addition, 7 deletions
backend/src/controllers/recommendation.js
with
1 addition
and
7 deletions
backend/src/controllers/recommendation.js
+
1
−
7
View file @
33dda7a0
...
...
@@ -25,7 +25,7 @@ async function recommendationForUser(user_login, max_number = 3) {
let
user
=
User
.
toUser
(
await
getUserInformations
(
user_login
));
let
movies
=
await
getSeenMoviesInfos
(
user_login
);
user
.
movies
=
movies
;
//let fav_duration;
...
...
@@ -118,8 +118,6 @@ function comparerLignes(a, b) {
function
getAllAuthors
(
seen
)
{
let
authors
=
[[]];
console
.
log
(
"
getAllAuthors(seen)
"
);
console
.
log
(
seen
);
//1er indice = indice du couple auteur/nombre d'apparition/moyenne notes films, 2e indice: 0 auteur, 1 nbr apparition, 2 mpyenne films
for
(
let
i
=
0
;
i
<
seen
.
length
;
i
++
)
{
let
j
=
0
;
...
...
@@ -139,10 +137,7 @@ function getAllAuthors(seen) {
for
(
let
i
=
0
;
i
<
authors
.
length
;
i
++
)
{
authors
[
i
][
2
]
/=
authors
[
i
][
1
];
}
console
.
log
(
authors
);
authors
.
sort
(
comparerLignes
);
console
.
log
(
authors
);
console
.
log
(
"
fin
"
);
return
authors
;
}
...
...
@@ -161,7 +156,6 @@ function getAllElement(seen, recupElement) {
let
j
=
0
;
let
found
=
false
;
temp_elements
=
recupElement
(
seen
[
i
]);
console
.
log
(
temp_elements
);
//liste d'acteurs
for
(
let
h
=
0
;
h
<
temp_elements
.
length
;
h
++
)
{
while
(
j
<
elements
.
length
&&
!
found
)
{
if
(
elements
[
j
][
0
]
==
recupElement
(
temp_elements
[
h
]))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment