EmbyCrackedClient/web/livetv/channels.js

1 line
1.7 KiB
JavaScript
Raw Permalink Normal View History

2025-06-25 11:46:04 +08:00
import ItemsTab from"./../modules/tabbedview/itemstab.js";import"./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js";import"./../modules/emby-elements/emby-button/emby-button.js";import"./../modules/emby-elements/emby-scroller/emby-scroller.js";import userSettings from"./../modules/common/usersettings/usersettings.js";import globalize from"./../modules/common/globalize.js";function ChannelsTab(view,params,options){ItemsTab.apply(this,arguments)}Object.assign(ChannelsTab.prototype,ItemsTab.prototype),ChannelsTab.prototype.supportsAlphaPicker=function(){return!0},ChannelsTab.prototype.getItemTypes=function(){return["TvChannel"]},ChannelsTab.prototype.getSettingsKey=function(){return"livetvchannels"},ChannelsTab.prototype.saveSortingOnServer=function(){return!0},ChannelsTab.prototype.getCardOptions=function(items){var options=ItemsTab.prototype.getCardOptions.apply(this,arguments);return-1!==(this.getSortValues().sortBy||"").toLowerCase().indexOf("channelnumber,sortname")&&(options.channelNumberFirst=!0),options},ChannelsTab.prototype.getSortBySettingsKey=function(sortMenuOptions){return userSettings.getLiveTvChannelSortSettingsKey()},ChannelsTab.prototype.getSortMenuOptions=function(){return userSettings.getLiveTvChannelSortOrders(globalize)},ChannelsTab.prototype.getDefaultSorting=function(){var query={};return userSettings.addLiveTvChannelSortingToQuery(query,globalize),{sortBy:query.SortBy,sortOrder:query.SortOrder}},ChannelsTab.prototype.getSortByValue=function(){var query={};return userSettings.addLiveTvChannelSortingToQuery(query,globalize),query.SortBy},ChannelsTab.prototype.loadTemplate=function(){return this.loadItemsTemplate()};export default ChannelsTab;