Thanks for the screencast, if you can still recreate this problem, the most helpful thing to do would be provide a dump of the Airtime database so we can recreate your environment:
SET statement_timeout = 0;
SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
CREATE FUNCTION calculate_position() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
IF(TG_OP='INSERT') THEN
UPDATE cc_playlistcontents SET position = (position + 1)
WHERE (playlist_id = new.playlist_id AND position >= new.position AND id != new.id);
END IF;
IF(TG_OP='DELETE') THEN
UPDATE cc_playlistcontents SET position = (position - 1)
WHERE (playlist_id = old.playlist_id AND position > old.position);
END IF;
RETURN NULL;
END;
$$;
ALTER FUNCTION public.calculate_position() OWNER TO airtime;
CREATE TABLE cc_access (
id integer NOT NULL,
gunid character(32),
token bigint,
chsum character(32) DEFAULT ''::bpchar NOT NULL,
ext character varying(128) DEFAULT ''::character varying NOT NULL,
type character varying(20) DEFAULT ''::character varying NOT NULL,
parent bigint,
owner integer,
ts timestamp without time zone
);
CREATE TABLE cc_files (
id integer NOT NULL,
gunid character(32) NOT NULL,
name character varying(255) DEFAULT ''::character varying NOT NULL,
mime character varying(255) DEFAULT ''::character varying NOT NULL,
ftype character varying(128) DEFAULT ''::character varying NOT NULL,
filepath text DEFAULT ''::text,
state character varying(128) DEFAULT 'empty'::character varying NOT NULL,
currentlyaccessing integer DEFAULT 0 NOT NULL,
editedby integer,
mtime timestamp(6) without time zone,
md5 character(32),
track_title character varying(512),
artist_name character varying(512),
bit_rate character varying(32),
sample_rate character varying(32),
format character varying(128),
length time without time zone,
album_title character varying(512),
genre character varying(64),
comments text,
year character varying(16),
track_number integer,
channels integer,
url character varying(1024),
bpm character varying(,
rating character varying(,
encoded_by character varying(255),
disc_number character varying(,
mood character varying(64),
label character varying(512),
composer character varying(512),
encoder character varying(64),
checksum character varying(256),
lyrics text,
orchestra character varying(512),
conductor character varying(512),
lyricist character varying(512),
original_lyricist character varying(512),
radio_station_name character varying(512),
info_url character varying(512),
artist_url character varying(512),
audio_source_url character varying(512),
radio_station_url character varying(512),
buy_this_url character varying(512),
isrc_number character varying(512),
catalog_number character varying(512),
original_artist character varying(512),
copyright character varying(512),
report_datetime character varying(32),
report_location character varying(512),
report_organization character varying(512),
subject character varying(512),
contributor character varying(512),
language character varying(512)
);
CREATE TABLE cc_playlist (
id integer NOT NULL,
name character varying(255) DEFAULT ''::character varying NOT NULL,
state character varying(128) DEFAULT 'empty'::character varying NOT NULL,
currentlyaccessing integer DEFAULT 0 NOT NULL,
editedby integer,
mtime timestamp(6) without time zone,
creator character varying(32),
description character varying(512)
);
CREATE TABLE cc_playlistcontents (
id integer NOT NULL,
playlist_id integer,
file_id integer,
"position" integer,
cliplength time without time zone DEFAULT '00:00:00'::time without time zone,
cuein time without time zone DEFAULT '00:00:00'::time without time zone,
cueout time without time zone DEFAULT '00:00:00'::time without time zone,
fadein time without time zone DEFAULT '00:00:00'::time without time zone,
fadeout time without time zone DEFAULT '00:00:00'::time without time zone
);
ALTER TABLE public.cc_playlistcontents OWNER TO airtime;
CREATE VIEW cc_playlisttimes AS
SELECT pl.id, COALESCE(t.length, '00:00:00'::time without time zone) AS length FROM (cc_playlist pl LEFT JOIN (SELECT cc_playlistcontents.playlist_id AS id, (sum((cc_playlistcontents.cliplength)::interval))::time without time zone AS length FROM cc_playlistcontents GROUP BY cc_playlistcontents.playlist_id) t ON ((pl.id = t.id)));
ALTER TABLE public.cc_playlisttimes OWNER TO airtime;
CREATE TABLE cc_schedule (
id integer NOT NULL,
playlist_id integer,
starts timestamp without time zone NOT NULL,
ends timestamp without time zone NOT NULL,
group_id integer,
file_id integer,
clip_length time without time zone DEFAULT '00:00:00'::time without time zone,
fade_in time without time zone DEFAULT '00:00:00'::time without time zone,
fade_out time without time zone DEFAULT '00:00:00'::time without time zone,
cue_in time without time zone DEFAULT '00:00:00'::time without time zone,
cue_out time without time zone DEFAULT '00:00:00'::time without time zone,
schedule_group_played boolean DEFAULT false,
media_item_played boolean DEFAULT false,
instance_id integer NOT NULL
);
CREATE TABLE cc_show (
id integer NOT NULL,
name character varying(255) DEFAULT ''::character varying NOT NULL,
url character varying(255) DEFAULT ''::character varying,
genre character varying(255) DEFAULT ''::character varying,
description character varying(512),
color character varying(6),
background_color character varying(6)
);
CREATE TABLE cc_show_days (
id integer NOT NULL,
first_show date NOT NULL,
last_show date,
start_time time without time zone NOT NULL,
duration character varying(255) NOT NULL,
day smallint,
repeat_type smallint NOT NULL,
next_pop_date date,
show_id integer NOT NULL,
record smallint DEFAULT 0
);
CREATE TABLE cc_show_instances (
id integer NOT NULL,
starts timestamp without time zone NOT NULL,
ends timestamp without time zone NOT NULL,
show_id integer NOT NULL,
record smallint DEFAULT 0,
rebroadcast smallint DEFAULT 0,
instance_id integer,
file_id integer,
soundcloud_id integer,
time_filled time without time zone
);
ALTER TABLE public.cc_show_instances OWNER TO airtime;
CREATE TABLE cc_show_rebroadcast (
id integer NOT NULL,
day_offset character varying(255) NOT NULL,
start_time time without time zone NOT NULL,
show_id integer NOT NULL
);
ALTER TABLE public.cc_show_rebroadcast OWNER TO airtime;
CREATE TABLE cc_subjs (
id integer NOT NULL,
login character varying(255) DEFAULT ''::character varying NOT NULL,
pass character varying(255) DEFAULT ''::character varying NOT NULL,
type character(1) DEFAULT 'U'::bpchar NOT NULL,
first_name character varying(255) DEFAULT ''::character varying NOT NULL,
last_name character varying(255) DEFAULT ''::character varying NOT NULL,
lastlogin timestamp without time zone,
lastfail timestamp without time zone,
skype_contact character varying(255),
jabber_contact character varying(255),
email character varying(255)
);
ALTER TABLE ONLY cc_show_instances
ADD CONSTRAINT cc_original_show_instance_fkey FOREIGN KEY (instance_id) REFERENCES cc_show_instances(id) ON DELETE CASCADE;
ALTER TABLE ONLY cc_playlistcontents
ADD CONSTRAINT cc_playlistcontents_playlist_id_fkey FOREIGN KEY (playlist_id) REFERENCES cc_playlist(id) ON DELETE CASCADE;
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
Also of note - when I click [Add This Show] once it does not take ... it acts as if it is going to save the show on the second click by doesn't create the program in the calendar.
Hey, most likely the reason for this behaviour is that your session expired and you needed to login in again to Airtime if you had stepped away from your computer. We don't have a good way of informing the user they have been logged out of the app if only an ajax request is made. If you use firebug or something similar you might see a 401 response when you were trying to add more shows later.
> **
> Hi Naomi,
>
> That doesn't appear to be the issue - I reboot the server, cleared my
> sessions in browser, and tried again.
>
> This short screencast illustrates the behavior:
>
> http://screencast.com/t/bqauJsKmKh
>
>
>