Release TvTunes alternative for playing soundtracks when browsing
#31
First post updated to prevent error messages when browsing online video streams. See Edit 3 at the bottom...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#32
All was working good but now Kodi crash when I enter in libraries and select an item with no theme.mp3 file. When I disable this option all is working good.
 Estuary MOD V2 
Reply
#33
@Guilouz 

I have just checked your mod v2.9.9 with the latest nightly (24/05) and there's no problem for me (windows 64 bits). However I have noticed that the former visual glitch reappears when no theme.mp3 is present; to prevent this you could change the line in DialogBusy.xml from...
xml:
<onload condition="String.Contains(Player.Filenameandpath,theme.mp3) + !Skin.HasSetting(MusicTheme)">Dialog.Close(all,true)</onload>
to...
xml:
<onload condition="[String.Contains(Player.Filenameandpath,theme.mp3) | !String.IsEmpty(Window(home).Property(PlayingOST))] + !Skin.HasSetting(MusicTheme)">Dialog.Close(all,true)</onload>
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#34
First post updated to prevent glitch in some skins when no theme.mp3 is present. See Edit 4 at the bottom...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#35
(2018-05-24, 10:01)manfeed Wrote: @Guilouz 

I have just checked your mod v2.9.9 with the latest nightly (24/05) and there's no problem for me (windows 64 bits). However I have noticed that the former visual glitch reappears when no theme.mp3 is present; to prevent this you could change the line in DialogBusy.xml from...
xml:
<onload condition="String.Contains(Player.Filenameandpath,theme.mp3) + !Skin.HasSetting(MusicTheme)">Dialog.Close(all,true)</onload>
to...
xml:
<onload condition="[String.Contains(Player.Filenameandpath,theme.mp3) | !String.IsEmpty(Window(home).Property(PlayingOST))] + !Skin.HasSetting(MusicTheme)">Dialog.Close(all,true)</onload>
 That change nothing.... I'm on OSX.

EDIT : Confirmed by other people on Android builds too.
 Estuary MOD V2 
Reply
#36
First post updated to prevent error messages when option 'Show parent folder items' is selected. See Edit 5 at the bottom...

I'd like to make clear some things though...

- My only aim is to help others sharing something that works for me and that allows to enjoy a feature that I missed a lot, but I don't say that this is the perfect solution for everybody; for me (windows-64 bits Leia Alpha nightlies) works well, I don't have other systems, so I don't know about them...

- The main advantage is that it doesn't require the use of additional addons. The main disadvantage is related to the limited options that the skinning engine offers, namely, it's not possible to check beforehand whether a theme.mp3 file exists or not, therefore even if a movie/tvshow doesn't have a theme.mp3 file in its folder this code tries to play that file anyway at least once; it this case an error is written in the kodi log. In my system this is the only shortcoming, but with other OS your mileage may vary...

