Skip to content

Commit

Permalink
feat(tautulli): display audio language, subtitle language, and video …
Browse files Browse the repository at this point in the history
…dynamic range for activity
  • Loading branch information
JagandeepBrar committed Jan 28, 2023
1 parent b98a0f8 commit 6de8063
Show file tree
Hide file tree
Showing 11 changed files with 378 additions and 163 deletions.
2 changes: 2 additions & 0 deletions assets/localization/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@
"tautulli.BackupDatabase": "Backup Database",
"tautulli.Bandwidth": "Bandwidth",
"tautulli.Burn": "Burn",
"tautulli.Converting": "Converting",
"tautulli.Container": "Container",
"tautulli.Copy": "Copy",
"tautulli.DeleteCache": "Delete Cache",
Expand Down Expand Up @@ -855,6 +856,7 @@
"tautulli.Sessions": "Sessions",
"tautulli.SessionsOne": "1 Session",
"tautulli.SessionsMany": "{} Sessions",
"tautulli.Speed": "Speed: {}x",
"tautulli.Stream": "Stream",
"tautulli.Subtitle": "Subtitle",
"tautulli.Terminate": "Terminate",
Expand Down
2 changes: 2 additions & 0 deletions assets/localization/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@
"sonarr.Streams": "Transmisiones",
"sonarr.DownloadID": "ID de descarga",
"sonarr.DownloadFailed": "Descarga fracasó",
"sonarr.DeleteEpisodeFileHint1": "¿Seguro que quieres eliminar este archivo de episodio?",
"sonarr.DeleteReasonManual": "El archivo fue borrado vía UI",
"tautulli.Quality": "Calidad",
"tautulli.None": "Ninguno",
"tautulli.Terminate": "Terminar",
Expand Down
26 changes: 25 additions & 1 deletion assets/localization/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,30 @@
"radarr.Wanted": "İstenen",
"radarr.Weight": "Ağırlık",
"radarr.Year": "Yıl",
"sabnzbd.Age": "Yaş",
"sabnzbd.Duplicate": "Yinelenen",
"sabnzbd.Failed": "Başarısız",
"sabnzbd.Force": "Zorla",
"sabnzbd.Repair": "Onar",
"sabnzbd.RepairUnpack": "Onar/Ayıkla",
"sabnzbd.RepairUnpackDelete": "Onar/Ayıkla/Sil",
"sabnzbd.Size": "Boyut",
"sabnzbd.ShutdownPC": "Bilgisayarı Kapat",
"sabnzbd.ShutdownSABnzbd": "SABnzbd'yi Kapat",
"sabnzbd.StandbyPC": "Bilgisayarı Beklemeye Al",
"sabnzbd.Stop": "Durdur",
"sabnzbd.CategoryDefault": "Kategori Öntanımlı Değeri",
"sabnzbd.Completed": "Tamamlandı",
"sabnzbd.Descending": "Azalan",
"sabnzbd.High": "Yüksek",
"sabnzbd.Low": "Düşük",
"sabnzbd.Paused": "Duraklatıldı",
"sabnzbd.All": "Tümü",
"sabnzbd.Ascending": "Artan",
"sabnzbd.HibernatePC": "Bilgisayarı Hazırda Beklet",
"sabnzbd.None": "Yok",
"sabnzbd.Name": "Ad",
"sabnzbd.Normal": "Normal",
"search.Subcategories": "Alt Kategoriler",
"search.Size": "Boyut",
"search.SentTo": "{}'e gönderildi",
Expand Down Expand Up @@ -602,7 +626,7 @@
"sonarr.Monitor": "Takip Et",
"sonarr.MonitorEpisode": "Bölümü Takip Et",
"sonarr.MonitorSeries": "Diziyi Takip Et",
"sonarr.Name": "İsim",
"sonarr.Name": "Ad",
"sonarr.NoEpisodesFound": "Bölüm Bulunamadı",
"sonarr.NoSeasonsFound": "Sezonlar Bulunamadı",
"sonarr.NoSeriesFound": "Diziler Bulunamadı",
Expand Down
1 change: 1 addition & 0 deletions assets/localization/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
"settings.DiscordDescription": "请求功能获得支持",
"settings.General": "通用",
"settings.GeneralDescription": "自定义LunaSea",
"settings.BootModule": "启动模块",
"sonarr.AddSeries": "添加系列",
"sonarr.AddedOn": "添加于",
"sonarr.Age": "年龄",
Expand Down
12 changes: 6 additions & 6 deletions lib/api/tautulli/models/activity/session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class TautulliSession {
fromJson: TautulliUtilities.ensureStringFromJson)
final String? videoResolution;

