Clean up. Add year to movies
This commit is contained in:
parent
0f1ed7f234
commit
1db7666c37
2 changed files with 8 additions and 5 deletions
|
@ -32,7 +32,8 @@ def get_missing_movies():
|
||||||
|
|
||||||
for movie in movies.keys():
|
for movie in movies.keys():
|
||||||
if not movies[movie]['downloaded']:
|
if not movies[movie]['downloaded']:
|
||||||
missing.append((movies[movie]['title'], movies[movie]['tmdbId']))
|
movie_name = ('{} ({})'.format(movies[movie]['title'], movies[movie]['year']))
|
||||||
|
missing.append((movie_name, movies[movie]['tmdbId']))
|
||||||
|
|
||||||
for movie, id in missing:
|
for movie, id in missing:
|
||||||
influx_payload.append(
|
influx_payload.append(
|
||||||
|
|
10
sonarr.py
10
sonarr.py
|
@ -64,6 +64,7 @@ def get_all_missing_shows():
|
||||||
|
|
||||||
return influx_payload
|
return influx_payload
|
||||||
|
|
||||||
|
|
||||||
def get_missing_shows(days_past):
|
def get_missing_shows(days_past):
|
||||||
# Set the time here so we have one timestamp to work with
|
# Set the time here so we have one timestamp to work with
|
||||||
now = now_iso()
|
now = now_iso()
|
||||||
|
@ -190,9 +191,9 @@ def get_today_shows():
|
||||||
series_title = '{}'.format(tv_shows[show]['series']['title'])
|
series_title = '{}'.format(tv_shows[show]['series']['title'])
|
||||||
dl_status = int(tv_shows[show]['hasFile'])
|
dl_status = int(tv_shows[show]['hasFile'])
|
||||||
sxe = 'S{:0>2}E{:0>2}'.format(tv_shows[show]['seasonNumber'], tv_shows[show]['episodeNumber'])
|
sxe = 'S{:0>2}E{:0>2}'.format(tv_shows[show]['seasonNumber'], tv_shows[show]['episodeNumber'])
|
||||||
air_today.append((series_title, dl_status, sxe, tv_shows[show]['id']))
|
air_today.append((series_title, dl_status, sxe, tv_shows[show]['title'], tv_shows[show]['id']))
|
||||||
|
|
||||||
for series_title, dl_status, sxe, id in air_today:
|
for series_title, dl_status, sxe, title, id in air_today:
|
||||||
influx_payload.append(
|
influx_payload.append(
|
||||||
{
|
{
|
||||||
"measurement": "Sonarr",
|
"measurement": "Sonarr",
|
||||||
|
@ -204,12 +205,13 @@ def get_today_shows():
|
||||||
"time": now,
|
"time": now,
|
||||||
"fields": {
|
"fields": {
|
||||||
"name": series_title,
|
"name": series_title,
|
||||||
|
"epname": title,
|
||||||
"sxe": sxe,
|
"sxe": sxe,
|
||||||
"downloaded": dl_status
|
"downloaded": dl_status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
# Empty today and downloaded or else things get foo bared
|
# Empty air_today or else things get foo bared
|
||||||
air_today = []
|
air_today = []
|
||||||
|
|
||||||
return influx_payload
|
return influx_payload
|
||||||
|
@ -267,7 +269,7 @@ def get_queue_shows():
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Empty missing or else things get foo bared
|
# Empty queue or else things get foo bared
|
||||||
queue = []
|
queue = []
|
||||||
|
|
||||||
return influx_payload
|
return influx_payload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue