Kodi Community Forum
Release TvTunes Addon - Retrieve & Play Soundtracks Whilst Browsing Your Library - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: Release TvTunes Addon - Retrieve & Play Soundtracks Whilst Browsing Your Library (/showthread.php?tid=173799)



RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - mikebzh44 - 2013-10-10

Oops, didn't have look into settings Big Grin


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - robwebset - 2013-10-11

Hi All,

I believe I have now fixed/implemented the final outstanding request, the latest version now supports playing movie set themes when there is a custom path configured.

I have created a zip and have made it available via the repo:

http://robwebset.googlecode.com/svn/releases/repository.robwebset/repository.robwebset-1.0.0.zip

So, the latest published version is 3.1.5

Due to the large volume of logging now in TvTunes, I have set a config option to enable it - it still requires global logging to be set, but should stop TvTunes logging filling up the log if you are investigating a different issue.

The settings screen is now very busy - but I wanted to keep it to only 4 tabs, I suppose it is quite rare that you view that screen anyway.

Please let me know if you see any problems or have any further suggestions.

Rob


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - mikebzh44 - 2013-10-11

Hi Rob.

First, I have fully translate this addon on Transiflex but, there is 2 new strings unknown so here is translations to put into strings.po until you add it on Transiflex:

Code:
msgctxt "#32016"
msgid "Play themes when browsing Movie list"
msgstr "Lire les thèmes durant la navigation dans la liste des films"

msgctxt "#32017"
msgid "Play themes when browsing TV Show list"
msgstr "Lire les thèmes durant la navigation dans la liste des séries TV"

And there is 2 more unknown strings :

Debug
Turn on logging

but I think that you can use default XBMC ones :

ID 14092 "Debugging"
ID 20191 "Enable debug logging"

So in settings.xml :

Code:
<category label="32993">
    <setting id="smb_share" type="bool" label="32003" default="false"/>
    <setting id="smb_login" enable="eq(-1,true)" type="text" label="32004" default="" />
    <setting id="smb_psw" enable="eq(-2,true)" type="text" option="hidden" label="32005" default="" />
    <setting id="custom_path_enable" type="bool" label="32006" default="false"/>
    <setting id="custom_path" enable="eq(-1,true)" type="folder" source="files" label="32007" default="" />
    <setting label="14092" type="lsep"/>
    <setting id="logEnabled" type="bool" label="20191" default="false"/>
</category>

And I have test this 3.1.5 release and found some "issues" :

- when browsing seasons and press i to display info screen, theme is stopped :

Image

but when pressing i when browsing episodes, theme continue to play :

Image

- when browsing moviesets with movies grouped, and enter the movieset to display movies, theme stop and restart :

Image

Thanks.


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - robwebset - 2013-10-11

(2013-10-11, 10:50)mikebzh44 Wrote: And there is 2 more unknown strings :

Debug
Turn on logging

but I think that you can use default XBMC ones :

ID 14092 "Debugging"
ID 20191 "Enable debug logging"

So in settings.xml :

Code:
<category label="32993">
    <setting id="smb_share" type="bool" label="32003" default="false"/>
    <setting id="smb_login" enable="eq(-1,true)" type="text" label="32004" default="" />
    <setting id="smb_psw" enable="eq(-2,true)" type="text" option="hidden" label="32005" default="" />
    <setting id="custom_path_enable" type="bool" label="32006" default="false"/>
    <setting id="custom_path" enable="eq(-1,true)" type="folder" source="files" label="32007" default="" />
    <setting label="14092" type="lsep"/>
    <setting id="logEnabled" type="bool" label="20191" default="false"/>
</category>

Thanks for doing the translations - I tried changing the IDs for the other fields - however when I do that I don't get any text in the settings dialog - is there anything else I have to change other than the settings.xml?

(2013-10-11, 10:50)mikebzh44 Wrote: And I have test this 3.1.5 release and found some "issues" :

- when browsing seasons and press i to display info screen, theme is stopped :

I have just committed a change that should fix that one

(2013-10-11, 10:50)mikebzh44 Wrote: - when browsing moviesets with movies grouped, and enter the movieset to display movies, theme stop and restart :