/// Full resoltuion of the video stream.
/// Full resolution of the video stream.
@JsonKey(
name: 'video_full_resolution',
fromJson: TautulliUtilities.ensureStringFromJson)
Expand Down Expand Up @@ -793,13 +793,13 @@ class TautulliSession {
@JsonKey(
name: 'transcode_hw_encode',
fromJson: TautulliUtilities.ensureStringFromJson)
final String? transcodeHardwarEencode;
final String? transcodeHardwareEncode;

/// Hardware encode title of the transcode stream.
@JsonKey(
name: 'transcode_hw_encode_title',
fromJson: TautulliUtilities.ensureStringFromJson)
final String? transcodeHardwarEencodeTitle;
final String? transcodeHardwareEncodeTitle;

/// Is the transcoder using hardware acceleration for the full pipeline?
@JsonKey(
Expand Down Expand Up @@ -958,7 +958,7 @@ class TautulliSession {
@JsonKey(name: 'subtitles', fromJson: TautulliUtilities.ensureBooleanFromJson)
final bool? subtitles;

/// Full resoltuion of the final video stream.
/// Full resolution of the final video stream.
@JsonKey(
name: 'stream_video_full_resolution',
fromJson: TautulliUtilities.ensureStringFromJson)
Expand Down Expand Up @@ -1295,8 +1295,8 @@ class TautulliSession {
this.transcodeHardwareRequested,
this.transcodeHardwareDecode,
this.transcodeHardwareDecodeTitle,
this.transcodeHardwarEencode,
this.transcodeHardwarEencodeTitle,
this.transcodeHardwareEncode,
this.transcodeHardwareEncodeTitle,
this.transcodeHardwareFullPipeline,
this.audioDecision,
this.videoDecision,
Expand Down
30 changes: 25 additions & 5 deletions lib/api/tautulli/types/media.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ enum TautulliMediaType {
ARTIST,
ALBUM,
TRACK,
LIVE,
PHOTO_ALBUM,
PHOTO,
CLIP,
COLLECTION,
PLAYLIST,
LIVE,
NULL;

static TautulliMediaType from(String? type) {
Expand All @@ -29,10 +33,18 @@ enum TautulliMediaType {
return TautulliMediaType.ALBUM;
case 'track':
return TautulliMediaType.TRACK;
case 'live':
return TautulliMediaType.LIVE;
case 'photoalbum':
return TautulliMediaType.PHOTO_ALBUM;
case 'photo':
return TautulliMediaType.PHOTO;
case 'clip':
return TautulliMediaType.CLIP;
case 'collection':
return TautulliMediaType.COLLECTION;
case 'playlist':
return TautulliMediaType.PLAYLIST;
case 'live':
return TautulliMediaType.LIVE;
default:
return TautulliMediaType.NULL;
}
Expand All @@ -55,10 +67,18 @@ enum TautulliMediaType {
return 'album';
case TautulliMediaType.TRACK:
return 'track';
case TautulliMediaType.LIVE:
return 'live';
case TautulliMediaType.PHOTO_ALBUM:
return 'photoalbum';
case TautulliMediaType.PHOTO:
return 'photo';
case TautulliMediaType.CLIP:
return 'clip';
case TautulliMediaType.COLLECTION:
return 'collection';
case TautulliMediaType.PLAYLIST:
return 'playlist';
case TautulliMediaType.LIVE:
return 'live';
default:
return '';
}
Expand Down
2 changes: 2 additions & 0 deletions lib/extensions/string/string.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ extension StringExtension on String {
String toTitleCase({
String delimiter = ' ',
}) {
if (isEmpty) return '';

final split = this.split(delimiter);
for (var i = 0; i < split.length; i++) {
String word = split[i];
Expand Down

0 comments on commit 6de8063

Please sign in to comment.