mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-20 10:13:39 +00:00
Added startstop.sh file to easily start / stop PseudoChannel.py in the background. Also loggin support in ./pseudo-channel.log
This commit is contained in:
@@ -16,6 +16,7 @@ from plexapi.server import PlexServer
|
||||
import sys
|
||||
import datetime
|
||||
from datetime import time
|
||||
import logging
|
||||
import calendar
|
||||
import itertools
|
||||
import argparse
|
||||
@@ -56,6 +57,8 @@ class PseudoChannel():
|
||||
|
||||
def __init__(self):
|
||||
|
||||
logging.basicConfig(filename="pseudo-channel.log", level=logging.INFO)
|
||||
|
||||
self.db = PseudoChannelDatabase("pseudo-channel.db")
|
||||
|
||||
self.controller = PseudoDailyScheduleController(
|
||||
@@ -1060,7 +1063,7 @@ if __name__ == '__main__':
|
||||
|
||||
"""
|
||||
|
||||
|
||||
logging.info("+++++ Running PseudoChannel.py -r")
|
||||
|
||||
def trigger_what_should_be_playing_now():
|
||||
|
||||
@@ -1233,6 +1236,8 @@ if __name__ == '__main__':
|
||||
|
||||
if sleep_before_triggering_play_now:
|
||||
|
||||
logging.info("+++++ Successfully started PseudoChannel.py")
|
||||
|
||||
trigger_what_should_be_playing_now()
|
||||
|
||||
sleep_before_triggering_play_now = 0
|
||||
|
||||
Reference in New Issue
Block a user