Skip to content

Commit

Permalink
Classifier - offline recommendation working
Browse files Browse the repository at this point in the history
offline recommendation is as expected
  • Loading branch information
electron0zero committed Nov 28, 2016
1 parent 8fb296d commit e079082
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions recommend/classifier/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if you get error regarding ntlk data, follow this

`
Go into a python shell and type:
>>> import nltk
>>> nltk.download()
Then an installation window appears. Go to the 'Models' tab and select 'punkt' from under the 'Identifier' column. Then click Download and it will install the necessary files. Then it should work!
`

5 changes: 3 additions & 2 deletions recommend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def extraSetup(self):
# Lists
self.playlistView = self.window.Playlist
self.recommendLocalListView = self.window.RecommendLocal
self.recommendLocalListView.doubleClicked.connect(self.recommendLocalListViewDoubleClickHandler)
# self.recommendOnlineListView = self.window.RecommendOnline
# Song Info section
self.posterView = self.window.PosterView
Expand Down Expand Up @@ -376,7 +377,6 @@ def currentMediaChangedHandler(self):
self.recommendLocalListView.setColumnWidth(2, 100)
self.recommendLocalListView.setTabKeyNavigation(False)
self.recommendLocalListView.setCornerButtonEnabled(False)
self.recommendLocalListView.doubleClicked.connect(self.recommendLocalListViewDoubleClickHandler)

def recommendLocalListViewDoubleClickHandler(self, index):
print("recommendLocalListView item double clicked")
Expand All @@ -394,9 +394,10 @@ def recommendLocalListViewDoubleClickHandler(self, index):
mediaItemIndex = self.mediaPlaylistPathList.index(pathOfSong)
print("index in playlist of song")
print(mediaItemIndex)
self.mediaPlaylist.setCurrentIndex(mediaItemIndex)
self.playlistView.selectRow(mediaItemIndex)
else:
print("failed to play song")
# self.mediaPlaylist.setCurrentIndex(10)

def seekPosition(self, position):
# print("seek position called")
Expand Down

0 comments on commit e079082

Please sign in to comment.