- I'm the first one that don't like imperfect solutions, so I made a feature request some days ago in the forum to solve this once and for all (https://forum.kodi.tv/showthread.php?tid=332159), but it seems not to have arisen much interest (to be honest zero interest...), so we'll have to make do with this for the time being...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#37
@jurialmunkey 

  I love your skins ....
    I am currently using eminence in kodi 17, in an android box ....
    I'm looking for an alternative to tvtunes. Do you think it would work in your skin in the android box?

will no playback information be displayed?

    the ideal is not to display anything ... only the background audio ....


@manfeed 

  Thank you for sharing this solution !!
Reply
#38
I keep on trying to improve this, but to no avail... I have made another feature request https://forum.kodi.tv/showthread.php?tid=332612 that if granted could allow to use mp3/flac files and even to play more than one theme for each movie/tvshow.
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#39
I *think* now you're getting into realms of 'this is why we have python' to check for file rather than relying on XML.
It isn't up to the GUI (XML) to make decisions when a codebase exists.

If you want to make a python script, PM me, and we'll go from there.

The TVTheme (speeling) is banned because it *downloaded illegal content*.
Reply
#40
Personally, I really wanted to play my songs .... I can ... with the banned ... for him he sees the reproduction information does not get legal ...
I'm not something native, that does not exhibit anything ...
  Each one seeks his thema ... I do not think so will be banned ...
Reply
#41
I came across 2 problems by trying to implement this.

1:
when switching to another item , if theme exists or not, player seems pausing,
i get it solved to make this in custom_stop_soundtrack.xml
, wether it isnt supposed to, but its working for me
xml:

<!--
    <onload condition="Player.Playing">Pause</onload>
    -->
    <onload>Stop</onload>

2nd.
Music player try always to start, even when there isnt a file.
i tried some thing in the custom_start xml , but im not able to solve prevent start when (empty/equal/contains)


(he try to play theme, and i saw that total duration isnt " cleared" from last item wich had a theme)

my files
custom START
xml:

<window type="dialog" id="1355">
    <onload>Stop</onload>
    <onload condition="String.IsEmpty(Window(home).Property(PlayingOST)) + !String.Contains(ListItem.Path,http)">PlayMedia($ESCINFO[ListItem.Path,,theme.mp3])</onload>
    <onload>SetProperty(OST,$INFO[ListItem.Path],home)</onload>
    <onload>SetProperty(PlayingOST,True,home)</onload>
    <visible>System.IdleTime(2) + [!String.IsEqual(ListItem.Path,Window(home).Property(OST)) | !Player.Playing]</visible>
    <visible>!ListItem.IsCollection + !String.Contains(ListItem.Path,thumbSmile + !String.Contains(ListItem.Path,imageSmile + !String.Contains(ListItem.Path,plugin) + !String.Contains(ListItem.Path,videodbSmile</visible>
    <visible>Container.Content(movies) | [Container.Content(tvshows) + !Player.Playing] | [Container.Content(seasons) + !Player.Playing]</visible>
    <visible>!Window.IsActive(movieinformation)</visible>
    <visible>Window.IsActive(videos)</visible>
    <visible>!Player.HasVideo</visible>
    <visible>Skin.HasSetting(LibraryOSTthemes)</visible>
    <controls>
    </controls>
</window>

custom RID
xml:
<window type="dialog" id="1305">
    <onload>Stop</onload>
    <onload>ClearProperty(PlayingOST,Home)</onload>
    <visible>String.Contains(Player.Filenameandpath,theme.mp3) + [!Window.IsActive(videos) | String.IsEmpty(ListItem.Path) | ListItem.IsCollection]</visible>
    <visible>Skin.HasSetting(LibraryOSTthemes)</visible>
    <visible>!Player.HasVideo</visible>    
    <controls>
    </controls>
</window>

custum STOP
xml:

<window type="dialog" id="1255">
    <!--
    <onload condition="Player.Playing">Pause</onload>
    -->
    <onload>Stop</onload>
    <onload>ClearProperty(PlayingOST,Home)</onload>
    <visible>!String.IsEqual(ListItem.Path,Window(home).Property(OST))</visible>
    <visible>[Container.Content(movies) | Container.Content(tvshows)] + !Player.HasVideo </visible>
    <visible>!Window.IsActive(movieinformation)</visible>
    <visible>Skin.HasSetting(LibraryOSTthemes)</visible>
     <controls>
    </controls>
</window>

Custom Fullscreen Music
xml:

<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id="1118">
  <allowoverlay>no</allowoverlay>
  <onload condition="!Window.IsActive(visualisation) + !Window.IsActive(videos)">FullScreen</onload>
  <visible>Player.HasAudio + Skin.HasSetting(FullscreenMusic) + String.IsEmpty(Window(10025).Property(PlayingBackgroundMedia))</visible>
  <controls></controls>
</window>

Dialog Busy
mxl:

<onload condition="[String.Contains(Player.Filenameandpath,theme.mp3) | !String.IsEmpty(Window(home).Property(PlayingOST))] + Skin.HasSetting(LibraryOSTthemes)">Dialog.Close(all,true)</onload>
any help would be great.
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#42
(2018-06-27, 09:58)mardukL Wrote: I came across 2 problems by trying to implement this.

1: when switching to another item , if theme exists or not, player seems pausing...

2: music player try always to start, even when there isnt a file...
1. That is not a problem, is on purpose; pausing is much quicker than full stop, and that way you get seamless browsing. When it's time to start another theme then the player is told to full stop and start the new theme.

2. Unfortunately this is the drawback of this method, nothing can be done through xml to check whether a file exists or not. I already said it in the thread.
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#43
[Quote]
1. That is not a problem, is on purpose; pausing is much quicker than full stop, and that way you get seamless browsing. When it's time to start another theme then the player is told to full stop and start the new theme.

2. Unfortunately this is the drawback of this method, nothing can be done through xml to check whether a file exists or not. I already said it in the thread.
[/qoute]


thanks for quick response.

1. Ok, thats why is say, its working for me this way, cause i have some performance issues before.and couldnt open dialogs(context,menu)
(typo, i meant "whether it isnt intended" )

2. Have it overlooked, sorry.
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#44
Is it possible to do a simple loop? So if the theme is finished it starts over again?

At first I used the Playmedia-code in DialogVideoInfo.xml to play a theme, but yours is better because it also works while browsing series instead of only in the videoinfo-dialog.
Reply
#45
At some point during the development of the code I got the loop (theme would start to play again when finished) but that caused some unwanted side effects so I had to prevent that from happening. Sorry I can't give you more details, I just can't remember...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply

Logout Mark Read Team Forum Stats Members Help
TvTunes alternative for playing soundtracks when browsing2