Skip to content

Commit

Permalink
hide offline channels, update readme, version
Browse files Browse the repository at this point in the history
  • Loading branch information
coryo committed Mar 15, 2016
1 parent 2ffe0f8 commit 69aeed0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ def FollowedChannelsList(apiurl=None, limit=100):
if name in streams:
oc.add(stream_dir(streams[name])) # live
else:
oc.add(channel_dir(channel, offline=True)) # not live
if not Prefs['hide_offline']:
oc.add(channel_dir(channel, offline=True)) # not live
# Sort the items
if Prefs['following_order'] == 'view_count': # viewers desc
oc.objects.sort(key=lambda obj: int(obj.tagline.split(',')[-1]), reverse=True)
Expand Down
7 changes: 7 additions & 0 deletions Contents/DefaultPrefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,12 @@
"id": "access_token",
"label": "access_token",
"type": "text"
},
{
"id": "hide_offline",
"label": "hide_offline",
"type": "bool",
"default": "false"
}

]
2 changes: 1 addition & 1 deletion Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleVersion</key>
<string>1.3.2</string>
<string>1.4.0</string>
<key>PlexPluginVersionUrl</key>
<string>https://api.github.com/repos/coryo/TwitchMod.bundle/releases/latest</string>
<key>PlexPluginCodePolicy</key>
Expand Down
3 changes: 2 additions & 1 deletion Contents/Strings/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"Install latest version of the channel.": "Install latest version of the channel.",
"Channel updated to version %s": "Channel updated to version %s",
"access_token": "Access Token (optional)",
"authorize": "Authorize"
"authorize": "Authorize",
"hide_offline": "Hide Offline Channels"
}
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
Install:
-----
Installation
============

Put `TwitchMod.bundle` into `Plex Media Server/Plug-ins`

Preferences:
-----------
#####General Preferences
Preferences
===========

General Preferences
-------------------

* **Username:** The username to get followed channels for. This channel does not need your password since Twitch lets you pull this data without authenticating.
* **Order Following By:** The ordering of the followed channels page. Ordering by views will put all online channels first.
* **Favourite Games:** A comma separated list of games titles. Use this if you like viewing games with small amounts of viewers. Game titles dont have to be exact matches. ex: `diablo, starcraft`.
* **Title Layout:** What info is shown in the stream title. If you don't like any of the options, please suggest some.
* **Title Layout (game lists):** A separate title layout for lists where you know the game title going in.
* **Hide Offline Channels:** Hide offline channels in the 'followed channels' menu.
* **Access Token (optional):** OAuth token to allow watching subscriber-only VODs.

Quality Prefrences
------------------

#####Quality Prefrences
If you have issues getting streams to load on a particular Plex client, try the various options here.
* **Stream Quality**, **VOD Quality**
* *Automatic* - The client gets the master playlist. If the client supports adaptive streaming, it can make its own decisions.
Expand All @@ -21,7 +28,12 @@ If you have issues getting streams to load on a particular Plex client, try the

If none of these options work, then it is likely that your client does not currently support HLS streams.

License
-------

If the software submitted to this repository accesses or calls any software provided by Plex (“Interfacing Software”), then as a condition for receiving services from Plex in response to such accesses or calls, you agree to grant and do hereby grant to Plex and its affiliates worldwide a worldwide, nonexclusive, and royalty-free right and license to use (including testing, hosting and linking to), copy, publicly perform, publicly display, reproduce in copies for distribution, and distribute the copies of any Interfacing Software made by you or with your assistance; provided, however, that you may notify Plex at legal@plex.tv if you do not wish for Plex to use, distribute, copy, publicly perform, publicly display, reproduce in copies for distribution, or distribute copies of an Interfacing Software that was created by you, and Plex will reasonable efforts to comply with such a request within a reasonable time.
Getting an Access Token
=======================

1. At the bottom of the main menu in the channel, there will be an `Authorize` option.
2. It will give you a url to go to in a web browser. (using a url shortener http://shoutkey.com url is valid for 5 min)
3. that redirects you to a Twitch page to authorize the channel to use your account.
4. When you authorize it redirects your browser to `http://localhost/#access_token=<access_token>&scope=user_read` which is a dead page.
5. copy the `<access_token>` string out of that url and put it in the TwitchMod channel preferences using the web interface.

0 comments on commit 69aeed0

Please sign in to comment.