metadata

command module
v0.0.0-...-a9bddc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2022 License: BSD-3-Clause Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

metadata

Overview

metadata is an experimental hack to mess with extracting data from the spinitron.com metadata push mechanism.

metadata listens on a TCP port (default: 52341) for connection requests for metadata push requests in XML format from spinitron.com (or, really anywhere).

metadata extracts the relevant data from the XML and writes it to a MariaDB database.

WARNING

This code employs ZERO encryption, authentication, authorization or security. Use at your own peril.

Example Spinitron Channel Configuration

See the template spec for complete details.

tcp://metadata.example.com:52341
<?xml version="1.0" encoding="utf-8" ?>
<nowplaying>
    <time>%now%</time>
    <artist>%an%</artist>
    <title>%sn%</title>
    <album>%dn%</album>
</nowplaying>

Database Schema

CREATE TABLE `m` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `time` datetime NOT NULL,
  `artist` varchar(128) DEFAULT NULL,
  `title` varchar(128) DEFAULT NULL,
  `album` varchar(128) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5190 DEFAULT CHARSET=utf8mb4

Documentation

Overview

handle-connections.go contains connection handlers.

metadata listens on a TCP port waiting for metadata and writes it to a MariaDB database by the same name.

process-data.go processes the metadata retrieved in handleConnection().

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL