Skip to Content
It is currently December 6th, 2019, 1:18 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: SAM hangs - one category
PostPosted: May 18th, 2018, 3:14 pm 
Offline
New User
New User

Joined: June 4th, 2017, 12:15 pm
Posts: 20
This one is killing me, hopefully someone out there has some sort of idea as to what's happening.

We are using a clockwheel-based rotation with several different categories. Each category corresponds to a different show; for instance, the "Eighties" category holds nothing but music from the 1980s. When it's time for that show, the event scheduler loads a clockwheel for it, the show plays, then afterwards the "normal" rotation clockwheel is loaded - things proceed as usual, with no issues.

We use the "Tracks" category in the absence of any specific show; the "normal" clockwheel chooses from that category. This has been working quite well for the life of this station (since August of 2017), and indeed for the station that came before it (which I inherited after it went off air in July 2016).

Things work great with the smaller categories (10,000 tracks at most) - but the "Tracks" category - which contains approximately 150,000 tracks - will run for a while, but eventually hangs up when trying to switch to a new song. This is confusing - if I replace all mentions of "Tracks" in the clockwheel with "Music (All)", things work just fine. I don't, however, want to use that category due to the fact that we run more than one 'podcast' type show which consist of lengthy files I don't want coming up in normal rotation.

Software/hardware specifics:

SAM 2017.11 (have tried it with all versions that are newer; this is the most stable one I have) on Windows 10
MySQL 5.7 - server running on different machine than SAM, Windows 7 - 2GB RAM. All that's running on the machine is the MySQL server and a Shoutcast v2 server (we host everything in-house).

If further information is needed about software/hardware specifics, please let me know. Just trying to make sure I describe all of the eels in my hovercraft. :)

Any ideas/suggestions/etc from those with far more experience with SAM than I would be very appreciated. Thanks in advance.

_________________
Cygnus
Owner/On-air host, Unhinged


Top
 Profile  
Reply with quote  
PostPosted: May 18th, 2018, 6:59 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7888
Location: Aachen (Germany)
Broken MySQL tables would be my first guess.
Are there any error reports in the Event Log window of SAM?

But if Music (All) works just fine and your only problem with that is the podcast shows, just assign a different songtype to the podcast shows. ("X - Other" for example). Afterwards your podcast shows will only show up in Other (All) and not in Music (All) because they're obviously not music but prerecorded shows and shouldn't be type S to begin with.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: May 19th, 2018, 11:35 am 
Offline
New User
New User

Joined: June 4th, 2017, 12:15 pm
Posts: 20
That makes a lot of sense, thanks. I will need to find in the PHP template where the now playing list shows only type S songs that are playing/have played and add type X to that.

As far as broken tables - I have been around and around with that. I had a task scheduled in Windows every 7 minutes that would check and repair the SAMDB tables, which worked fine but wreaked havoc on rotation rules. This was after taking all of the existing categories in the database I inherited and saving them all out to playlists. I then reconfigured SAM on an off machine to create a brand new database, to which I added the categories we had before and imported the playlists. I don't know what SAM does to make this happen, but there were a considerable number of errors that were fixed by myisamchk and mysqlchk after running for a scant few minutes.

In any case, changing the song types and continuing to use Music (All) will work very well as soon as I figure out where to add songtype=X to the list of files that will display on the web site.

Thanks, as always, for your help! :)

_________________
Cygnus
Owner/On-air host, Unhinged


Top
 Profile  
Reply with quote  
PostPosted: May 20th, 2018, 3:01 pm 
Offline
New User
New User

Joined: June 4th, 2017, 12:15 pm
Posts: 20
In code/classes/class.song.php I found this code at line 87:

Code:
->where('s.songtype = ?', 'S')  //Only return song of type S


I know what I have to add to the query that's being generated here to do what I want to do; just need to add an OR songtype = 'C' so that the podcast-type files (which I have set to songtype C) will show up in the Now Playing page. This exact query is what I need to generate:

SELECT s.*, h.listeners, h.requestID, h.date_played AS starttime, r.name AS dedicationName, r.msg AS dedicationMessage FROM songlist AS s INNER JOIN historylist AS h ON h.songID = s.ID LEFT JOIN requestlist AS r ON r.id = h.requestID WHERE ((s.songtype = 'S') OR (s.songtype = 'C')) ORDER BY h.date_played DESC LIMIT 6

This runs perfectly if I send it as a query using MySQL Workbench.

However, I will be the first to fess up to the fact that my PHP skills aren't the best. Within this code:

Code:
$select = $db->select()
                   ->from(array('s' => 'songlist'),
                        array('*'))
                   ->join(array('h' => 'historylist'),
                        'h.songID = s.ID',
                        array('listeners', 'requestID', 'starttime' => 'date_played'))
                   ->joinLeft(array('r' => 'requestlist'),
                        'r.id = h.requestID',
                        array('dedicationName' => 'name',
                             'dedicationMessage' => 'msg'))
                   ->where('s.songtype = ?', 'S')  //Only return song of type S
                   ->order('h.date_played DESC')
                   ->limit(HISTORY_COUNT + 1);


... what do I need to do to generate the query I show above to insure that songs with songtype = 'C' show up in my now playing page?

This is very much a learning experience for me. Thanks in advance. :)

EDIT 5/21/18: never mind; figured it out. :)

_________________
Cygnus
Owner/On-air host, Unhinged


Top
 Profile  
Reply with quote  
PostPosted: May 22nd, 2018, 2:20 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7888
Location: Aachen (Germany)
Code:
->where('s.songtype = ?', 'S')  //Only return song of type S

becomes:
Code:
->where('s.songtype = ?', 'S')  //Only return song of type S
->orWhere('s.songtype = ?', 'C')  //Or type C

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: May 22nd, 2018, 11:11 pm 
Offline
New User
New User

Joined: June 4th, 2017, 12:15 pm
Posts: 20
Thanks :) I fixed it with:

Code:
->where('s.songtype = "S" OR s.songtype = "C"')


Maybe not the best code, but hey, it works.

_________________
Cygnus
Owner/On-air host, Unhinged


Top
 Profile  
Reply with quote  
PostPosted: May 23rd, 2018, 6:31 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7888
Location: Aachen (Germany)
Yeah, that works as well. Just added one possible solution for future reference. (I hate it when threads with an obvious solution stay around without the solution actually being published)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group