Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mervick/rhythmbox-telegram
Telegram plugin for Rhythmbox: Listen and download music from Telegram directly within Rhythmbox
https://github.com/mervick/rhythmbox-telegram
music music-player rhythmbox rhythmbox-plugin telegram
Last synced: 2 days ago
JSON representation
Telegram plugin for Rhythmbox: Listen and download music from Telegram directly within Rhythmbox
- Host: GitHub
- URL: https://github.com/mervick/rhythmbox-telegram
- Owner: mervick
- License: gpl-3.0
- Created: 2023-09-17T19:54:44.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-13T19:12:04.000Z (about 2 months ago)
- Last Synced: 2024-10-29T15:34:14.350Z (9 days ago)
- Topics: music, music-player, rhythmbox, rhythmbox-plugin, telegram
- Language: Python
- Homepage:
- Size: 778 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rhythmbox Telegram Music Plugin
Rhythmbox-Telegram is a plugin for Rhythmbox that allows you to listen to and download music from Telegram directly within Rhythmbox.
![Telegram playlist in Rhythmbox](screenshots/playlist.png)
[**More screenshots here**](screenshots)## Key Features
- **Telegram Integration**: Easily add Telegram channels and chats to Rhythmbox as playlists, consolidating your digital communication and music browsing in one convenient interface.
- **Browse Audio Files**: Effortlessly browse through audio files shared in Telegram directly from within Rhythmbox, ensuring quick access to your desired tracks.
- **Listen to Music**: Seamlessly stream audio content from Telegram through Rhythmbox, enabling uninterrupted music playback without the need to switch between applications.
- **Download to Library**: Download audio files from Telegram directly to your Rhythmbox library, expanding your music collection with the content you enjoy.
With Rhythmbox-Telegram, enjoy the convenience of accessing your favorite Telegram audio content alongside your music library, revolutionizing the way you interact with both your digital communication platforms and your music collection.
## Installation
To enable plugin, you need first install `python-telegram` - Telegram library for python backed by the official Telegram client - [TDLib](https://core.telegram.org/tdlib)
```sh
pip3 install python-telegram==0.18.0
```Next, if Rhythmbox player is open, please close it, then proceed to download the plugin from the repository and move it to the Rhythmbox plugins folder, and compile glib schemas
```sh
git clone https://github.com/mervick/rhythmbox-telegram ~/.local/share/rhythmbox/plugins/rhythmbox-telegram
glib-compile-schemas ~/.local/share/rhythmbox/plugins/rhythmbox-telegram
```## Activation
After installing the plugin, you need to:
- Activate it in the Rhythmbox settings
- Obtain a Telegram API ID
- Authenticate the Telegram user### Obtaining Telegram API ID
In order to obtain an API id you need to do the following:
- Log in to your Telegram core: https://my.telegram.org.
- Go to [API development tools](https://my.telegram.org/apps) and fill out the form.
- You will get `api_id` and `api_hash` parameters required for user authorization.More detailed instructions can be found in the [Telegram documentation](https://core.telegram.org/api/obtaining_api_id)
### Authorization
After obtaining the API ID, in the plugin settings, input the received `api_id` and `api_hash`, along with your Telegram user's phone number. Then, press the 'Connect' button. Telegram will send you a code for authorization to any connected Telegram app.
### Adding your music to Rhythmbox
After successfully connecting Telegram to Rhythmbox, in the plugin settings, you'll be able to add Telegram channels, groups and chats to listen to your favorite music.
## Telegram API Usage and Operations
The plugin uses the Telegram API strictly for reading purposes. **No write operations are performed**.
The following actions are carried out:
* Authorization process
* Retrieving the contact list (necessary to fetch groups and channels)
* Iterating over all messages in groups and channels selected as "Music Sources" in the plugin settings (only audio files are searched; messages and audio messages are ignored)
* Downloading of audio files
* Getting a public link to a message with an audio fileNo other operations are conducted.
### TDLib API Methods and Handlers Used
The plugin uses only the following methods and handlers:
* `setTdlibParameters`
* `checkDatabaseEncryptionKey`
* `getAuthorizationState`
* `setAuthenticationPhoneNumber`
* `checkAuthenticationPassword`
* `checkAuthenticationCode`
* `loadChats`
* `getChats`
* `getChat`
* `getMessage`
* `getChatHistory`
* `downloadFile`
* `getMessageLink`
* `updateAuthorizationState`
* `updateNewChat`### Caching and Audio File Retrieval
The plugin caches information about retrieved audio files. The audio file list is initially fetched in small batches to stay within API quota limits. If the initial retrieval is incomplete, remaining tracks will be loaded later. The plugin automatically fetches new files and continues to load any remaining tracks with intervals of 5-10 minutes, both during initialization and while retrieving new content. This approach ensures efficient, quota-compliant, and timely updates of new content.
## Data Encryption and Storage
We strive to protect your data by implementing various security measures:
### Authentication Data
Authentication data is encrypted and stored within the GNOME Keyring. This ensures that sensitive information is securely protected within the GNOME environment, providing an additional layer of security against unauthorized access.
### Data from Telegram
Data obtained from Telegram is encrypted using a user-provided encryption key and managed by the official Telegram client, [TDLib](https://core.telegram.org/tdlib).
The encrypted databases are stored at: `~/.local/share/rhythmbox/telegram/*/database`### Temporary Audio Files
Temporary audio files are stored at `~/.local/share/rhythmbox/telegram/*/files/music`
You can delete these files at any time. However, please note that deleting these files manually will not remove their entries from the database. For safe removal, you can delete audio files through the plugin settings, ensuring the database integrity is maintained.### Additional Data Storage
**Audio Metadata:** We store metadata of audio files in an unencrypted format. This includes data obtained from Telegram, such as the chat identifier, message identifier within the chat, publication date and time, file size, file name, audio tags and the file's location in the file system.
**Chat Information:** We store information about your chats, including chat names and identifiers, in an encrypted format to ensure privacy and security.
This data is stored within the database at: `~/.local/share/rhythmbox/telegram/*/data.sqlite`
## License
[Rhythmbox-Telegram](https://github.com/mervick/rhythmbox-telegram) is an open-source plugin distributed under the [GPL-3 license](https://github.com/mervick/rhythmbox-telegram/blob/master/LICENCE), ensuring that it remains freely accessible to all users and encouraging community collaboration and contribution.
## Contribute
If you like our plugin you can support the ongoing development and maintenance of Rhythmbox-Telegram by spreading the word about the plugin or making contributions via PayPal or cryptocurrency donations, ensuring its continued improvement and availability for the community.