from method
Given a String, will return the correct TautulliMediaType
object.
Implementation
TautulliMediaType? from(String? type) {
switch(type) {
case 'movie': return TautulliMediaType.MOVIE;
case 'show': return TautulliMediaType.SHOW;
case 'season': return TautulliMediaType.SEASON;
case 'episode': return TautulliMediaType.EPISODE;
case 'artist': return TautulliMediaType.ARTIST;
case 'album': return TautulliMediaType.ALBUM;
case 'track': return TautulliMediaType.TRACK;
case 'live': return TautulliMediaType.LIVE;
case 'collection': return TautulliMediaType.COLLECTION;
case '': return TautulliMediaType.NULL;
}
return null;
}