mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2026-01-04 01:03:14 +00:00
Added random movie logic but commenting it out for now.
This commit is contained in:
@@ -29,6 +29,7 @@ from src import Music
|
||||
from src import Video
|
||||
from src import PseudoDailyScheduleController
|
||||
from src import PseudoChannelCommercial
|
||||
from src import PseudoChannelRandomMovie
|
||||
import pseudo_config as config
|
||||
|
||||
reload(sys)
|
||||
@@ -62,6 +63,9 @@ class PseudoChannel():
|
||||
self.CONTROLLER_SERVER_PORT,
|
||||
self.DEBUG
|
||||
)
|
||||
|
||||
self.movieMagic = PseudoChannelRandomMovie()
|
||||
|
||||
"""Database functions.
|
||||
update_db(): Grab the media from the Plex DB and store it in the local pseudo-channel.db.
|
||||
drop_db(): Drop the local database. Fresh start.
|
||||
@@ -423,11 +427,30 @@ class PseudoChannel():
|
||||
d[key] = val.split(',')
|
||||
for movie in movies.search(None, **d):
|
||||
movies_list.append(movie)
|
||||
|
||||
"""the_movie = self.db.get_movie(self.movieMagic.get_random_movie_xtra(
|
||||
self.db.get_movies(),# Movies DB
|
||||
movies_list # XTRA List
|
||||
)
|
||||
)"""
|
||||
|
||||
"""Updating movies table in the db with lastPlayedDate entry"""
|
||||
self.db.update_movies_table_with_last_played_date(the_movie[3])
|
||||
|
||||
the_movie = self.db.get_movie(random.choice(movies_list).title)
|
||||
except:
|
||||
print("For some reason, I've failed getting movie with xtra args.")
|
||||
the_movie = self.db.get_random_movie()
|
||||
else:
|
||||
|
||||
"""the_movie = self.db.get_movie(self.movieMagic.get_random_movie(
|
||||
self.db.get_movies(),# Movies DB
|
||||
)
|
||||
)"""
|
||||
|
||||
"""Updating movies table in the db with lastPlayedDate entry"""
|
||||
self.db.update_movies_table_with_last_played_date(the_movie[3])
|
||||
|
||||
the_movie = self.db.get_random_movie()
|
||||
else:
|
||||
the_movie = self.db.get_movie(entry[3])
|
||||
|
||||
Reference in New Issue
Block a user