We need to adjust a few things to make the code more flexible for sites other than YouTube.
Rebuilding Twitch support based on the previous pull request (#301) would be a good place to start.
Adding Rumble support (#466) would also be an option.
For better future features, I would like to add these new fields to the Media model:
metadata_date: when the metadata was retrieved
formats_date: when the formats in the metadata were last changed
Add to MediaState:
LIVE = 'live', _('Live (waiting to download)')
Source type:
class Twitch_SourceType(models.TextChoices):
CHANNEL = 't', _('Twitch channel')
Twitch icon:
'<i class="fab fa-twitch"></i>'
Twitch index URL:
'https://www.twitch.tv/{key}/videos?filter=all&sort=time'
Twitch source display URL:
'https://www.twitch.tv/{key}/videos'
Twitch media display URL:
'https://www.twitch.tv/videos/{key}'
URL validation:
{
'scheme': 'https',
'domains': ('www.twitch.tv',),
'path_regex': '^\/([^\/]+)(\/videos)?$',
'path_must_not_match': ('/videos', '/videos/videos'),
'qs_args': [],
'extract_key': ('path_regex', 1),
'example': 'https://www.twitch.tv/twitch/videos'
},
See also:
We need to adjust a few things to make the code more flexible for sites other than YouTube.
Rebuilding
Twitchsupport based on the previous pull request (#301) would be a good place to start.Adding
Rumblesupport (#466) would also be an option.For better future features, I would like to add these new fields to the
Mediamodel:metadata_date: when themetadatawas retrievedformats_date: when theformatsin themetadatawere last changedAdd to
MediaState:Source type:
Twitch icon:
'<i class="fab fa-twitch"></i>'Twitch index URL:
'https://www.twitch.tv/{key}/videos?filter=all&sort=time'Twitch source display URL:
'https://www.twitch.tv/{key}/videos'Twitch media display URL:
'https://www.twitch.tv/videos/{key}'URL validation:
{ 'scheme': 'https', 'domains': ('www.twitch.tv',), 'path_regex': '^\/([^\/]+)(\/videos)?$', 'path_must_not_match': ('/videos', '/videos/videos'), 'qs_args': [], 'extract_key': ('path_regex', 1), 'example': 'https://www.twitch.tv/twitch/videos' },See also: