Skip to content

Commit

Permalink
Test main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterCalvin committed Feb 16, 2025
1 parent 56276ed commit 1bb2b87
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ jobs:
pip install -r requirements.txt
pip install git+https://github.com/SivagiriVisakan/mkdocs-replace-plugin.git
- run: mkdocs gh-deploy --force
- name: Build and Deploy
env:
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion docs/pinning-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

After accepting your invitation to my Plex server, you'll need to pin my shared libraries to your sidebar. This is a required step - without it, you might only see Plex's default content instead of my media collection. Here's what you need to know:

1. Look for "{{ meta.username }}'s Plex" in your media sources
1. Look for "{{ username }}'s Plex" in your media sources
2. You'll see two libraries: Movies and TV Shows
3. Pin both of these libraries to your sidebar

Expand Down
6 changes: 3 additions & 3 deletions docs/requesting-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

You can request new Movies or TV Shows in two ways:

1. Visit [{{ config.extra.site.request_url }}](https://{{ config.extra.site.request_url }}) to make direct requests. These are typically approved within 10-15 minutes, and if the content has been released digitally, it will be ready to stream on Plex within 10 minutes.
1. Visit [{{ request_url }}](https://{{ request_url }}) to make direct requests. These are typically approved within 10-15 minutes, and if the content has been released digitally, it will be ready to stream on Plex within 10 minutes.
2. Add content to your Plex Universal Watchlist, and it will be automatically requested for you.

!!! important
For the auto-request feature to work with your Watchlist, you must log into {{ config.extra.site.request_url }} at least once every 90 days. If you don't log in regularly, the system won't be able to see your Watchlist, and I won't know what content you're waiting for.
For the auto-request feature to work with your Watchlist, you must log into {{ request_url }} at least once every 90 days. If you don't log in regularly, the system won't be able to see your Watchlist, and I won't know what content you're waiting for.

## Additional Information
For more details about requesting content, check out these FAQ pages:

- [Responsible Content Requesting](faq/responsible-content-requests.md) - Understanding how the server works and best practices when requesting content
- [I requested something an hour ago but it hasn't shown up yet. Why?](faq/missing-requests.md) - Release dates and availability within {{ config.extra.site.request_url }}
- [I requested something an hour ago but it hasn't shown up yet. Why?](faq/missing-requests.md) - Release dates and availability within {{ request_url }}
- [I'm having a problem with a Movie or TV Show](faq/content-issues.md) - Reporting issues with Movies or TV Shows
- [Content Quality and Language Options](faq/special-requests.md) - Media quality defaults, language tracks, and special content requests
- [I don't want to use this request thingy, can't I just text you what I want?](faq/i-dont-want-to-use-overseerr.md) - Why we use a request system
17 changes: 17 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import os

def define_env(env):
"""
This hook is called when the config is loading.
"""
# Get environment variables with fallbacks
username = os.getenv('GITHUB_REPOSITORY_OWNER', 'Ghost')
repo_name = os.getenv('GITHUB_REPOSITORY', 'mkdocs-plex-guide-template').split('/')[-1]

# Add them to the macros environment
env.variables.update({
"username": username,
"repo_name": repo_name,
"request_url": "request.example.com",
"domain": "example.com"
})
13 changes: 4 additions & 9 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: "{{ config.extra.site.username }}.github.io"
site_url: "https://{{ config.extra.site.username }}.github.io"
site_name: "{{ username }}.github.io"
site_url: "https://{{ username }}.github.io"
theme:
name: material
logo: assets/images/plex-logo.webp
Expand Down Expand Up @@ -69,7 +69,7 @@ plugins:
- mkdocs-video
- git-revision-date-localized
- git-committers:
repository: !ENV [GITHUB_REPOSITORY, "your-username/your-repo"]
repository: "{{ username }}/{{ repo_name }}"
branch: main
- macros

Expand All @@ -93,7 +93,7 @@ markdown_extensions:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg

copyright: "Copyright © {{ page.meta.git_creation_date_localized.year }} {{ config.extra.site.username }}"
copyright: "Copyright © {{ git.date.year }} {{ username }}"

extra_css:
- stylesheets/extra.css
Expand All @@ -109,8 +109,3 @@ extra:
- icon: fontawesome/solid/globe
link: "https://{{ config.extra.site.username }}.github.io"
name: Personal Website
site:
username: !ENV [GITHUB_REPOSITORY_OWNER, "Ghost"]
repo_name: !ENV [GITHUB_REPOSITORY_NAME, "mkdocs-plex-guide-template"]
domain: "example.com"
request_url: "request.example.com"

0 comments on commit 1bb2b87

Please sign in to comment.