talklib 3.4.1__tar.gz → 3.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: talklib
3
- Version: 3.4.1
3
+ Version: 3.4.3
4
4
  Summary: A package to automate processing of shows/segments airing on the TL
5
5
  Author-email: Ben Weddle <ben.weddle@gmail.com>
6
6
  Maintainer-email: Ben Weddle <ben.weddle@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "talklib"
3
- version = "3.4.1"
3
+ version = "3.4.3"
4
4
  description = "A package to automate processing of shows/segments airing on the TL"
5
5
  readme = "README.md"
6
6
  license = {file = "LICENSE.txt"}
@@ -48,7 +48,7 @@ class Notifications(BaseModel):
48
48
  self.prep_syslog(message=message, level=syslog_level)
49
49
 
50
50
  class SSH(BaseModel):
51
- server: str = "assets.library.nashville.org"
51
+ server: str = "assets.library.nashville.gov"
52
52
  user: str = EV().pod_server_uname
53
53
  connection: Type[Connection] = Connection(host=server, user=user)
54
54
  notifications: Notifications = Notifications()
@@ -192,7 +192,7 @@ class Episode(BaseModel):
192
192
  return size_in_bytes
193
193
 
194
194
  def enclosure(self) -> str:
195
- enclosure = f"https://dts.podtrac.com/redirect.mp3/assets.library.nashville.org/talkinglibrary/shows/{self.bucket_folder}/{self.audio_filename}"
195
+ enclosure = f"https://dts.podtrac.com/redirect.mp3/assets.library.nashville.gov/talkinglibrary/shows/{self.bucket_folder}/{self.audio_filename}"
196
196
  self.notifications.prep_syslog(message=f"enclosure will be {enclosure}")
197
197
  return enclosure
198
198
 
@@ -495,13 +495,17 @@ class TLPod(BaseModel):
495
495
  return output_filename
496
496
 
497
497
  def download_preroll(self):
498
- download_URL = "https://assets.library.nashville.org/talkinglibrary/pod_preroll.mp3"
498
+ download_URL = "https://assets.library.nashville.gov/talkinglibrary/pod_preroll.mp3"
499
499
  input_file = 'preroll.mp3'
500
+ self.notifications.prep_syslog(message=f"Attempting to download preroll audio from {download_URL}...")
500
501
  with open (input_file, mode='wb') as downloaded_file:
501
- self.notifications.prep_syslog(message=f"downloading preroll audio from {download_URL}...")
502
- a = requests.get(download_URL)
503
- downloaded_file.write(a.content)
504
- downloaded_file.close()
502
+ try:
503
+ a = requests.get(download_URL)
504
+ downloaded_file.write(a.content)
505
+ downloaded_file.close()
506
+ except (Exception, requests.exceptions.RequestException) as e:
507
+ self.notifications.send_notifications(message=f"Cannot download {download_URL}. Exception: {e}", subject="Error")
508
+ raise e
505
509
  self.notifications.prep_syslog(message="preroll audio successfully downloaded")
506
510
  return downloaded_file.name
507
511
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: talklib
3
- Version: 3.4.1
3
+ Version: 3.4.3
4
4
  Summary: A package to automate processing of shows/segments airing on the TL
5
5
  Author-email: Ben Weddle <ben.weddle@gmail.com>
6
6
  Maintainer-email: Ben Weddle <ben.weddle@gmail.com>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes