first commit
This commit is contained in:
commit
1fa59e4c57
5 changed files with 129 additions and 0 deletions
13
Scrobbles/Tape/13 Commandments
Normal file
13
Scrobbles/Tape/13 Commandments
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
A,Square Hammer,Ghost,Popestar
|
||||||
|
A,Year Zero,Ghost,Infestissumam
|
||||||
|
A,Mary on a Cross,Ghost,Seven Inches of Satanic Panic
|
||||||
|
A,Call Me Little Sunshine,Ghost,Impera
|
||||||
|
A,Darkness at the Heart of My Love,Ghost,Impera
|
||||||
|
A,Dance Macabre,Ghost,Prequelle
|
||||||
|
A,Rats,Ghost,Prequelle
|
||||||
|
A,Spillways,Ghost,Impera
|
||||||
|
A,Cirice,Ghost,Meliora
|
||||||
|
A,If You Have Ghosts,Ghost,If You Have Ghost
|
||||||
|
B,He Is,Ghost,Meliora
|
||||||
|
B,Zenith,Ghost,Meliora
|
||||||
|
B,Phantom of the Opera,Ghost,Phantomime
|
||||||
12
Scrobbles/Tape/Low Energy Sad
Normal file
12
Scrobbles/Tape/Low Energy Sad
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
A,"GRIS, Pt. 1",Berlinist,Gris (Original Game Soundtrack)
|
||||||
|
A,end of a life,Mori Calliope,end of a life
|
||||||
|
A,Rayleigh Scattering,acloudyskye,Blood Rushing Like Current Through a Powerline
|
||||||
|
A,"Endless Ocre (You look lonely, I can fix that)",Aloboi,"Endless Ocre (You look lonely, I can fix that)"
|
||||||
|
A,Glimpse of Us,Joji,SMITHEREENS
|
||||||
|
A,Instrument of Surrender,Sea Power, Disco Elysium
|
||||||
|
A,Mandus,Jessica Curry,Amnesia: A Machine for Pigs
|
||||||
|
A,Neon Gravestones,twenty one pilots,Trench
|
||||||
|
A,Blood Sport (from the room below),Sleep Token,Sundowning
|
||||||
|
A,The Smallest Church in Saint-Saëns,Sea Power,Disco Elysium
|
||||||
|
A,As the World Caves In,Matt Maltese,As the World Caves In
|
||||||
|
A,"GRIS, Pt. 2",Berlinist,Gris (Original Game Soundtrack)
|
||||||
19
Scrobbles/Tape/Mara
Normal file
19
Scrobbles/Tape/Mara
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
A,Space Oddity,David Bowie,David Bowie
|
||||||
|
A,Dream On,Depeche Mode,Exciter
|
||||||
|
A,Masochist II,Die Form,Histories
|
||||||
|
A,Gallowdance,Lebanon Hanover,Tomb for Two
|
||||||
|
A,Lucretia My Reflection,The Sisters of Mercy,Floodland
|
||||||
|
A,The Great Commandment,Camouflage,Voices & Images
|
||||||
|
A,"Another Brick in the Wall, Part 2",Pink Floyd,The Wall
|
||||||
|
A,Little Dark Age,MGMT,Little Dark Age
|
||||||
|
A,Gaia,KingGizzard & the Lizard Wizard,Omnium Gatherum
|
||||||
|
B,THE DEATH OF PEACE OF MIND,Bad Omens,THE DEATH OF PEACE OF MIND
|
||||||
|
B,Satanic Suicide Sex Cult,Lesbian Bed Death,Midnight Lust
|
||||||
|
B,I-E-A-I-A-I-O,System of a Down,Steal This Album!
|
||||||
|
B,Sugar,Sleep Token,Sundowning
|
||||||
|
B,Emergence,Sleep Token,Even in Arcadia
|
||||||
|
B,John the Revelator,Depech Mode,Playing the Angel
|
||||||
|
B,My Girlfriend's Girlfriend,Type O Negative,October Rust
|
||||||
|
B,Spellbound,Siouxsie and the Banshees,Juju
|
||||||
|
B,A Kind of Magic,Queen,"Greatest Hits I, II & III"
|
||||||
|
B,Pain,Boy Harsher,Lesser Man
|
||||||
15
Scrobbles/Tape/Sleep Token Download 2025
Normal file
15
Scrobbles/Tape/Sleep Token Download 2025
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
A,Look to Windward,Sleep Token,Even in Arcadia
|
||||||
|
A,The Offering,Sleep Token,Sundowning
|
||||||
|
A,Vore,Sleep Token,Take Me Back to Eden
|
||||||
|
A,Emergence,Sleep Token,Even in Arcadia
|
||||||
|
A,Alkaline,Sleep Token,This Place Will Become Your Tomb
|
||||||
|
A,Hypnosis,Sleep Token,This Place Will Become Your Tomb
|
||||||
|
A,Rain,Sleep Token,Take Me Back to Eden
|
||||||
|
A,Caramel,Sleep Token,Even in Arcadia
|
||||||
|
B,The Summoning,Sleep Token,Take Me Back to Eden
|
||||||
|
B,Granite,Sleep Token,Take Me Back to Eden
|
||||||
|
B,The Love You Want,Sleep Token,This Place Will Become Your Tomb
|
||||||
|
B,Higher,Sleep Token,Sundowning
|
||||||
|
B,Damocles,Sleep Token,Even in Arcadia
|
||||||
|
B,Thread the Needle,Sleep Token,One
|
||||||
|
B,Take Me Back to Eden,Sleep Token,Take Me Back to Eden
|
||||||
70
scrobble
Executable file
70
scrobble
Executable file
|
|
@ -0,0 +1,70 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
from time import time
|
||||||
|
import requests
|
||||||
|
import argparse
|
||||||
|
import csv
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
prog='Scrobbler',
|
||||||
|
description='Scrobbles Tapes and Vinyl to a Listenbrainz API')
|
||||||
|
|
||||||
|
parser.add_argument('list')
|
||||||
|
requiredNamed = parser.add_argument_group('Required Arguments')
|
||||||
|
requiredNamed.add_argument('-t', '--type', help='Whether the list is from a tape or vinyl', required=True)
|
||||||
|
parser.add_argument('-s', '--side', help='Specify a side', nargs='+')
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Set DEBUG to True to test local dev server.
|
||||||
|
# API keys for local dev server and the real server are different.
|
||||||
|
DEBUG = True
|
||||||
|
ROOT = 'https://scrobbles.ceressees.dev/apis/listenbrainz'
|
||||||
|
ROOT_FOLDER = '/home/ceres/Scrobbles'
|
||||||
|
PATH = f'{ROOT_FOLDER}/{args.type.title()}/{args.list}'
|
||||||
|
SONGS = []
|
||||||
|
song_num = 0
|
||||||
|
if not os.path.isfile(PATH):
|
||||||
|
raise Exception("Please specify a valid list")
|
||||||
|
|
||||||
|
with open(PATH) as list_file:
|
||||||
|
list_data = csv.reader(list_file, delimiter=',')
|
||||||
|
for row in list_data:
|
||||||
|
if args.side == None or row[0] in args.side:
|
||||||
|
SONGS.append([row[1], row[2], row[3]])
|
||||||
|
|
||||||
|
def submit_listen(listen_type, payload, token):
|
||||||
|
response = requests.post(
|
||||||
|
url="{0}/1/submit-listens".format(ROOT),
|
||||||
|
json={
|
||||||
|
"listen_type": listen_type,
|
||||||
|
"payload": payload,
|
||||||
|
},
|
||||||
|
headers={
|
||||||
|
"Authorization": "Token {0}".format(token)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
response.raise_for_status()
|
||||||
|
|
||||||
|
return response.json()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
for song in SONGS:
|
||||||
|
PAYLOAD = [
|
||||||
|
{
|
||||||
|
"listened_at": int(time()),
|
||||||
|
"track_metadata": {
|
||||||
|
"artist_name": f"{song[1]}",
|
||||||
|
"track_name": f"{song[0]}",
|
||||||
|
"release_name": f"{song[2]}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
token = 'QAE42y-vs3pwpJex1tPRCIulCdbnSHpL4tIuYZrB2bevBHze'
|
||||||
|
json_response = submit_listen(listen_type='single', payload=PAYLOAD, token=token)
|
||||||
|
|
||||||
|
print("Response was: {0}".format(json_response))
|
||||||
|
print(f'Scrobbled {song[0]}')
|
||||||
Loading…
Add table
Add a link
Reference in a new issue