ljunkie / plexWatch

Notify and Log watched content on a Plex Media Server
430 stars 59 forks source link

Duplicated "Watched" header when no data output #120

Open bluegate010 opened 8 years ago

bluegate010 commented 8 years ago

When providing a --start and --stop flag to accompany a --watched request, and no watched data is available, the ====... header is duplicated.

# /opt/plexWatch/plexWatch.pl --watched --start="2 days ago" --stop="today" 

======================================== Watched ========================================

Date Range: Sat Feb  6 00:00:00 2016 through Mon Feb  8 00:00:00 2016

======================================== Watched ========================================

Date Range: Sat Feb  6 00:00:00 2016 through Mon Feb  8 00:00:00 2016

* nothing watched

# /opt/plexWatch/plexWatch.pl --watched --stop="2 days ago"

======================================== Watched ========================================

Date Range: Anytime through Sat Feb  6 00:00:00 2016

======================================== Watched ========================================

Date Range: Anytime through Sat Feb  6 00:00:00 2016

* nothing watched

# /opt/plexWatch/plexWatch.pl --watched --start="2 days ago" --stop="now"

======================================== Watched ========================================

Date Range: Sat Feb  6 00:00:00 2016 through Mon Feb  8 19:33:10 2016

User: bluegate010
 Mon Feb  8 17:12:28 2016: bluegate010 watched ...
 Mon Feb  8 18:14:06 2016: bluegate010 watched ...
 Mon Feb  8 18:50:07 2016: bluegate010 watched ...

# /opt/plexWatch/plexWatch.pl --watched --start="2 days from now"

======================================== Watched ========================================

Date Range: Wed Feb 10 19:40:00 2016 through Now

======================================== Watched ========================================

Date Range: Wed Feb 10 19:40:00 2016 through Now

* nothing watched