2014-01-24, 05:16
After fixing the issue with R950 and the missing JSON interface, found another issue with Frodo and some recordings not showing up in the library. The problem only occurred for shows that didn't have any episodes listed in TVDB, like a daily news show. I had this problem with CTV News.
When the library scan was running, this message showed up in the XBMC log file.
WARNING: No information found for item '/myth/recordings/Episodes/CTV News/', it won't be added to the library.
After looking into this, found that the NFO file created for the episode had a bad value. The first field needed to be episodedetails and not tvshow. Details on the layout for the episode nfo file are documented here.
http://wiki.xbmc.org/index.php?title=NFO...tvepisodes
This patch is for both issues.
To install this patch, just follow these steps
1) copy below to /tmp/mythicalLibrarian.patch
2) cd /usr/local/bin
3) sudo patch -l < /tmp/mythicalLibrarian.patch
4) output should be patching file mythicalLibrarian
When the library scan was running, this message showed up in the XBMC log file.
WARNING: No information found for item '/myth/recordings/Episodes/CTV News/', it won't be added to the library.
After looking into this, found that the NFO file created for the episode had a bad value. The first field needed to be episodedetails and not tvshow. Details on the layout for the episode nfo file are documented here.
http://wiki.xbmc.org/index.php?title=NFO...tvepisodes
This patch is for both issues.
To install this patch, just follow these steps
1) copy below to /tmp/mythicalLibrarian.patch
2) cd /usr/local/bin
3) sudo patch -l < /tmp/mythicalLibrarian.patch
4) output should be patching file mythicalLibrarian
PHP Code:
diff -tNaur orig/mythicalLibrarian fix/mythicalLibrarian
--- orig/mythicalLibrarian 2014-01-27 20:57:33.000000000 -0500
+++ fix/mythicalLibrarian 2014-01-27 20:03:54.000000000 -0500
@@ -401,9 +401,10 @@
for XBMCIP in ${XBMCIPs[@]}
do
echo "SENDING REQUESTED COMMANDS TO:$XBMCIP"
- test "$XBMCNotify" = "Enabled" && curl -L -s -m3 --connect-timeout 5 "http://"$XBMCIP"/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(mythical%20Librarian%2Cadding%20show%20$tvdbshowname%20to%20library))" > /dev/null 2>&1
- test "$XBMCUpdate" = "Enabled" && curl -L -s -m3 --connect-timeout 5 "http://"$XBMCIP"/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video))" > /dev/null 2>&1
- test "$XBMCClean" = "Enabled" && curl -L -s -m3 --connect-timeout 5 "http://"$XBMCIP"/xbmcCmds/xbmcHttp?command=ExecBuiltIn(CleanLibrary(video))" > /dev/null 2>&1
+ test "$XBMCNotify" = "Enabled" && curl -L -s -m3 --connect-timeout 5 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"mythical Librarian adding","message":"'$tvdbshowname'"},"id":1}' http://$XBMCIP/jsonrpc > /dev/null 2>&1
+ test "$XBMCNotify" = "Enabled" && curl -L -s -m3 --connect-timeout 5 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"VideoLibrary.Scan","id":1}' http://$XBMCIP/jsonrpc > /dev/null 2>&1
+ test "$XBMCNotify" = "Enabled" && curl -L -s -m3 --connect-timeout 5 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"VideoLibrary.Clean","id":1}' http://$XBMCIP/jsonrpc > /dev/null 2>&1
+
done
fi
return 0
@@ -1500,7 +1501,7 @@
#Create an NFO file based upon extracted information
GenerateEpisodeNFO () {
test -f "$MoveDir/$ShowFileName.nfo" && rm -f "$MoveDir/$ShowFileName.nfo"
- echo -e "<tvshow>">>"$MoveDir/$ShowFileName.nfo"
+ echo -e "<episodedetails>">>"$MoveDir/$ShowFileName.nfo"
if [ "$NamingConvention" = "" ] ; then
if [ "$GoForDoover" = "1" ]; then
@@ -1517,7 +1518,7 @@
echo -e " <genre>$ShowCategory</genre>">>"$MoveDir/$ShowFileName.nfo"
test "$HasSxxExx" = "1" && echo -e " <season>$Sxx</season>" >>"$MoveDir/$ShowFileName.nfo" || echo -e " <season>0</season>">>"$MoveDir/$ShowFileName.nfo"
test "$HasSxxExx" = "1" && echo -e " <episode>$Exx</episode>">>"$MoveDir/$ShowFileName.nfo" || echo -e " <episode>0</episode>">>"$MoveDir/$ShowFileName.nfo"
- echo -e "</tvshow>">>"$MoveDir/$ShowFileName.nfo"
+ echo -e "</episodedetails>">>"$MoveDir/$ShowFileName.nfo"
echo "'$MoveDir/$ShowFileName.nfo'" "'$MoveDir/$ShowFileName.$OriginalExt'">>"$mythicalLibrarian"/created.tracking
return 0
}
@@ -1805,10 +1806,10 @@
for XBMCIP in ${XBMCIPs[@]}
do
echo "SENDING REQUESTED COMMANDS TO:$XBMCIP"
- XBMCcomm=`curl -L -s --connect-timeout 3 "http://"$XBMCIP"/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(mythical%20Librarian%20Test%2CTesting%20Communication%20with%20mythicallibrarian))"|tr -d "</html>i^" `
+ XBMCcomm=`curl -L -s -m3 --connect-timeout 5 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"mythical Librarian Test","message":"'$PythonBindingsCheck'"},"id":1}' http://$XBMCIP/jsonrpc|tr -d "\"</html>i^" `
test "$XBMCcomm" != "" && echo "TESTING:$XBMCcomm" || echo "COMMUNICATIONS NOT ESTABLISHED: $XBMCIP"
done
- test "`echo $XBMCcomm`" = "OK" && XBMCcomm="***PASSED***" || XBMCcomm="***FAILED***"
+ test "`echo $XBMCcomm`" = "{d:1,jsonrpc:2.0,resu:OK}" && XBMCcomm="***PASSED***" || XBMCcomm="***FAILED***"
echo "XBMC Communications $XBMCcomm"
read -n1 -p "Press any key to test file system permissions..."
echo ""