ben-xo / sslscrobbler Goto Github PK
View Code? Open in Web Editor NEWSerato ScratchLive! / Serato DJ Scrobbler and Twitter bot
License: MIT License
Serato ScratchLive! / Serato DJ Scrobbler and Twitter bot
License: MIT License
please help as this would be an awesome app to use
It looks like, on my Mac at least, Monterey has removed php from /usr/bin/php.
Homebrew installs it as /usr/local/bin/php -- not sure if platypus can look in two places.
This issue might be unique to my system.
Running from the command line with the Homebrew-installed php works great.
Wonder if Traktor is also supported!
Yeah!
Need to do a better job of not switching to the next track too early. One model might be to only switch track after the previous tune is >75% or something like that.
Rather than always looking for the newest file in the folder.
I'm using the Now Playing Observer to write out a file containing stream data, which is used by Nicecast in order to provide song metadata to our Icecast server. However, the metadata is written out as soon as the song is loaded. So when I'm shuffling through songs, a lot of erroneous data goes out.
I was watching the history pane in Serato DJ, and the data about the current song doesn't include a start time until the track actually goes on air, determined explicitly via both the crossfader, and the channel fader.
It seems to me that the underlying data provides a mechanism for knowing when a track is actually playing, but the reader naively treats a new song in the session file as being played.
The accuracy of the Now Playing observer would be dramatically improved if it evaluated this data (start time) before actually sending the announcements to the rest of the stack.
Would be good to do a clean shutdown and notify / scrobble last remaining tracks when signals are caught.
It looks like Serato updated their session database format at some point. I was poking around with my files and just noticed this huge spew of messages at the top after -d
'ing a session file:
$ php ~/Development/sslscrobbler/historyreader.php -d ~/Music/_Serato_/History/Sessions/2580.session
2014-06-27 08:15:17 INFO: SSLFileReader - reading structure of /Users/jason/Music/_Serato_/History/Sessions/2580.session...
2014-06-27 08:15:17 INFO: SSLFileReader - asking structure DOM to parse /Users/jason/Music/_Serato_/History/Sessions/2580.session...
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 01 1
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 01 1Unknown field 71: 4073 cdd8 4b3b 8f27 @s!!K;!'
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 01 1
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 01 1Unknown field 71: 4072 2bd7 0a3d 70a4 @r+!A=p!
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 00 .
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 01 1
Warning: vsprintf(): Too few arguments in /Users/jason/Development/sslscrobbler/SSL/Logger/L.php on line 93
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker -
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 01 1
2014-06-27 08:15:17 INFO: XOUPSSLTrackAdatUnpacker - Unknown field 70: 01 1Unknown field 71: 4079 d999 9999 999a @y!!!!!!
2014-06-27 08:15:17 INFO: SSLFileReader - printing structure of /Users/jason/Music/_Serato_/History/Sessions/2580.session...
CHUNK<vrsn>:
version => 1.0/Serato Scratch LIVE Review
Probably all it needs is a better "history path" that's tailored to the windows install, and some instructions on how to get it up and running (install PHP, Growl, etc.)
Need to add:
The app still works, but the warnings are very noisy
As per title. They show up in the history file as deck 0 and immediately played, so they tend to scrobble wrong and somewhat accidentally steal the show.
Hi, there. Thanks for the great software. I'm hoping you can help me to understand an error I am encountering while using the program in immediate mode (-i).
As you can see from the output below, the program is reading from session file 334268.session
.
The problem is: when I invoke the command to run the program, sometimes it starts up correctly, and sometimes it errors out. When the program errors out, it shows the errors I have pasted below. When it starts up correctly, it only functions for one or two tracks before eventually erroring out the same way.
I am not an expert, but it appears the program is very sensitive to the current state of the session file.
While the source code is really well-written and I have managed to explore it with some success, this error seems to be related to the binary file. The binary file, unfortunately, is opaque to me.
User:sslscrobbler Administrator$ ./historyreader.php -i --dir /Volumes/Macintosh\ HD-1/Users/RemoteUser/Music/_Serato_/History/Sessions/
Using default config. Customise by creating config.php (based on config.php-default)
Using file /Volumes/Macintosh HD-1/Users/RemoteUser/Music/_Serato_/History/Sessions/334268.session ...
2016-07-08 20:28:48 WARNING: SignalHandler - PCNTL extension not installed! Cannot trap Ctrl-C / SIGKILL
2016-07-08 20:28:48 INFO: PluginWrapper - 0: GrowlPlugin installed
2016-07-08 20:28:48 INFO: PluginWrapper - 1: NowPlayingLoggerPlugin installed
1: PLAYING [--:--] [Vybz Kartel - Western Union] [prev: Masicka - Hardball]
2: NEW [--:--] [Alkaline - Formula] [prev: Alkaline - Champion boy]
Date: 2016-07-08 20:28:48 Memory Usage: 16,944,960 bytes
2016-07-08 20:28:48 INFO: NowPlayingModel - enqueued track Vybz Kartel - Western Union
2016-07-08 20:28:48 INFO: NowPlayingModel - enqueued track Alkaline - Formula
2016-07-08 20:28:48 INFO: SSLEventGrowlRenderer - >> Now Playing: >> Vybz Kartel - Western Union
2016-07-08 20:28:48 INFO: SSLEventGrowlRenderer - >> Track change: >> Track started: Vybz Kartel - Western Union
2016-07-08 20:28:48 INFO: SSLEventGrowlRenderer - >> Track change: >> Track started: Alkaline - Formula
Warning: fread(): Length parameter must be greater than 0 in /Users/Administrator/src/sslscrobbler-master/SSL/SSLChunkParser.php on line 109
Warning: fread(): Length parameter must be greater than 0 in /Users/Administrator/src/sslscrobbler-master/SSL/SSLChunkParser.php on line 109
Warning: fread(): Length parameter must be greater than 0 in /Users/Administrator/src/sslscrobbler-master/SSL/SSLChunkParser.php on line 109
… (hundreds of the above/below lines omitted)
Warning: fread(): Length parameter must be greater than 0 in /Users/Administrator/src/sslscrobbler-master/SSL/SSLChunkParser.php on line 109
Warning: fread(): Length parameter must be greater than 0 in /Users/Administrator/src/sslscrobbler-master/SSL/SSLChunkParser.php on line 109
Warning: fread(): Length parameter must be greater than 0 in /Users/Administrator/src/sslscrobbler-master/SSL/SSLChunkParser.php on line 109
Warning: fread(): Length parameter must be greater than 0 in /Users/Administrator/src/sslscrobbler-master/SSL/SSLChunkParser.php on line 109
No more data (read 3 bytes)
Try ./historyreader.php --help
User:sslscrobbler-master Administrator$ php -v
PHP 5.3.29 (cli) (built: Mar 19 2015 14:04:17)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
Here's the output of php -i
: https://gist.github.com/briantigerchow/3413441b73da93659ffc826a1edf37be
So that it looks nice
Would love to see this have support to post to Discord channels through a webhook or bot
Hey there;
I mainly just wanted to say that this library is absolutely stellar. I have been fighting on and off with parsing Serato's session files for a long time before I found this project. I'm glad there's so much code re-use with their apps, because it works with ITCH and DJ perfectly. I got pretty close to mapping out the data format, but after reading the README here I see that I was off a bit.
I think Scratch Live has some additional fields not used by the other two, but the groundwork in this plugin has been stellar at handling everything I've thrown at it so far.
I wrote a plugin that manages the NowPlaying.txt file that Nicecast uses (see their guide, search for NowPlaying.txt). Should I fork the project and submit a PR with the plugin file? It's incredibly small, barely larger than the generic Now Playing plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.