I installed this on my windows machine, and PlexWatchWeb seems to basically work as advertised now. Thanks!
I did find a bit of an issue with PlexWatch or PlexWatchWeb (my thinking is maybe plexWatch should handle this issue, but what do I know? lol...). I added a few videos today to a section, and then decided to move them to a different PMS section, obviously deleting them from the initial section. This caused all kinds of errors on the plexWatchWeb Home page where it displays new content. Basically the errors were stating they couldn't find the metadata for the shows, which is correct, because those shows don't exist anymore. Just thought I'd mention it.
Here's the errors received from plexWatchWeb...
Glad to hear you got things working. :)
I have recently experienced this problem too. plexWatch creates new entries in the "recently_added" table in the database but it does not continuously check for changes made afterwards in your PMS db. I see no reason to have ljunkie change this when I can pull all recently added data from PMS itself. It's on my list to fix for the next version of plexWatch/Web. Thanks for the feedback.
I have recently experienced this problem too. plexWatch creates new entries in the "recently_added" table in the database but it does not continuously check for changes made afterwards in your PMS db. I see no reason to have ljunkie change this when I can pull all recently added data from PMS itself. It's on my list to fix for the next version of plexWatch/Web. Thanks for the feedback.
Yep, the DB for this is just so I don't re-send a notification :) Pulling recently added content would be better from the PMS api.
Finally got this working, although I´m getting some errors on the index site. Under recently Added I get the newly added media, but also these:
Warning: simplexml_load_file(http://192.168.1.50:32400/library/metadata/14635): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in C:\xampp\htdocs\plexWatchWeb\index.php on line 154
Notice: Trying to get property of non-object in C:\xampp\htdocs\plexWatchWeb\index.php on line 156
Notice: Trying to get property of non-object in C:\xampp\htdocs\plexWatchWeb\index.php on line 180
Warning: simplexml_load_file(http://192.168.1.50:32400/library/metadata/14634): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in C:\xampp\htdocs\plexWatchWeb\index.php on line 154
Notice: Trying to get property of non-object in C:\xampp\htdocs\plexWatchWeb\index.php on line 156
Ideas?
EDIT: Found it, it's trying to retrieve metadata from a file ID that doesn't exist. The strange thing is I never changed the metadata since this file was detected, but I did change the metadata of other recent files. Wierd. I guess this wont happen when it will look at the PMS DB itself for recenty added :)
This looks really good. Here's a couple of issues i've found so far:
1. On the History page i was getting "Divide by zero" errors due to line 163 in history.php. It looks to happen when the $duration is zero. I fixed it by changing
2. On the main page it says no one is currently streaming (which is correct) but on the history page it says someone is currently watching a movie. Fixed
3. IPAddress is n/a on the history tab
4. The time is incorrect. I just started playing a video at 7:31pm and the history page says it was started at 4:31AM. Looks to be a timezone problem
5. On the main page under Current Activity, when a movie is playing via Direct Play, the info dropdown says Direct Stream. Looking at the code in current_activity.php line 95, you are really only checking whether the key "TranscodeSession" exists. If it doesn't exist, it should say Direct Play, not Direct Stream. Direct Stream is when the audio and video is not transcoded but remuxed into a different format that the client can play.
6. When i click on either the movie currently playing from the main page or a movie title from the history page, it takes me to a info page. The first time this page loads, the artwork for the movie or show is sized incorrectly. It is only about 6 pixels wide. If i reload the page, then the artwork loads correctly. This appears to be just an issue with Safari as on Chrome on OSX it loads correctly. The easy way to fix this is change the css for .summary-content-poster to include the width and height:
4. The time is incorrect. I just started playing a video at 7:31pm and the history page says it was started at 4:31AM. Looks to be a timezone problem
I was just coming here to report the same issue. I was wondering if maybe a manual Time Zone offset could be added to the config file, or somehow make it use system time? Or something like that. But it seems like its set to UTC currently, and not local time.
This looks really good. Here's a couple of issues i've found so far:
1. On the History page i was getting "Divide by zero" errors due to line 163 in history.php. It looks to happen when the $duration is zero. I fixed it by changing
2. On the main page it says no one is currently streaming (which is correct) but on the history page it says someone is currently watching a movie. Fixed
3. IPAddress is n/a on the history tab
4. The time is incorrect. I just started playing a video at 7:31pm and the history page says it was started at 4:31AM. Looks to be a timezone problem
5. On the main page under Current Activity, when a movie is playing via Direct Play, the info dropdown says Direct Stream. Looking at the code in current_activity.php line 95, you are really only checking whether the key "TranscodeSession" exists. If it doesn't exist, it should say Direct Play, not Direct Stream. Direct Stream is when the audio and video is not transcoded but remuxed into a different format that the client can play.
6. When i click on either the movie currently playing from the main page or a movie title from the history page, it takes me to a info page. The first time this page loads, the artwork for the movie or show is sized incorrectly. It is only about 6 pixels wide. If i reload the page, then the artwork loads correctly. This appears to be just an issue with Safari as on Chrome on OSX it loads correctly. The easy way to fix this is change the css for .summary-content-poster to include the width and height:
Thanks for the feedback and fixes. I will add them to the next commit.
For item 3, do you have IP Address tracking setup and working properly in plexWatch? The only time the IP Address field will show "n/a" is if the table entry result for that row is empty. Also, if your database has been running for awhile, the IP Address feature was added later on in plexWatch so older entries will be empty.
For item 4, I am checking the web server's timezone and setting it for each page so make sure you have the correct timezone set for your server.
I was just coming here to report the same issue. I was wondering if maybe a manual Time Zone offset could be added to the config file, or somehow make it use system time? Or something like that. But it seems like its set to UTC currently, and not local time.
Nope, I had this issue come up from an early tester and resolved it by running a check for the web server's timezone and setting it from there so ensure your server is set to your current timezone.
Found a couple other issues on the user profile pages. In the cases where a user doesn't have any history for the current day or week, the $userStatsDailyTimeViewedTimeRowLength and $userStatsWeeklyTimeViewedTimeRowLength are uninitialized because no rows are returned in the SQL query. Here's the fixes:
In user.php, line 197 change:
if ($userStatsDailyTimeViewedTimeRowLength == 10) {
echo "";
to
if (empty($userStatsDailyTimeViewedTimeRowLength)){
echo "
/
0
mins
";
}else if ($userStatsDailyTimeViewedTimeRowLength == 10) {
echo "";
The same changes are needed for $userStatsWeeklyTimeViewedTimeRowLength on line 236, $userStatsMonthlyTimeViewedTimeRowLength on line 273 and $userStatsAlltimeTimeViewedTimeRowLength on 310
Nope, I had this issue come up from an early tester and resolved it by running a check for the web server's timezone and setting it from there so ensure your server is set to your current timezone.
On the info pages, if the media doesn't have genre, actor or writers, you get php errors about invalid variables. I added some checking to make sure they exist and display only if the metadata is available. In info.php starting on line 420 i changed your code to the following:
$genreCount = 0;
foreach($xml->Video->Genre as $xmlGenres) {
$genres[] = "" .$xmlGenres['tag']. "";
if (++$genreCount == 4) break;
}
if ($genreCount != 0){
echo "
Genres
";
echo implode('
', $genres);
echo "
";
}
$roleCount = 0;
foreach($xml->Video->Role as $Roles) {
$actors[] = “” .$Roles[‘tag’]. “”;
if (++$roleCount == 4) break;
}
if ($roleCount != 0) {
echo “
Starring
”;
echo implode(’
’, $actors);
echo “
”;
}
$writerCount = 0;
foreach($xml->Video->Writer as $xmlWriters) {
$writers[] = “” .$xmlWriters[‘tag’]. “”;
if (++$writerCount == 4) break;
}
if ($writerCount != 0) {
echo “
Written by
”;
echo implode(’
’, $writers);
echo “
”;
}
Sorry for all the inline fixes. Maybe i'll finally learn how to use github correctly and fork your project
Also, to clarify, I am opening a web browser on the host windows 7 pc to see the plexWatchweb which is hosted on a VM.
If I edit the above referenced url and change the 198.168.1.89 to 127.0.0.1 the url will return an image correctly
Edit: I was able to fix the image problem. It was related to having the "require users to authenticate" selected in the PMS settings.
When that is selected I had to add my windows 7 box IP address as well as the address on the VM. For the Windows 7 box 127.0.0.1 wasn't enough. I had to add 192.168.1.89 to make it work.
The history page still does not showing though.
I can though see the history of the currently playing movie when I click on that movie