Skip to content

Commit

Permalink
Merge pull request #73 from nwithan8/develop
Browse files Browse the repository at this point in the history
Prep for 1.2.3.1 patch release
  • Loading branch information
nwithan8 authored Jan 11, 2021
2 parents cb8f447 + 0a822f2 commit 1def173
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dizqueTV/_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '1.2.3.0'
__version__ = '1.2.3.1'

__title__ = "dizqueTV"
__author__ = 'Nate Harris'
Expand Down
34 changes: 17 additions & 17 deletions dizqueTV/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def update(self,
if use_global_settings:
new_settings = CHANNEL_FFMPEG_SETTINGS_DEFAULT
else:
new_settings = decorators._combine_settings(new_settings_dict=kwargs,
new_settings = helpers._combine_settings(new_settings_dict=kwargs,
template_dict=self._data)
if self._dizque_instance.update_channel(channel_number=self._channel_instance.number,
transcoding=new_settings):
Expand Down Expand Up @@ -196,7 +196,7 @@ def update(self,
:return: True if successful, False if unsuccessful (Channel reloads in-place, this Schedule object is destroyed)
:rtype: bool
"""
new_settings = decorators._combine_settings_add_new(new_settings_dict=kwargs,
new_settings = helpers._combine_settings_add_new(new_settings_dict=kwargs,
template_dict=(self._data
if self._data else SCHEDULE_SETTINGS_DEFAULT)
)
Expand All @@ -222,9 +222,9 @@ def add_time_slot(self,
else:
if time_string:
kwargs['time'] = helpers.convert_24_time_to_milliseconds_past_midnight(time_string=time_string)
new_settings_filtered = decorators._filter_dictionary(new_dictionary=kwargs,
new_settings_filtered = helpers._filter_dictionary(new_dictionary=kwargs,
template_dict=TIME_SLOT_SETTINGS_TEMPLATE)
if not decorators._settings_are_complete(new_settings_dict=new_settings_filtered,
if not helpers._settings_are_complete(new_settings_dict=new_settings_filtered,
template_settings_dict=TIME_SLOT_SETTINGS_TEMPLATE):
raise GeneralException("Missing settings required to make a time slot.")

Expand Down Expand Up @@ -258,7 +258,7 @@ def edit_time_slot(self, time_slot: TimeSlot, time_string: str = None, **kwargs)
if slot['time'] != time_slot.time:
new_slots.append(slot)
else:
new_slot_data = decorators._combine_settings(new_settings_dict=kwargs, template_dict=slot)
new_slot_data = helpers._combine_settings(new_settings_dict=kwargs, template_dict=slot)
new_slots.append(new_slot_data)
return self.update(slots=new_slots)

Expand Down Expand Up @@ -503,7 +503,7 @@ def add_program(self,
template = EPISODE_PROGRAM_TEMPLATE
elif kwargs['type'] == 'redirect':
template = REDIRECT_PROGRAM_TEMPLATE
if decorators._settings_are_complete(new_settings_dict=kwargs,
if helpers._settings_are_complete(new_settings_dict=kwargs,
template_settings_dict=template,
ignore_keys=['_id', 'id']):
channel_data = self._data
Expand Down Expand Up @@ -728,7 +728,7 @@ def add_filler_list(self,
'weight': weight,
'cooldown': cooldown
}
if decorators._settings_are_complete(new_settings_dict=new_settings_dict,
if helpers._settings_are_complete(new_settings_dict=new_settings_dict,
template_settings_dict=FILLER_LIST_CHANNEL_TEMPLATE,
ignore_keys=['_id', 'id']):
channel_data = self._data
Expand Down Expand Up @@ -788,10 +788,10 @@ def add_schedule(self, time_slots: List[TimeSlot], **kwargs) -> bool:
"""
for slot in time_slots:
kwargs['slots'].append(slot._data)
schedule_settings = decorators._combine_settings_enforce_types(new_settings_dict=kwargs,
schedule_settings = helpers._combine_settings_enforce_types(new_settings_dict=kwargs,
template_dict=SCHEDULE_SETTINGS_TEMPLATE,
default_dict=SCHEDULE_SETTINGS_DEFAULT)
if decorators._settings_are_complete(new_settings_dict=schedule_settings,
if helpers._settings_are_complete(new_settings_dict=schedule_settings,
template_settings_dict=SCHEDULE_SETTINGS_TEMPLATE):
schedule = Schedule(data=schedule_settings, dizque_instance=None, channel_instance=self)
return self._dizque_instance._make_schedule(channel=self, schedule=schedule)
Expand Down Expand Up @@ -1006,7 +1006,7 @@ def remove_redirects(self) -> bool:
"""
non_redirects = []
for item in self.programs:
if not decorators._object_has_attribute(obj=item, attribute_name='type') or item.type != 'redirect':
if not helpers._object_has_attribute(obj=item, attribute_name='type') or item.type != 'redirect':
non_redirects.append(item)
if non_redirects and self.delete_all_programs():
return self.add_programs(programs=non_redirects)
Expand All @@ -1022,10 +1022,10 @@ def remove_specials(self) -> bool:
:rtype: bool
"""
non_redirects = [item for item in self.programs if
(decorators._object_has_attribute(obj=item, attribute_name='type')
(helpers._object_has_attribute(obj=item, attribute_name='type')
and item.type != 'redirect')]
non_specials = [item for item in non_redirects if
(decorators._object_has_attribute(obj=item, attribute_name='season')
(helpers._object_has_attribute(obj=item, attribute_name='season')
and item.season != 0)]
if non_specials and self.delete_all_programs():
return self.add_programs(programs=non_specials)
Expand Down Expand Up @@ -1077,7 +1077,7 @@ def add_reruns(self,
raise GeneralException("You cannot use a start time in the future.")
start_time = start_time.strftime("%Y-%m-%dT%H:%M:%S.000Z")
self.remove_duplicate_programs()
programs_to_add, running_time = decorators._get_first_x_minutes_of_programs(programs=self.programs,
programs_to_add, running_time = helpers._get_first_x_minutes_of_programs(programs=self.programs,
minutes=length_hours * 60)
if running_time < (length_hours * 60 * 60 * 1000):
time_needed = (length_hours * 60 * 60 * 1000) - running_time
Expand Down Expand Up @@ -1129,7 +1129,7 @@ def add_channel_at_night(self,
programs_left = self.programs
while programs_left: # loop until you get done with all the programs
programs_to_add, total_running_time, programs_left = \
decorators._get_first_x_minutes_of_programs_return_unused(programs=programs_left,
helpers._get_first_x_minutes_of_programs_return_unused(programs=programs_left,
minutes=int(
length_of_regular_block / 1000 / 60)
)
Expand Down Expand Up @@ -1190,7 +1190,7 @@ def add_channel_at_night_alt(self,
)
final_programs_to_add = []
all_programs = self.programs
programs_to_add, total_running_time = decorators._get_first_x_minutes_of_programs(
programs_to_add, total_running_time = helpers._get_first_x_minutes_of_programs(
programs=all_programs,
minutes=int(
time_until_night_block_start / 1000 / 60)
Expand All @@ -1212,7 +1212,7 @@ def add_channel_at_night_alt(self,
else: # need to interlace programs and night channels
programs_left = all_programs
programs_to_add, total_running_time, programs_left = \
decorators._get_first_x_minutes_of_programs_return_unused(programs=programs_left,
helpers._get_first_x_minutes_of_programs_return_unused(programs=programs_left,
minutes=int(
time_until_night_block_start / 1000 / 60)
)
Expand All @@ -1231,7 +1231,7 @@ def add_channel_at_night_alt(self,
final_programs_to_add = programs_to_add
while programs_left: # loop until you get done with all the programs
programs_to_add, total_running_time, programs_left = \
decorators._get_first_x_minutes_of_programs_return_unused(programs=programs_left,
helpers._get_first_x_minutes_of_programs_return_unused(programs=programs_left,
minutes=int(
length_of_regular_block / 1000 / 60)
)
Expand Down

0 comments on commit 1def173

Please sign in to comment.