I believe that is due to it starting to play for the movie set (Playing the themes from all the movies in the set in a random order), then it will do one of two things:
1) select the ... option to go back a directory (i.e. no movie selected) - so it will stop playing
2) A new movie is selected, so will load the themes for that movie (This will be a subset of the existing playlist, as instead of all the themes from all the movies in the set, it will only have the themes from the selected movie) - this means that it is possible to get the same track selected to play - but will not always be the case.

Hope this helps

Rob


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - mikebzh44 - 2013-10-11

(2013-10-11, 15:24)rob_webset Wrote:
(2013-10-11, 10:50)mikebzh44 Wrote: And there is 2 more unknown strings :

Debug
Turn on logging

but I think that you can use default XBMC ones :

ID 14092 "Debugging"
ID 20191 "Enable debug logging"

So in settings.xml :

Code:
<category label="32993">
    <setting id="smb_share" type="bool" label="32003" default="false"/>
    <setting id="smb_login" enable="eq(-1,true)" type="text" label="32004" default="" />
    <setting id="smb_psw" enable="eq(-2,true)" type="text" option="hidden" label="32005" default="" />
    <setting id="custom_path_enable" type="bool" label="32006" default="false"/>
    <setting id="custom_path" enable="eq(-1,true)" type="folder" source="files" label="32007" default="" />
    <setting label="14092" type="lsep"/>
    <setting id="logEnabled" type="bool" label="20191" default="false"/>
</category>

Thanks for doing the translations - I tried changing the IDs for the other fields - however when I do that I don't get any text in the settings dialog - is there anything else I have to change other than the settings.xml?

Oops, I have changed this IDs without testing and get the same issue. Don't know how to use default strings in settings.xml but I hope this is possible so you don't have to create and translate strings already available in strings.xml or strings.po from XBMC core.

Question submitted : http://forum.xbmc.org/showthread.php?tid=175484

Quote:
(2013-10-11, 10:50)mikebzh44 Wrote: And I have test this 3.1.5 release and found some "issues" :

- when browsing seasons and press i to display info screen, theme is stopped :

I have just committed a change that should fix that one

(2013-10-11, 10:50)mikebzh44 Wrote: - when browsing moviesets with movies grouped, and enter the movieset to display movies, theme stop and restart :

I believe that is due to it starting to play for the movie set (Playing the themes from all the movies in the set in a random order), then it will do one of two things:
1) select the ... option to go back a directory (i.e. no movie selected) - so it will stop playing
2) A new movie is selected, so will load the themes for that movie (This will be a subset of the existing playlist, as instead of all the themes from all the movies in the set, it will only have the themes from the selected movie) - this means that it is possible to get the same track selected to play - but will not always be the case.

Hope this helps

Rob

OK, I will use your latest files and make some more tests.


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - mikebzh44 - 2013-10-11

(2013-10-11, 15:24)rob_webset Wrote:
(2013-10-11, 10:50)mikebzh44 Wrote: And I have test this 3.1.5 release and found some "issues" :

- when browsing seasons and press i to display info screen, theme is stopped :

I have just committed a change that should fix that one

Work great with latest tvtunes_backend.py file.

Quote:
(2013-10-11, 10:50)mikebzh44 Wrote: - when browsing moviesets with movies grouped, and enter the movieset to display movies, theme stop and restart :

I believe that is due to it starting to play for the movie set (Playing the themes from all the movies in the set in a random order), then it will do one of two things:
1) select the ... option to go back a directory (i.e. no movie selected) - so it will stop playing
2) A new movie is selected, so will load the themes for that movie (This will be a subset of the existing playlist, as instead of all the themes from all the movies in the set, it will only have the themes from the selected movie) - this means that it is possible to get the same track selected to play - but will not always be the case.

Hope this helps

Rob
I understand your explanation but only in case of each movie inside a movieset get is own theme :

C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 1.mkv
C:\Movies\Back To The Future\Back To The Future 1\theme.mp3
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 2.mkv
C:\Movies\Back To The Future\Back To The Future 1\theme.mp3
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 3.mkv
C:\Movies\Back To The Future\Back To The Future 1\theme.mp3

