-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AUD-1451] Add new playlist trending strategy (#2889)
* [AUD-1451] Add new playlist trending strategy * Fix lint * Fix lint
- Loading branch information
1 parent
a52c76a
commit ef27aad
Showing
4 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
discovery-provider/src/trending_strategies/BDNxn_trending_playlists_strategy.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from src.trending_strategies.base_trending_strategy import BaseTrendingStrategy | ||
from src.trending_strategies.EJ57D_trending_tracks_strategy import z | ||
from src.trending_strategies.trending_type_and_version import ( | ||
TrendingType, | ||
TrendingVersion, | ||
) | ||
|
||
|
||
class TrendingPlaylistsStrategyBDNxn(BaseTrendingStrategy): | ||
def __init__(self): | ||
super().__init__(TrendingType.PLAYLISTS, TrendingVersion.BDNxn) | ||
|
||
def get_track_score(self, time_range, playlist): | ||
return z(time_range, playlist) | ||
|
||
def get_score_params(self): | ||
return {"zq": 1000, "xf": True, "pt": 0, "mt": 3} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ class TrendingType(Enum): | |
|
||
class TrendingVersion(Enum): | ||
EJ57D = "EJ57D" | ||
BDNxn = "BDNxn" |