Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#

import time
import itertools
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package is not needed anymore, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh no, that slipped through.


NAME = 'Tvplexend'
CACHE_TIME = 60
Expand Down Expand Up @@ -92,9 +93,17 @@ def update(self, metadata, media, lang):

title = recording['disp_title']

if Prefs['includeSubtitleInTitle']:
subTitle = recording['disp_subtitle']
if len(subTitle) > 0:
title = '%s ★ %s' % (title, subTitle)

if Prefs['includeDatetimeInTitle']:
title = '%s (%s %s)' % (title, day, start)

if 'directory' in recording:
metadata.collections.add(recording['directory'])

metadata.title = title
metadata.originally_available_at = startDateTime.date()
metadata.summary = '%s ★ %s ★ %s - %s ★ %s' % (
Expand Down Expand Up @@ -123,6 +132,11 @@ def ServerInfo():
@staticmethod
def Recordings():
entries = Tvheadend.fetch('/api/dvr/entry/grid_finished')['entries']
upcoming = Tvheadend.fetch('/api/dvr/entry/grid_upcoming')['entries']
for upc in upcoming:
if 'filename' in upc:
entries.append(upc)

return dict((entry['filename'], entry) for entry in entries)

@staticmethod
Expand Down
6 changes: 6 additions & 0 deletions Contents/DefaultPrefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,11 @@
"label": "Include date and time of recording in title",
"type": "bool",
"default": "false"
},
{
"id": "includeSubtitleInTitle",
"label": "Include the subtitle in title",
"type": "bool",
"default": "false"
}
]