Skip to content

Instantly share code, notes, and snippets.

@henryjfry
henryjfry / lastfm_python_web_auth.py
Created July 10, 2024 09:39
LASTFM Python Scrobble_WEB_AUTH
import requests
import hashlib
import time
import webbrowser
# Replace with your Last.fm API credentials
API_KEY = 'API_KEY'
API_SECRET = 'API_SECRET'
PASSWORD = 'PASSWORD'
USERNAME = 'USERNAME'
@henryjfry
henryjfry / lastfm_python.py
Created July 10, 2024 09:38
LASTFM Python Scrobble_USERNAME_PASSWORD
import requests
import hashlib
import time
# Replace with your Last.fm API credentials
API_KEY = 'API_KEY'
API_SECRET = 'API_SECRET'
USERNAME = 'username'
PASSWORD = 'password'
@henryjfry
henryjfry / subs_file_hash_size.py
Last active February 4, 2024 14:17
opensubtitles.org - HashFile = filehash = filesize + 64bit sum of the first and last 64k of the file
import struct, os
__64k = 65536
__longlong_format_char = 'q'
__byte_size = struct.calcsize(__longlong_format_char)
def temp_file():
import tempfile
file = tempfile.NamedTemporaryFile()
filename = file.name
return filename
@henryjfry
henryjfry / subs_file_hash.py
Created January 11, 2024 10:01
opensubtitles.org - HashFile = filehash = filesize + 64bit sum of the first and last 64k of the file
import struct, os
import urllib
__64k = 65536
__longlong_format_char = 'q'
__byte_size = struct.calcsize(__longlong_format_char)
def temp_file():
import tempfile
file = tempfile.NamedTemporaryFile()
filename = file.name
@henryjfry
henryjfry / subs2.py
Last active January 10, 2024 15:45
opensubtitles.org - HashFile = filehash = filesize + 64bit sum of the first and last 64k of the file
import struct, os
__64k = 65536
__longlong_format_char = 'q'
__byte_size = struct.calcsize(__longlong_format_char)
meta = {'filesize': '', 'filehash': ''}
def temp_file():
import tempfile
@henryjfry
henryjfry / seren.py
Last active February 23, 2021 09:53
SEREN 2.0 SMARTPLAY_FIX
/home/osmc/.kodi/addons/plugin.video.seren/resources/lib/modules/player.py
def _keep_alive(self):
################################################
#if self.min_time_before_scrape > time_left and not self.pre_scrape_initiated:
# self._handle_pre_scrape()
if self.current_time > 30 and not self.pre_scrape_initiated:
xbmc.log(str('SEREN_PRESCRAPE')+'===>PHIL', level=xbmc.LOGNOTICE)
self._handle_pre_scrape()
/home/osmc/.kodi/addons/plugin.video.seren/resources/lib/modules/globals.py
@henryjfry
henryjfry / helios.json
Created December 24, 2020 19:03
wako helios json
{
"yts": {
"name": "YTS",
"enabled": true,
"languages": [
"en"
],
"base_url": "https://yts.am",
"fallback_urls": [
"https://yts.pm",
@henryjfry
henryjfry / kodi_rd_prescrape_playlist.py
Created November 13, 2020 19:31
kodi_rd_prescrape_playlist.py
#!/usr/bin/python
import requests
import json
import time
import sys
import PTN
import re
regex = re.compile('[^a-zA-Z]')
@henryjfry
henryjfry / magnet_kodi
Created October 19, 2020 20:05
realdebrid api magnet + kodi integration
#!/usr/bin/env python
import requests
import json
import time
import sys
import base64
kodi_credentials = b'USER:PASSWORD'
kodi_ip = '192.168.0.XX'
kodi_port = '8081'
@henryjfry
henryjfry / magnet.py
Created October 19, 2020 19:51
realdebrid api magnet
#!/usr/bin/env python
import requests
import json
import time
import sys
#
#/home/osmc/scripts/magnet.py "magnet:?xt=urn:btih:3e0a8674e7e2dba675c5073455d79b9e89d47955&dn=The.West.Wing.S07.1080p.WEB-DL.AAC2.0.H.264-NTb%5Brartv%5D&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2950&tr=udp%3A%2F%2F9.rarbg.to%3A2900" -s 13
#