Documentation ¶
Index ¶
- Constants
- Variables
- func HandleLogin(context *fiber.Ctx) error
- func HandleLogout(context *fiber.Ctx) error
- func RenderHomePage(context *fiber.Ctx) error
- func RenderLoginPage(context *fiber.Ctx) error
- func SanitizeUsername(first_name string, last_name string) (username string)
- func ServeLoginPage(context *fiber.Ctx) error
- type GenericInfo
- type Playlist
- type PlaylistItem
- type Server
- func (s *Server) ADBConnect() (connection adb_wrapper.Wrapper)
- func (s *Server) ADBNext(c *fiber.Ctx) error
- func (s *Server) ADBPause(c *fiber.Ctx) error
- func (s *Server) ADBPlay(c *fiber.Ctx) error
- func (s *Server) ADBPrevious(c *fiber.Ctx) error
- func (s *Server) ADBStop(c *fiber.Ctx) error
- func (s *Server) BrowserAudioPlayerSetPosition(c *fiber.Ctx) error
- func (s *Server) BrowserOpenAudioPlayer(c *fiber.Ctx) error
- func (s *Server) BrowserOpenURL(c *fiber.Ctx) error
- func (s *Server) BrowserOpenVideoPlayer(c *fiber.Ctx) error
- func (s *Server) BrowserReopenApp()
- func (s *Server) BrowserWebSocketHandler(c *websocket.Conn)
- func (s *Server) DisneyContinuousOpen()
- func (s *Server) DisneyMovie(c *fiber.Ctx) error
- func (s *Server) DisneyMovieNext(c *fiber.Ctx) error
- func (s *Server) DisneyMoviePrevious(c *fiber.Ctx) error
- func (s *Server) DisneyReopenApp()
- func (s *Server) Get(key string) (result string)
- func (s *Server) GetBrowserAudioPlayer(context *fiber.Ctx) error
- func (s *Server) GetBrowserVideoPlayer(context *fiber.Ctx) error
- func (s *Server) GetJSON(key string, target interface{})
- func (s *Server) GetStatus() (result Status)
- func (s *Server) GetStatusUrl(c *fiber.Ctx) error
- func (s *Server) GetTwitchLiveRefresh(c *fiber.Ctx) error
- func (s *Server) GetTwitchLiveUpdate(c *fiber.Ctx) error
- func (s *Server) GetTwitchLiveUser(c *fiber.Ctx) error
- func (s *Server) GetYouTubeLiveUpdate(c *fiber.Ctx) error
- func (s *Server) Governor()
- func (s *Server) Log(message string)
- func (s *Server) LogRequest(context *fiber.Ctx) error
- func (s *Server) NetflixContinuousOpen()
- func (s *Server) NetflixNext(c *fiber.Ctx) error
- func (s *Server) NetflixPrevious(c *fiber.Ctx) error
- func (s *Server) NetflixReopenApp()
- func (s *Server) Next(c *fiber.Ctx) error
- func (s *Server) Pause(c *fiber.Ctx) error
- func (s *Server) Play(c *fiber.Ctx) error
- func (s *Server) PlaylistAdd(c *fiber.Ctx) error
- func (s *Server) Previous(c *fiber.Ctx) error
- func (s *Server) Printf(format_string string, args ...interface{})
- func (s *Server) ReStreamRestart(c *fiber.Ctx) error
- func (s *Server) ReStreamStop(c *fiber.Ctx) error
- func (s *Server) ReStreamURL(c *fiber.Ctx) error
- func (s *Server) Resume(c *fiber.Ctx) error
- func (s *Server) SelectFireCubeProfile()
- func (s *Server) Set(key string, value interface{}) (result string)
- func (s *Server) SetJSON(key string, value interface{}) (result string)
- func (s *Server) SetupAdminRoutes()
- func (s *Server) SetupPublicRoutes()
- func (s *Server) SetupRoutes()
- func (s *Server) SpotifyContinuousOpen()
- func (s *Server) SpotifyGetActiveButtonIndex() (result int)
- func (s *Server) SpotifyIsShuffleOn() (result bool)
- func (s *Server) SpotifyNextPlaylist()
- func (s *Server) SpotifyNextPlaylistWithShuffle(c *fiber.Ctx) error
- func (s *Server) SpotifyNextSong(song_id string)
- func (s *Server) SpotifyPlaylist(c *fiber.Ctx) error
- func (s *Server) SpotifyPlaylistWithShuffle(c *fiber.Ctx) error
- func (s *Server) SpotifyPressPreviousButton()
- func (s *Server) SpotifyPreviousPlaylist(playlist_id string)
- func (s *Server) SpotifyPreviousSong(song_id string)
- func (s *Server) SpotifyReopenApp()
- func (s *Server) SpotifySetShuffle(c *fiber.Ctx) error
- func (s *Server) SpotifyShuffleOff() (was_on bool)
- func (s *Server) SpotifyShuffleOn() (was_on bool)
- func (s *Server) SpotifySong(c *fiber.Ctx) error
- func (s *Server) SpotifyUpdate()
- func (s *Server) Start()
- func (s *Server) Stop(c *fiber.Ctx) error
- func (s *Server) StoreLibrary()
- func (s *Server) StreamDeckDisney(c *fiber.Ctx) error
- func (s *Server) StreamDeckEscapeRope(c *fiber.Ctx) error
- func (s *Server) StreamDeckHeart(c *fiber.Ctx) error
- func (s *Server) StreamDeckPrepare()
- func (s *Server) StreamDeckSpotify(c *fiber.Ctx) error
- func (s *Server) StreamDeckTwitch(c *fiber.Ctx) error
- func (s *Server) StreamDeckYouTube(c *fiber.Ctx) error
- func (s *Server) TVGetInput(c *fiber.Ctx) error
- func (s *Server) TVGetVolume(c *fiber.Ctx) error
- func (s *Server) TVMuteOff(c *fiber.Ctx) error
- func (s *Server) TVMuteOn(c *fiber.Ctx) error
- func (s *Server) TVPowerOff(c *fiber.Ctx) error
- func (s *Server) TVPowerOn(c *fiber.Ctx) error
- func (s *Server) TVPowerStatus(c *fiber.Ctx) error
- func (s *Server) TVPrepare(c *fiber.Ctx) error
- func (s *Server) TVSetInput(c *fiber.Ctx) error
- func (s *Server) TVSetVolume(c *fiber.Ctx) error
- func (s *Server) TimeSinceLastStart() (result time.Duration)
- func (s *Server) TwitchContinuousOpen()
- func (s *Server) TwitchFilterCurratedFollers(input_list []string) (result []string)
- func (s *Server) TwitchGetLiveFollowers() (result []string)
- func (s *Server) TwitchLiveNext(c *fiber.Ctx) error
- func (s *Server) TwitchLivePrevious(c *fiber.Ctx) error
- func (s *Server) TwitchLiveRefresh() (result []string)
- func (s *Server) TwitchLiveSetQualityMax(c *fiber.Ctx) error
- func (s *Server) TwitchLiveUpdate() (result []string)
- func (s *Server) TwitchLiveUser(username string)
- func (s *Server) TwitchRefreshAuthToken() (access_token string)
- func (s *Server) TwitchReopenApp()
- func (s *Server) VLCContinuousOpen()
- func (s *Server) VLCNext(c *fiber.Ctx) error
- func (s *Server) VLCPlayURL(c *fiber.Ctx) error
- func (s *Server) VLCPlaylistAddURL(c *fiber.Ctx) error
- func (s *Server) VLCPrevious(c *fiber.Ctx) error
- func (s *Server) VLCReopenApp()
- func (s *Server) YouTubeContinuousOpen()
- func (s *Server) YouTubeGetChannelId(channel_name string) (result string)
- func (s *Server) YouTubeGetChannelsLiveVideos(channel_id string) (result []YoutubeVideo)
- func (s *Server) YouTubeGetPlaylistVideos(playlist_id string) (result []YoutubeVideo)
- func (s *Server) YouTubeIsVideoIdAvailable(video_id string) (result bool)
- func (s *Server) YouTubeLiveNext(c *fiber.Ctx) error
- func (s *Server) YouTubeLivePrevious(c *fiber.Ctx) error
- func (s *Server) YouTubeLiveUpdate() (result []string)
- func (s *Server) YouTubePlaylistAddPlaylist(c *fiber.Ctx) error
- func (s *Server) YouTubePlaylistAddVideo(c *fiber.Ctx) error
- func (s *Server) YouTubePlaylistDeleteVideo(c *fiber.Ctx) error
- func (s *Server) YouTubePlaylistGet(c *fiber.Ctx) error
- func (s *Server) YouTubePlaylistGetIndex(c *fiber.Ctx) error
- func (s *Server) YouTubePlaylistGetNextAvailableVideoID(playlist_key string) (video_id string)
- func (s *Server) YouTubePlaylistGetPreviousAvailableVideoID(playlist_key string) (video_id string)
- func (s *Server) YouTubePlaylistNext(c *fiber.Ctx) error
- func (s *Server) YouTubePlaylistPrevious(c *fiber.Ctx) error
- func (s *Server) YouTubePlaylistSetIndex(c *fiber.Ctx) error
- func (s *Server) YouTubeReopenApp()
- func (s *Server) YouTubeVideo(c *fiber.Ctx) error
- type Status
- type YouTubeResponseItem
- type YoutubePlaylistResponse
- type YoutubeResponse
- type YoutubeVideo
- type YoutubeVideoInfo
Constants ¶
const ACTIVITY_PROFILE_PICKER = "com.amazon.ftv.profilepicker/com.amazon.ftv.profilepicker.ui.PickerActivity"
const BROWSER_ACTIVITY = "com.amazon.cloud9/com.amazon.slate.fire_tv.FireTvSlateActivity"
const FIREFOX_FOCUS_ACTIVITY = "org.mozilla.focus/org.mozilla.focus.activity.MainActivity" const FIREFOX_FOCUS_APP_NAME = "org.mozilla.focus" const FIREFOX_ACTIVITY = "org.mozilla.firefox/org.mozilla.fenix.customtabs.ExternalAppBrowserActivity" const FIREFOX_APP_NAME = "org.mozilla.firefox"
const BROWSER_APP_NAME = "com.amazon.cloud9"
const DISNEY_ACTIVITY = "com.disney.disneyplus/com.bamtechmedia.dominguez.main.MainActivity"
const DISNEY_APP_NAME = "com.disney.disneyplus"
const DISNEY_PLAYING_ACTIVITY = "com.disney.disneyplus/com.bamtechmedia.dominguez.player.ui.experiences.legacy.v1.TvPlaybackActivity"
const NETFLIX_ACTIVITY = "com.netflix.ninja/com.netflix.ninja.MainActivity"
const NETFLIX_APP_NAME = "com.netflix.ninja"
const R_KEY_STATE_TWITCH_FOLLOWING_LIVE = "STATE.TWITCH.FOLLOWING.LIVE"
const SPOTIFY_ACTIVITY = "com.spotify.tv.android/com.spotify.tv.android.SpotifyTVActivity"
const SPOTIFY_APP_NAME = "com.spotify.tv.android"
const TWITCH_ACTIVITY = "tv.twitch.android.viewer/tv.twitch.starshot64.app.StarshotActivity"
const TWITCH_APP_NAME = "tv.twitch.android.viewer"
const VLC_ACTIVITY = "org.videolan.vlc/org.videolan.television.ui.MainTvActivity"
const VLC_APP_NAME = "org.videolan.vlc"
const YOUTUBE_ACTIVITY = "com.amazon.firetv.youtube/dev.cobalt.app.MainActivity"
const YOUTUBE_APP_NAME = "com.amazon.firetv.youtube"
Variables ¶
var APP_NAMES = []string{"twitch", "disney", "youtube", "spotify", "vlc"}
var RESET_COUNTER = 0
Functions ¶
func HandleLogin ¶
func HandleLogout ¶
func RenderHomePage ¶
func RenderLoginPage ¶
func SanitizeUsername ¶
weak attempt at sanitizing form input to build a "username"
func ServeLoginPage ¶
Types ¶
type GenericInfo ¶
type GenericInfo struct { ADBStatus interface{} `json:"adb_status"` PlayerName string `json:"player_name"` Activity string `json:"activity"` Package string `json:"package"` PlayerState string `json:"player_state"` CachedPlayerName string `json:"cached_player_name"` CachedPlayerCommand string `json:"cached_player_name"` }
type Playlist ¶
type Playlist []PlaylistItem
type PlaylistItem ¶
type PlaylistItem struct { Type string `json:"type"` SubType string `json:"sub_type"` URL string `json:"url"` URI string `json:"uri"` Position int `json:"position"` Watched bool `json:"watched"` TimesWatched int `json:"times_watched"` TimesSkipped int `json:"times_skipped"` TimesPlayed int `json:"times_played"` }
type Server ¶
type Server struct { FiberApp *fiber.App `yaml:"fiber_app"` Config types.ConfigFile `yaml:"config"` DB *redis.Client `yaml:"-"` ADB adb_wrapper.Wrapper `json:"-"` // TV *tv.TV `json:"-"` TV *tv_controller.Controller `json:"-"` Status Status `json:"-"` StateMutex *sync.Mutex `json:"-"` }
var GlobalServer *Server
func (*Server) ADBConnect ¶
func (s *Server) ADBConnect() (connection adb_wrapper.Wrapper)
func (*Server) BrowserAudioPlayerSetPosition ¶
func (*Server) BrowserReopenApp ¶
func (s *Server) BrowserReopenApp()
func (*Server) BrowserWebSocketHandler ¶
func (*Server) DisneyContinuousOpen ¶
func (s *Server) DisneyContinuousOpen()
func (*Server) DisneyReopenApp ¶
func (s *Server) DisneyReopenApp()
func (*Server) GetBrowserAudioPlayer ¶
http://localhost:5954/firefox-focus/audio/https://files.34353.org/AudioBooks/CarlosCastaneda/01-The-Teachings-of-Don-Juan-A-Yaqui-Way-of-Knowledge.mp3 http://192.168.4.23:5954/firefox-focus/audio/https://files.34353.org/AudioBooks/CarlosCastaneda/01-The-Teachings-of-Don-Juan-A-Yaqui-Way-of-Knowledge.mp3
func (*Server) GetBrowserVideoPlayer ¶
https://9304d5ed.34353.org/Tracy%20Chapman%20with%20Luke%20Combs%20-%20Fast%20Car.mp4
func (*Server) GetJSON ¶
var test = &types.ConfigFile{} s.GetJSON( "config" , test ) fmt.Println( test.BoltDBEncryptionKey ) https://redis.io/commands/json.get/
func (*Server) NetflixContinuousOpen ¶
func (s *Server) NetflixContinuousOpen()
func (*Server) NetflixPrevious ¶ added in v1.0.23
func (*Server) NetflixReopenApp ¶
func (s *Server) NetflixReopenApp()
func (*Server) SelectFireCubeProfile ¶
func (s *Server) SelectFireCubeProfile()
func (*Server) SetJSON ¶
https://github.com/RedisJSON/RedisJSON/#community-supported-clients fmt.Println( s.DB.JSONSet ) 😭 https://github.com/redis/go-redis/pull/2704/commits/acf2b714f7b4920f1b910247dc42799b354f62ce
func (*Server) SetupAdminRoutes ¶
func (s *Server) SetupAdminRoutes()
func (*Server) SetupPublicRoutes ¶
func (s *Server) SetupPublicRoutes()
func (*Server) SetupRoutes ¶
func (s *Server) SetupRoutes()
func (*Server) SpotifyContinuousOpen ¶
func (s *Server) SpotifyContinuousOpen()
func (*Server) SpotifyGetActiveButtonIndex ¶
func (*Server) SpotifyIsShuffleOn ¶
func (*Server) SpotifyNextPlaylist ¶
func (s *Server) SpotifyNextPlaylist()
func (*Server) SpotifyNextPlaylistWithShuffle ¶
func (*Server) SpotifyNextSong ¶
func (*Server) SpotifyPlaylistWithShuffle ¶
func (*Server) SpotifyPressPreviousButton ¶
func (s *Server) SpotifyPressPreviousButton()
func (*Server) SpotifyPreviousPlaylist ¶
func (*Server) SpotifyPreviousSong ¶
func (*Server) SpotifyReopenApp ¶
func (s *Server) SpotifyReopenApp()
func (*Server) SpotifyShuffleOff ¶
func (*Server) SpotifyShuffleOn ¶
func (*Server) SpotifySong ¶
5Muvh0ooAJkSgBylFyI3su
func (*Server) SpotifyUpdate ¶
func (s *Server) SpotifyUpdate()
func (*Server) StoreLibrary ¶
func (s *Server) StoreLibrary()
func (*Server) StreamDeckPrepare ¶ added in v1.0.75
func (s *Server) StreamDeckPrepare()
func (*Server) TimeSinceLastStart ¶
func (*Server) TwitchContinuousOpen ¶
func (s *Server) TwitchContinuousOpen()
func (*Server) TwitchFilterCurratedFollers ¶
func (*Server) TwitchGetLiveFollowers ¶
func (*Server) TwitchLiveRefresh ¶
func (*Server) TwitchLiveSetQualityMax ¶
literally trolling , we have to get pixel values to know where we are being bullied in the quality selection menu
func (*Server) TwitchLiveUpdate ¶
Update DB With List of Currated Live Followers
func (*Server) TwitchLiveUser ¶ added in v1.0.36
func (*Server) TwitchRefreshAuthToken ¶
func (*Server) TwitchReopenApp ¶
func (s *Server) TwitchReopenApp()
func (*Server) VLCContinuousOpen ¶
func (s *Server) VLCContinuousOpen()
func (*Server) VLCPlaylistAddURL ¶
Custom Playlist Stuff
func (*Server) VLCReopenApp ¶
func (s *Server) VLCReopenApp()
func (*Server) YouTubeContinuousOpen ¶
func (s *Server) YouTubeContinuousOpen()
func (*Server) YouTubeGetChannelId ¶
or just goto dev console on youtube channel's /stream page and run `ytInitialData.metadata.channelMetadataRenderer.externalId`
func (*Server) YouTubeGetChannelsLiveVideos ¶
func (s *Server) YouTubeGetChannelsLiveVideos(channel_id string) (result []YoutubeVideo)
func (*Server) YouTubeGetPlaylistVideos ¶
func (s *Server) YouTubeGetPlaylistVideos(playlist_id string) (result []YoutubeVideo)
func (*Server) YouTubeIsVideoIdAvailable ¶
func (*Server) YouTubeLiveUpdate ¶
Update DB With List of Currated Live Followers fucking idiots with this god damn quota. bro
func (*Server) YouTubePlaylistAddPlaylist ¶
func (*Server) YouTubePlaylistAddVideo ¶
func (*Server) YouTubePlaylistDeleteVideo ¶
func (*Server) YouTubePlaylistGetIndex ¶
func (*Server) YouTubePlaylistGetNextAvailableVideoID ¶
func (*Server) YouTubePlaylistGetPreviousAvailableVideoID ¶
func (*Server) YouTubePlaylistNext ¶
This is not a youtube playlist , this is our own "playlist" android youtube app still doesn't have intents for playlist loading
func (*Server) YouTubePlaylistPrevious ¶
func (*Server) YouTubePlaylistSetIndex ¶
func (*Server) YouTubeReopenApp ¶
func (s *Server) YouTubeReopenApp()
type Status ¶
type Status struct { StartTime string `json:"start_time"` StartTimeOBJ time.Time `json:"-"` PlayerName string `json:"player_name"` PlayerCommand string `json:"player_command"` NowPlayingID string `json:"now_playing_id"` NowPlayingText string `json:"now_playing_text"` PreviousPlayerName string `json:"previous_player_name"` PreviousPlayerCommand string `json:"previous_player_command"` PreviousStartTime string `json:"previous_start_time"` PreviousStartTimeOBJ time.Time `json:"-"` PreviousStartTimeDuration time.Duration `json:"-"` PreviousStartTimeDurationSeconds float64 `json:"previous_start_time_duration_seconds"` // ADBTopWindow string `json:"adb_top_window"` // ADBVolume int `json:"adb_volume"` ADB adb_wrapper.Status `json:"adb"` TV tv_controller.Status `json:"tv"` }
type YouTubeResponseItem ¶
type YoutubePlaylistResponse ¶
type YoutubeResponse ¶
type YoutubeResponse struct {
Items []YouTubeResponseItem `json:"items"`
}
type YoutubeVideo ¶
type YoutubeVideoInfo ¶
type YoutubeVideoInfo struct { Items []struct { ID string `json:"id"` } `json:"items"` }