So, when browsing my library with movies grouped into moviesets, TVTunes will build a playlist with those 3 theme.mp3 randomly and play it.

But for people who use only one theme for the movieset :

C:\Movies\Back To The Future\theme.mp3
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 1.mkv
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 2.mkv
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 3.mkv

The script should find only 1 theme to play and start to play it. When enter movieset, script will look for a theme in movie folder, won't find one, move to parent folder, find one compare to actual theme played, paths are equals so don't stop playing it.


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - mikebzh44 - 2013-10-11

After enabling debug log for addon and XBMC, there is a lot of JSON query and function called to find theme :

http://xbmclogs.com/show.php?id=68360

Is it normal to make such JSON query (20 times) ?

Code:
DEBUG: script.tvtunes: TunesBackend: themePath = videodb://1/7/7/?setid=7
DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetMovieSetDetails", "params": {"setid": 7, "properties": [ "thumbnail" ], "movies": { "properties":  [ "file", "title"], "sort": { "order": "ascending",  "method": "title" }} },"id": 1 }
DEBUG: JSONRPC: Calling videolibrary.getmoviesetdetails
DEBUG: CGUIMediaWindow::GetDirectory (videodb://1/7/7/?setid=7)
DEBUG:   ParentPath = [videodb://1/2/]

And this message is listed 36 times :

Code:
DEBUG: script.tvtunes: TunesBackend: themePath = C:\Videos\Films\Retour Vers Le Futur\Retour Vers Le Futur 1\
DEBUG: script.tvtunes: Searching C:\Videos\Films\Retour Vers Le Futur\Retour Vers Le Futur 1 for (theme[ _A-Za-z0-9.-]*.(mp3|m4a|wav)$)
DEBUG: script.tvtunes: Searching C:\Videos\Films\Retour Vers Le Futur for (theme[ _A-Za-z0-9.-]*.(mp3|m4a|wav)$)
DEBUG: script.tvtunes: ThemeFiles: Found match: C:\Videos\Films\Retour Vers Le Futur\theme.mp3
DEBUG: script.tvtunes: ThemeFiles: Playlist size = 1
DEBUG: script.tvtunes: ThemeFiles: Working Path = C:\Videos\Films\Retour Vers Le Futur



RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - robwebset - 2013-10-11

(2013-10-11, 16:16)mikebzh44 Wrote: But for people who use only one theme for the movieset :

C:\Movies\Back To The Future\theme.mp3
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 1.mkv
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 2.mkv
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 3.mkv

The script should find only 1 theme to play and start to play it. When enter movieset, script will look for a theme in movie folder, won't find one, move to parent folder, find one compare to actual theme played, paths are equals so don't stop playing it.

I think, in this case you are hitting case (1) mentioned previously - when you are going into the movieset, you are not actually having a movie selected. (So no movie selected == stop playing)

(2013-10-11, 16:48)mikebzh44 Wrote: After enabling debug log for addon and XBMC, there is a lot of JSON query and function called to find theme :

http://xbmclogs.com/show.php?id=68360

Is it normal to make such JSON query (20 times) ?

Afraid so, TvTunes has always done a loop waiting for a change - you just see it more now as there is more logging - also I have had to change the key used for a change from "the path last looked at" to the "theme last played" - it was really the only way to get it to work correctly with the Movie and TV Show Lists :-(


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - mikebzh44 - 2013-10-11

(2013-10-11, 17:13)rob_webset Wrote:
(2013-10-11, 16:16)mikebzh44 Wrote: But for people who use only one theme for the movieset :

C:\Movies\Back To The Future\theme.mp3
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 1.mkv
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 2.mkv
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 3.mkv

The script should find only 1 theme to play and start to play it. When enter movieset, script will look for a theme in movie folder, won't find one, move to parent folder, find one compare to actual theme played, paths are equals so don't stop playing it.

I think, in this case you are hitting case (1) mentioned previously - when you are going into the movieset, you are not actually having a movie selected. (So no movie selected == stop playing)

No, I don't have item .. for movie to parent folder :

Image

Image

So when entering movieset, first movie is automatically selected.


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - robwebset - 2013-10-11

(2013-09-27, 13:51)Deano316 Wrote: Given the changes a test and the only lingering problem I can see so far is that to get tunes to play for movies I have to play an extra first, stop it, then the theme will start and will work for all movies until I exit to the main menu. If more than one theme is present for each movie, one is randomly played which works excellent. The only thing as far as that is concerned is getting the random start point added, which is I had already added a request for. I'm sure it will be addressed in due course. TV themes seem to work fine on their own and in conjunction with the extras add-on.

I'm currently using the latest stable versions of XBMC and Aeon Nox on Win7, so I can only comment on how they are working based on that setup. Great work bro, looking forward to future updates. Wink

Hi Deano316,

I have now spotted what I think your problem is with this one. I think it is because you have the incorrect onLoad command at the top of MyVideoNav.xml

It should be:

Code:
<onload condition="System.HasAddon(script.tvtunes)">RunScript(script.tvtunes,backend=True)</onload>

The default has a TV only restriction in it

Rob


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - Deano316 - 2013-10-12

That's got it working! Had just put that down to my troublesome pc, kudos Big Grin I've given the latest TVTunes a test and I'm still hearing the problem with the random start point. It sounds like TVTunes is fading a track in from the start and then jumping to a random point and in doing so cutting off the fade in half way through. Just passing on my observation so all the kinks can get ironed out of this add-on Wink Do you want me to add it as an issue?

I also noticed that if you let a theme play through it fades out midway and then no more themes will start until you exit and enter the section.


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - robwebset - 2013-10-12

(2013-10-12, 05:23)Deano316 Wrote: I've given the latest TVTunes a test and I'm still hearing the problem with the random start point. It sounds like TVTunes is fading a track in from the start and then jumping to a random point and in doing so cutting off the fade in half way through. Just passing on my observation so all the kinks can get ironed out of this add-on Wink Do you want me to add it as an issue?

OK - found that problem, it was waiting until it was fully playing until it was doing the seek.

(2013-10-11, 16:16)mikebzh44 Wrote: But for people who use only one theme for the movieset :

C:\Movies\Back To The Future\theme.mp3
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 1.mkv
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 2.mkv
C:\Movies\Back To The Future\Back To The Future 1\Back To The Future 3.mkv

The script should find only 1 theme to play and start to play it. When enter movieset, script will look for a theme in movie folder, won't find one, move to parent folder, find one compare to actual theme played, paths are equals so don't stop playing it.

Managed to reproduce this now and fixed it.

I have created a new zip at version 3.1.6:

http://robwebset.googlecode.com/svn/releases/script.tvtunes/script.tvtunes-3.1.6.zip

Includes the fixes:

Code:
v3.1.6
- Fixed theme stopping on movie info screen
- Fixed restarting theme when going into movie set
- Fixed random start location delay

Let me know if there is anything else I have missed.

Thanks, Rob


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - robwebset - 2013-10-12

(2013-10-12, 05:23)Deano316 Wrote: I also noticed that if you let a theme play through it fades out midway and then no more themes will start until you exit and enter the section.

Only thing I can think of, is check that your screensaver is not set for a short time -

see known issue:

http://wiki.xbmc.org/index.php?title=Add-on:TvTunes


RE: - TTLucian - 2013-10-12

Hello! I have a problem with the TvTunes addon. When downloading theme songs, on the dialog which asks if you would like to download the selected theme, the addon would play the song (kinda like a preview). I installed the latest version from GIT and now that functionality is gone. The songs don't play anymore. Was it removed or there's something wrong with my setup?
Thanks!


RE: [RELEASE] TvTunes Addon - TV Show Theme Music while browsing - Deano316 - 2013-10-12

(2013-10-12, 13:06)rob_webset Wrote:
(2013-10-12, 05:23)Deano316 Wrote: I also noticed that if you let a theme play through it fades out midway and then no more themes will start until you exit and enter the section.

Only thing I can think of, is check that your screensaver is not set for a short time -

see known issue:

http://wiki.xbmc.org/index.php?title=Add-on:TvTunes

Haven't checked on the screensaver yet, but everything else seems to be working fine. Great work Wink