Unable to open Play

Discuss Play, an open source multi-format audio player.
Post Reply
User avatar
phule
Posts: 46
Joined: Sat Feb 25, 2006 8:26 pm

Unable to open Play

Post by phule » Fri Dec 26, 2008 4:51 pm

I'm unable to open Play, both 0.3 and the latest unstable release. I get the same error message for each version.

"The SQL statement for "upgrade_database_for_cue_sheets" could not be prepared. The SQLite error was: no such column: last_skipped_date"

Any ideas how I can correct this? I'm using a 1.25 GHz PowerMac G4 & OS X 10.4.11
Last edited by phule on Wed Mar 04, 2009 7:13 pm, edited 1 time in total.
Bob

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Unable to open Play

Post by sbooth » Fri Dec 26, 2008 6:56 pm

That is strange- the column name should be last_skipped_date (note the underscore before date). If you open the file "Play.app/Contents/Resources /upgrade_database_for_cue_sheets.sql", does it look like the following (specifically the column names)?

Code: Select all

-- Ensure atomicity of this script
BEGIN TRANSACTION;

-- Rename the streams table, for later use
ALTER TABLE 'streams' RENAME TO 'streams_backup';

-- Create the new streams table
CREATE TABLE 'streams'  (
	'id'						INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
	'url'						TEXT NOT NULL,
	'starting_frame'			INTEGER NOT NULL DEFAULT -1,
	'frame_count'				INTEGER NOT NULL DEFAULT -1,

	'date_added'				REAL,
	'first_played_date'			REAL,
	'last_played_date'			REAL,
	'last_skipped_date'			REAL,
	'play_count'				INTEGER DEFAULT 0,
	'skip_count'				INTEGER DEFAULT 0,
	'rating'					INTEGER,

	'title'						TEXT,
	'album_title'				TEXT,
	'artist'					TEXT,
	'album_artist'				TEXT,
	'genre'						TEXT,
	'composer'					TEXT,
	'date'						TEXT,
	'compilation'				INTEGER,
	'track_number'				INTEGER,
	'track_total'				INTEGER,
	'disc_number'				INTEGER,
	'disc_total'				INTEGER,
	'comment'					TEXT,
	'isrc'						TEXT,
	'mcn'						TEXT,
	'bpm'						INTEGER,

	'musicdns_puid'				TEXT,
	'musicbrainz_id'			TEXT,

	'reference_loudness'		REAL,
	'track_replay_gain'			REAL,
	'track_peak'				REAL,
	'album_replay_gain'			REAL,
	'album_peak'				REAL,
	
	'file_type'					TEXT,
	'data_format'				TEXT,
	'format_description'		TEXT,
	'bits_per_channel'			INTEGER,
	'channels_per_frame'		INTEGER,
	'sample_rate'				REAL,
	'total_frames'				INTEGER,
	'bitrate'					REAL,
	
	UNIQUE (url, starting_frame, frame_count)
);

-- Copy the old data into the new table
INSERT INTO 'streams' (
		id, 
		url,
		
		date_added,
		first_played_date,
		last_played_date,
		last_skipped_date,
		play_count,
		skip_count,
		rating,
		
		title, 
		album_title,
		artist, 
		album_artist,
		genre,
		composer,
		date,
		compilation,
		track_number,
		track_total,
		disc_number,
		disc_total,
		comment,
		isrc,
		mcn,
		bpm,

		musicdns_puid,
		musicbrainz_id,
		
		reference_loudness,
		track_replay_gain,
		track_peak,
		album_replay_gain,
		album_peak,
				
		file_type,
		data_format,
		format_description,
		bits_per_channel,
		channels_per_frame,
		sample_rate,
		total_frames,
		bitrate
		)
	SELECT 		
		id, 
		url,
		
		date_added,
		first_played_date,
		last_played_date,
		last_skipped_date,
		play_count,
		skip_count,
		rating,
		
		title, 
		album_title,
		artist, 
		album_artist,
		genre,
		composer,
		date,
		compilation,
		track_number,
		track_total,
		disc_number,
		disc_total,
		comment,
		isrc,
		mcn,
		bpm,

		musicdns_puid,
		musicbrainz_id,
		
		reference_loudness,
		track_replay_gain,
		track_peak,
		album_replay_gain,
		album_peak,
				
		file_type,
		data_format,
		format_description,
		bits_per_channel,
		channels_per_frame,
		sample_rate,
		total_frames,
		bitrate
	FROM 'streams_backup';

