Skip to content

Commit

Permalink
Add initial project files including requirements, .gitignore, and bui…
Browse files Browse the repository at this point in the history
…ld configuration
  • Loading branch information
valentin-marquez committed Mar 1, 2025
0 parents commit a96944e
Show file tree
Hide file tree
Showing 15 changed files with 1,520 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build and Release

on:
push:
tags:
- 'v*' # Trigger on any tag starting with 'v', like v1.0, v2.3.1, etc.

jobs:
build:
name: Build and Release
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.12.6
uses: actions/setup-python@v4
with:
python-version: '3.12.6'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Get version from tag
id: get_version
run: |
$VERSION = "${{ github.ref_name }}"
$VERSION = $VERSION -replace "^v", ""
echo "version=$VERSION" >> $env:GITHUB_OUTPUT
shell: pwsh

- name: Build application
run: |
python build.py build
- name: Build installer
run: |
python build.py installer
- name: Create release package
run: |
python build.py package
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
path: |
dist/VLC Discord Presence.exe
dist/VLC Discord RP Setup.exe
VLC_Discord_RP.zip
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: VLC Discord Rich Presence ${{ steps.get_version.outputs.version }}
body: |
# VLC Discord Rich Presence ${{ steps.get_version.outputs.version }}
## Installation
Download and run the installer (`VLC Discord RP Setup.exe`), or use the standalone application.
## Requirements
- Windows
- VLC Media Player
- Discord
files: |
dist/VLC Discord RP Setup.exe
VLC_Discord_RP.zip
draft: false
prerelease: false
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Python
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
*.manifest
*.spec
!vlc_discord_rp.spec

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDE
.idea/
.vscode/*
!.vscode/settings.json
.DS_Store

# Windows
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

# Project specific
release/
VLC_Discord_RP.zip
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{

"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"python.analysis.extraPaths": [
"${workspaceFolder}"
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.tabSize": 4,
"editor.insertSpaces": true
},
"files.exclude": {
"**/__pycache__": true,
"**/.pytest_cache": true,
"**/*.pyc": true
},
"terminal.integrated.env.windows": {
"PYTHONPATH": "${workspaceFolder}"
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Valentin Marquez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
96 changes: 96 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# VLC Discord Rich Presence
<div align="center">
<img src="assets/vlc_ios.png" alt="VLC Discord RP Logo" width="200" height="200" style="border-radius: 10px;" />
</div>

> *"Because your friends totally need to know you're watching Shrek for the 17th time."*
## What Is This Thing?

VLC Discord Rich Presence is a magical little bridge between your VLC Media Player and Discord, letting your friends see what media you're currently enjoying (or enduring). It shows:

- What you're watching/listening to
- Artist and album info (for music)
- Play/pause status
- Fancy icons and progress bars

Built during a questionable 10-hour coding marathon fueled by caffeine and poor life decisions (1AM-11AM), this app works surprisingly well despite its sleep-deprived origins!

## Installation

### The Easy Way

1. Download the latest installer from the [releases page](https://github.com/valentin-marquez/vlc-discord-rp/releases)
2. Run the installer (`VLC Discord RP Setup.exe`)
3. Follow the on-screen instructions
4. Click "Install Now"
5. Let the installer do its magic ✨
6. Enjoy your new Discord flex powers!

### The Hard Way (For Developers and Masochists)

1. Clone this repo
2. Install requirements: `pip install -r requirements.txt`
3. Run `python build.py all` to build both the app and installer
4. Look in the `dist` folder for your shiny new executables

## How It Works

1. The extension adds a Lua script to VLC that tracks what you're playing
2. This script creates and continuously updates a file at `%APPDATA%\vlc\vlc_discord_status.json` with your current media information
3. The background application reads this JSON file and relays the information to Discord's Rich Presence API
4. Your friends wonder why you're watching cooking videos at 3 AM
5. Social validation achieved! 🎉

## FAQ

### Q: Why isn't anything showing up in Discord?
**A:** Make sure:
1. Both VLC and Discord are running
2. The extension is activated in VLC (View -> Discord RP)
3. You're playing a media file
4. The app was added to Windows startup during installation (it needs to be running to work)
5. Due to VLC limitations, you may need to re-enable the extension when you first open VLC (not needed when switching media files while VLC remains open)
6. If it's enabled but still not showing, try forcing an update by clicking View -> Discord RP -> Update Now

You can check the VLC console (Ctrl+M) for any errors. If issues persist, please report them in the GitHub Issues section.

### Q: How do I close/exit the app?
**A:** The app runs silently in the background. To close it, find `VLC Discord Presence.exe` in Task Manager and end the process. Yes, I know, very user-friendly. I was sleepy, okay?

### Q: Where is it installed?
**A:** By default, the app installs to `%LOCALAPPDATA%\VLC Discord RP`. The Lua extension goes to `%APPDATA%\vlc\lua\extensions`.

### Q: Does it work on Mac/Linux?
**A:** Currently tested on Windows only. Could work elsewhere with manual installation, but you're on your own there, brave explorer.

### Q: How much of my privacy am I giving up?
**A:** Only the title, artist, and album info from your media files are shared - and only with your Discord friends. We don't collect any data. Also, you can pause the sharing by closing VLC.

### Q: I found a bug!
**A:** That's not a question, but I respect your enthusiasm. Please open an issue on GitHub with details about what went wrong.

### Q: Why did you make this?
**A:** The voices told me to. Also, it seemed like a fun project.



## Development Notes

This project was created in one sleepless night from 1AM to 11AM, which explains:
- Some questionable code decisions
- The lack of proper error handling in places
- Why the uninstaller is a batch file (it just works™)
- The dependency on Task Manager to close it

Pull requests are welcome if you want to improve things while I catch up on sleep!

## License

MIT License - Feel free to use, modify, and distribute as you see fit.

---

*Made with ❤️ and sleep deprivation*

*"It works on my machine!"* - Developer motto
Binary file added assets/icon.ico
Binary file not shown.
Binary file added assets/vlc_ios.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a96944e

Please sign in to comment.