Skip to content

Commit

Permalink
refactor(recognize enhance): disney -> DSNP
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyanling committed Sep 8, 2023
1 parent 692f5ff commit 81190bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/media/meta/metavideov2.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,15 @@ def __init_resource_type(self):
if not StringUtils.is_string_and_not_empty(streaming_services):
return

streaming_services = "AMZN" if streaming_services.lower() == "amazon prime" else streaming_services
if StringUtils.is_string_and_not_empty(self.resource_type):
self.resource_type += f" {streaming_services}"
else:
self.resource_type = streaming_services

self.resource_type = re.sub(r'\+', '', self.resource_type)
self.resource_type = re.sub(r'(?i)amazon prime', 'AMZN', self.resource_type)
self.resource_type = re.sub(r'(?i)disney', 'DSNP', self.resource_type)

def __init_resource_effect(self):
title_resource_effects = self._media_item_title.other.other
subltitle_resource_effects = self._media_item_subtitle.other.other
Expand Down

0 comments on commit 81190bc

Please sign in to comment.