-- Delete the old table
DROP TABLE 'streams_backup';

-- Finito
COMMIT;

User avatar
phule
Posts: 46
Joined: Sat Feb 25, 2006 8:26 pm

Re: Unable to open Play

Post by phule » Fri Dec 26, 2008 7:49 pm

[quote="sbooth"]That is strange- the column name should be last_skipped_date (note the underscore before date). If you open the file "Play.app/Contents/Resources /upgrade_database_for_cue_sheets.sql", does it look like the following (specifically the column names)?

This is very strange as everything appears alright. Following is the code.

-- Ensure atomicity of this script
BEGIN TRANSACTION;

-- Rename the streams table, for later use
ALTER TABLE 'streams' RENAME TO 'streams_backup';

-- Create the new streams table
CREATE TABLE 'streams' (
'id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
'url' TEXT NOT NULL,
'starting_frame' INTEGER NOT NULL DEFAULT -1,
'frame_count' INTEGER NOT NULL DEFAULT -1,

'date_added' REAL,
'first_played_date' REAL,
'last_played_date' REAL,
'last_skipped_date' REAL,
'play_count' INTEGER DEFAULT 0,
'skip_count' INTEGER DEFAULT 0,
'rating' INTEGER,

'title' TEXT,
'album_title' TEXT,
'artist' TEXT,
'album_artist' TEXT,
'genre' TEXT,
'composer' TEXT,
'date' TEXT,
'compilation' INTEGER,
'track_number' INTEGER,
'track_total' INTEGER,
'disc_number' INTEGER,
'disc_total' INTEGER,
'comment' TEXT,
'isrc' TEXT,
'mcn' TEXT,
'bpm' INTEGER,

'musicdns_puid' TEXT,
'musicbrainz_id' TEXT,

'reference_loudness' REAL,
'track_replay_gain' REAL,
'track_peak' REAL,
'album_replay_gain' REAL,
'album_peak' REAL,

'file_type' TEXT,
'data_format' TEXT,
'format_description' TEXT,
'bits_per_channel' INTEGER,
'channels_per_frame' INTEGER,
'sample_rate' REAL,
'total_frames' INTEGER,
'bitrate' REAL,

UNIQUE (url, starting_frame, frame_count)
);

-- Copy the old data into the new table
INSERT INTO 'streams' (
id,
url,

date_added,
first_played_date,
last_played_date,
last_skipped_date,
play_count,
skip_count,
rating,

title,
album_title,
artist,
album_artist,
genre,
composer,
date,
compilation,
track_number,
track_total,
disc_number,
disc_total,
comment,
isrc,
mcn,
bpm,

musicdns_puid,
musicbrainz_id,

reference_loudness,
track_replay_gain,
track_peak,
album_replay_gain,
album_peak,

file_type,
data_format,
format_description,
bits_per_channel,
channels_per_frame,
sample_rate,
total_frames,
bitrate
)
SELECT
id,
url,

date_added,
first_played_date,
last_played_date,
last_skipped_date,
play_count,
skip_count,
rating,

title,
album_title,
artist,
album_artist,
genre,
composer,
date,
compilation,
track_number,
track_total,
disc_number,
disc_total,
comment,
isrc,
mcn,
bpm,

musicdns_puid,
musicbrainz_id,

reference_loudness,
track_replay_gain,
track_peak,
album_replay_gain,
album_peak,

file_type,
data_format,
format_description,
bits_per_channel,
channels_per_frame,
sample_rate,
total_frames,
bitrate
FROM 'streams_backup';

-- Delete the old table
DROP TABLE 'streams_backup';

-- Finito
COMMIT;
Bob

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests