Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
338 changes: 338 additions & 0 deletions script.bingebase/LICENSE.txt

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions script.bingebase/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Bingebase for Kodi

Automatically scrobble what you watch and sync your watch history between Kodi and [Bingebase](https://bingebase.com).

## Features

- **Scrobbling** — automatically track movies and TV episodes as you watch
- **Two-way sync** — import Kodi watch history to Bingebase and export Bingebase history back to Kodi
- **Scheduled sync** — periodic background sync (6h / 12h / 24h intervals)
- **Library update sync** — sync when Kodi finishes a library scan

## Installation

1. Download the latest release zip
2. In Kodi, go to **Add-ons > Install from zip file**
3. Select the downloaded zip
4. The addon will prompt you to connect your Bingebase account on first run

### Manual installation

Copy or symlink the `script.bingebase` folder into your Kodi addons directory:

- **Linux:** `~/.kodi/addons/`
- **macOS:** `~/Library/Application Support/Kodi/addons/`
- **Windows:** `%APPDATA%\Kodi\addons\`

## Setup

1. Open **Add-ons > My add-ons > Services > Bingebase**
2. Click **Configure**
3. Under **Connection**, click **Authorize** and follow the on-screen instructions
4. Adjust scrobbling and sync settings as needed

## Settings

### Scrobbling
- Enable/disable scrobbling
- Toggle movies and TV episodes independently
- Set a scrobble threshold (percentage watched before scrobbling on stop)
- Show notifications on scrobble

### Sync
- Sync on startup
- Sync on library update
- Scheduled sync interval (off / 6h / 12h / 24h)
- Sync direction: Kodi to Bingebase, Bingebase to Kodi, or both

## About Bingebase

[Bingebase](https://bingebase.com) is a free movie and TV show tracking platform. Track what you watch, build custom lists, and sync across all your devices.

## License

GPL-2.0-or-later — see [LICENSE.txt](LICENSE.txt).
33 changes: 33 additions & 0 deletions script.bingebase/addon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.bingebase" name="Bingebase" version="1.0.2" provider-name="Bingebase">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
</requires>
<extension point="xbmc.service" library="service.py"/>
<extension point="xbmc.addon.metadata">
<assets>
<icon>icon.png</icon>
</assets>
<platform>all</platform>
<license>GPL-2.0-or-later</license>
<website>https://bingebase.com</website>
<source>https://github.com/ualeks/script.bingebase</source>
<summary lang="en_GB">Track movies and TV shows to Bingebase</summary>
<description lang="en_GB">Automatically scrobble what you watch and sync your watch history between Kodi and Bingebase.</description>
<news>
v1.0.2
- Add news tag and prepare for Kodi repository submission

v1.0.1
- Changed license to GPL-2.0-or-later for Kodi repository compatibility

v1.0.0
- Initial release
- Scrobbling for movies and TV episodes
- Two-way sync with Bingebase
- Device authorization flow
- Scheduled background sync (6h/12h/24h intervals)
- Sync on Kodi startup and library update
</news>
</extension>
</addon>
12 changes: 12 additions & 0 deletions script.bingebase/changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
v1.0.2 (2026-01-30)
- Add news tag and prepare for Kodi repository submission

v1.0.1 (2026-01-30)
- Changed license to GPL-2.0-or-later for Kodi repository compatibility

v1.0.0 (2025-01-30)
- Initial release
- Scrobbling for movies and TV episodes
- Two-way sync with Bingebase
- Device authorization flow
- Scheduled background sync
Binary file added script.bingebase/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
149 changes: 149 additions & 0 deletions script.bingebase/resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Kodi Media Center language file
# Addon Name: Bingebase
# Addon id: script.bingebase
# Addon Provider: Bingebase
msgid ""
msgstr ""
"Project-Id-Version: script.bingebase\n"
"Report-Msgid-Bugs-To: https://github.com/ualeks/script.bingebase\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Bingebase\n"
"Language-Team: English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

# Connection settings
msgctxt "#32000"
msgid "Connection"
msgstr ""

msgctxt "#32001"
msgid "Status: Not connected"
msgstr ""

msgctxt "#32002"
msgid "Authorize Bingebase"
msgstr ""

msgctxt "#32003"
msgid "Disconnect"
msgstr ""

# Scrobbling settings
msgctxt "#32010"
msgid "Scrobbling"
msgstr ""

msgctxt "#32011"
msgid "Enable scrobbling"
msgstr ""

msgctxt "#32012"
msgid "Scrobble movies"
msgstr ""

msgctxt "#32013"
msgid "Scrobble TV shows"
msgstr ""

msgctxt "#32014"
msgid "Scrobble threshold (%)"
msgstr ""

msgctxt "#32015"
msgid "Show notification on scrobble"
msgstr ""

# Sync settings
msgctxt "#32020"
msgid "Sync"
msgstr ""

msgctxt "#32021"
msgid "Sync on startup"
msgstr ""

msgctxt "#32022"
msgid "Sync on library update"
msgstr ""

msgctxt "#32023"
msgid "Sync interval"
msgstr ""

msgctxt "#32024"
msgid "Sync direction"
msgstr ""

msgctxt "#32025"
msgid "Kodi to Bingebase"
msgstr ""

msgctxt "#32026"
msgid "Bingebase to Kodi"
msgstr ""

msgctxt "#32027"
msgid "Sync now"
msgstr ""

msgctxt "#32028"
msgid "Last sync: never"
msgstr ""

# Sync interval values
msgctxt "#32030"
msgid "Off"
msgstr ""

msgctxt "#32031"
msgid "6 hours"
msgstr ""

msgctxt "#32032"
msgid "12 hours"
msgstr ""

msgctxt "#32033"
msgid "24 hours"
msgstr ""

# Notifications
msgctxt "#32040"
msgid "Scrobbled: {0}"
msgstr ""

msgctxt "#32041"
msgid "Sync complete: {0} movies, {1} episodes"
msgstr ""

msgctxt "#32042"
msgid "Connection failed"
msgstr ""

msgctxt "#32043"
msgid "Successfully connected!"
msgstr ""

msgctxt "#32044"
msgid "Authorization expired"
msgstr ""

msgctxt "#32045"
msgid "Syncing..."
msgstr ""

msgctxt "#32046"
msgid "Import complete: {0} movies, {1} episodes"
msgstr ""

msgctxt "#32047"
msgid "Export complete: {0} items marked as watched"
msgstr ""

msgctxt "#32048"
msgid "Disconnected"
msgstr ""
Empty file.
54 changes: 54 additions & 0 deletions script.bingebase/resources/lib/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import json
from urllib.request import Request, urlopen
from urllib.parse import urlencode
from urllib.error import URLError, HTTPError

from resources.lib.utils import get_setting, log_error, BASE_URL


class BingebaseAPI:
def __init__(self):
self.token = get_setting('access_token')
self.webhook_url = get_setting('webhook_url')

def _request(self, url, data=None, method=None, auth=True):
headers = {
'Content-Type': 'application/json',
'User-Agent': 'Kodi/script.bingebase',
}
if auth and self.token:
headers['Authorization'] = 'Bearer {}'.format(self.token)

body = json.dumps(data).encode('utf-8') if data is not None else None
req = Request(url, data=body, headers=headers, method=method)
try:
response = urlopen(req, timeout=30)
response_body = response.read().decode('utf-8')
if response_body:
return json.loads(response_body)
return None
except HTTPError as e:
log_error('HTTP error {}'.format(e.code))
raise
except URLError as e:
log_error('URL error: {}'.format(e.reason))
raise

def is_connected(self):
return bool(self.token)

def scrobble(self, payload):
if not self.webhook_url:
return None
return self._request(self.webhook_url, data=payload, auth=False)

def import_history(self, movies, episodes):
url = '{}/api/v1/kodi/import'.format(BASE_URL)
payload = {'movies': movies, 'episodes': episodes}
return self._request(url, data=payload)

def export_history(self, since=None):
url = '{}/api/v1/kodi/export'.format(BASE_URL)
if since:
url += '?{}'.format(urlencode({'since': since}))
return self._request(url)
Loading
Loading