Jumpy Plugin (26 October 2016)

Discuss third party additions, plugins and translations for Universal Media Server
sapsa
Posts: 59
Joined: Wed Nov 13, 2013 8:22 am

Re: Jumpy Plugin (26 February 2016)

Post by sapsa » Sun Jun 05, 2016 10:40 am

infidel wrote: One thing I did notice is that nakomori is setting its ListItem durations as 'TotalTime'

Code: Select all

liz.setProperty('TotalTime', str(extraData.get('duration')))
whereas jumpy is trying to read the 'Duration' key (per ListItem definition in kodi wiki).
sadly adding duration as 'Duration' and didnt resolve issue with missing lenght of epised n any of my reenders. i included logs for you. maybe you will be able to help me then or improve your jumpy
Attachments
ums_dbg.zip
(49.85 KiB) Downloaded 161 times
server: C2D [email protected] 3GB RAM
network: wired 1000MB/s
render: LG 55LM620S, Samsung LE40C650, PS3
OS: Linux 13.10 64bit

HT1
Posts: 122
Joined: Thu Mar 05, 2015 12:30 pm

Re: Jumpy Plugin (26 February 2016)

Post by HT1 » Sun Jun 05, 2016 12:22 pm

going back to my slow down problem, i installed ums 6.32 on an i7 and things went quickly, i didn't check but i'd say between 5 mins and 10 mins

that i5's windows 10 has been buggy since the start, it might be one of those too. its less responsive than my old Q9550 , and its 8 years old !

so i'll see if maybe formating will do something for it.
Win 10 64bits java 8
Qnap TS-212 2x3TB WD Red
Sony Bravia MN (my conf)

infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy Plugin (26 February 2016)

Post by infidel » Wed Jun 08, 2016 9:24 am

Thx for logs helps a lot ;).
sapsa wrote:sadly adding duration as 'Duration' and didnt resolve issue with missing lenght of epised n any of my reenders.
It's because jumpy is faking the infolabels. Made a preliminary stab at supporting them (insofar as ListItem anyway), so try the new development version.

sapsa wrote:xbmc.main.path in config file should point to kodi binary folder. Even with that option present the log file says different path.
I can't replicate your error or pinpoint the specific cause based on the logs, but I did note a possible flaw in the 'xbmc' resolution logic and overhauled the whole procedure in the development version, see if it helps.

sapsa wrote:
C:\WINDOWS\system32>fsutil 8dot3name query c:
The volume state is: 0 (8dot3 name creation is enabled).
The registry state is: 0 (Enable 8dot3 name creation on all volumes).

Based on the above two settings, 8dot3 name creation is enabled on c:
But Jumpy installer tells me that I have it disable (also I have only one drive C:)
According to your setup.log I'm guessing fsutil is complaining it isn't running as administrator:
Narz�dzie FSUTIL wymaga od u�ytkownika uprawnie� administracyjnych.
Even installing as admin there would still be a problem here since fsutil exit code is not dispositive and in order to get meaningful results the jumpy installer attempts to parse English output (such as you were kind enough to post for our benefit above :)). This approach of course would fail if output is Polish, but on the bright side it's only a warning :).

HT1
Posts: 122
Joined: Thu Mar 05, 2015 12:30 pm

Re: Jumpy Plugin (26 February 2016)

Post by HT1 » Wed Jun 08, 2016 11:20 am

Hi Infidel, can i give my humble opinion and a possible simple solution on the 8.3 problem ?

i don't see the need for the 8.3 check with fsutil or even the warning, it is a much too "low level system" thing to do.

Getting 8.3 paths is something your batch can handle all on its own, without FSUTIL to check if its even enabled, since Windows 2000, XP, and later.

A warning would be better utilized if it was about read/write permissions in the various folders you actually need.

The 8.3 path of folders and files is very easy to handle in batch files. You don't even need to know if the filesystem is set for short or long paths, you don't need fsutil.

Your batch file can request any short name from the OS directly since windows 2000. (without the use of the dir command, read on)
The OS will return it on demand and let you use it "in a virtual way" since windows 7 sp1 i believe.

Meaning the OS will handle the file requests as if asked on a real 8.3 file system.

ok so for the sake of fun, and who knows maybe it will do some good, let's see what we can do with this:

Path finding in batch files is done with the For command, for example, a simple "For /?" at the cmd line will show you all the options for this.
The substitution of the FOR variable references has been enhanced and you can now use the following optional syntax:
%~I expands %I removing any surrounding quotes (")
%~fI expands %I to a fully qualified path name
%~dI expands %I to a drive letter only
%~pI expands %I to a path only
%~nI expands %I to a file name only
%~xI expands %I to a file extension only
%~sI expanded path contains short names only
%~aI expands %I to file attributes of file
%~tI expands %I to date/time of file
%~zI - expands %I to size of file
These Batch commands can do the name finding for you.

For example, i use similar code to find a file's size and then do something with it, i modified it for short names:

Code: Select all

set longpath="C:\Program Files (x86)\Universal Media Server\plugins\jumpy\the tool's folder"

if not exist %longpath% call yourcreatelongpathprocedure %longpath%

rem "yourcreatelongpathprocedure" should handle any permission and other errors and return something to the screen and log file so the user can handle restarting ums in admin mode if needed or come to the forum for more help.

rem then use:
FOR %%I in (%longpath%) do set shortpath=%%~sI 
rem this ^^^  is the important bit to find short names.

rem then install tools with %shortpath%.
Check here for more info on the "For" command, http://www.computerhope.com/forhlp.htm

But you might be better served to find an updated set of tools, newer versions of the programs you're trying to install, in fact, most of the addons you install with jumpy aren't "installed" at all since they don't show up in the add/remove of control panel except for Kodi.

So in my humble opinion you only just need the tools themselves, not the installers. So if it were me, i'd extract the tools you need, bundle those in a zip file (except kodi) and upload that zip file to your favorite cloud server, like Dropbox, then download on the user's machine and extract in the jumpy folder at install.

Hope this helps, i don't want to overstep, but i do hope this simplifies your view of the 8.3 dilemma, it ain't no big thing, just call on the OS to tell you if the long path you want to write to exists and if it doesn't then create it and req the shortpath again before installing the tool.

cheers,
Win 10 64bits java 8
Qnap TS-212 2x3TB WD Red
Sony Bravia MN (my conf)

infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy Plugin (26 February 2016)

Post by infidel » Wed Jun 08, 2016 3:03 pm

Thanks for the suggestions HT1, and discourse/treatise on all things 'batch' :) .

The jumpy windows installer is actually just an insanely long batch file (see jumpy\setup\setup.bat), which already does things along the lines you talk about. The problem with windows shortpaths, e.g. %~s is that it isn't guaranteed to result in a short path. It will only yield a short path if 8dot3 was enabled at the time the given file/folder was created. So if a user turns off 8dot3 at some point, %~s will give long paths for those files that were created during the 'off' period.

Up to win7 8dot3 was enabled by default, so one could pretty much depend on %~s to work always. Recent windows versions have disabled it by default in the interests of efficiency, so it's come up as an issue with setup.bat for these newer versions (including with yourself, if I remember?), because %~s was actually giving long paths. That's why I added the fsutil check to setup.bat, just to generate a warning and highlight the issue in setup.log so we have some indication of the problem if it exists. fsutil isn't actually being used for any reason beyond that in the installer.

The jumpy installer (aka setup.bat) really only needs a working shortpath to the UMS program folder, which is why I advise those users whose systems have 8dot3 disabled to temporarily enable it manually using fsutil and generate the UMS shortpath, e.g. as described here.

sapsa
Posts: 59
Joined: Wed Nov 13, 2013 8:22 am

Re: Jumpy Plugin (26 February 2016)

Post by sapsa » Thu Jun 09, 2016 12:18 am

infidel wrote:Thx for logs helps a lot ;)
Version you included in link throw error when using it.
All logs include - something about JSON not being serialize ;-) you will probably know
Attachments
ums_dbg.zip
(39.84 KiB) Downloaded 125 times
server: C2D [email protected] 3GB RAM
network: wired 1000MB/s
render: LG 55LM620S, Samsung LE40C650, PS3
OS: Linux 13.10 64bit

infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy Plugin (26 February 2016)

Post by infidel » Thu Jun 09, 2016 9:24 am

sapsa wrote: you will probably know
Oops, I know now, anyway :). This is what happens when you can't test the intended use-case. Try version dev-160608.

HT1
Posts: 122
Joined: Thu Mar 05, 2015 12:30 pm

Re: Jumpy Plugin (26 February 2016)

Post by HT1 » Thu Jun 09, 2016 3:08 pm

infidel wrote:Thanks for the suggestions HT1, and discourse/treatise on all things 'batch' :) .
Likewise my friend :) , it's good to find some smart people who actually don't take offense when someone takes an interest in their baby. Who knows it may yield some interesting results if one tries to come up with a different way of achieving the same result. not everyone is a serious pro dev but people can still surprise you with what they come up on their own time.

i saw your batch, yes it is quite complexe, kudos on the work. i remember writing a big one back in my college days (but i did not inhale, lol)

it had an actual user interface with ansi escape codes back in the old dos days, for colors and borders and keyboard input by user for various options. At one point it was up over 20k and that was back in the days of windows 95/98. i had to reduce it but mostly it was huge due to the various interfaces it showed on screen according to user input.

it looked like the old dos Norton Utilities (which i used extensivelly to defrag my old rig, ah youth, no amount of defraging was ever going to make it faster lol), same colors and characters on screen as Norton. it called Speedisk and NDD with various command line switches and more tools, it was my main dos interface at one point, a personnal program library basically. it was a fun personnal project of mine to code it.
infidel wrote:The problem with windows shortpaths
yes, i digress... lol

Question: just so i'm clear on the issue, why exactly do you need short paths, don't the tools work with long paths if you put quotes around it ?

i'm sure anything programmed in the last 5 or 6 years has got to be able to handle long paths. Maybe there's another tool that does the same and handles long paths.
infidel wrote:, e.g. %~s is that it isn't guaranteed to result in a short path. It will only yield a short path if 8dot3 was enabled at the time the given file/folder was created. So if a user turns off 8dot3 at some point, %~s will give long paths for those files that were created during the 'off' period.
i just whiped up a small batch and checked my c: drive with fsutil:

Code: Select all

fsutil 8dot3name scan "C:\Program Files (x86)\Universal Media Server"

fsutil 8dot3name query c:

pause
Ran it as admin, and this is the result window if you need to see it.
fsutilanalyse.PNG
fsutilanalyse.PNG (25.77 KiB) Viewed 7260 times

Translating for you, basically the status i get for volume c: is 0 (8.3 creation is activated) and registry is 2 (default value, per volume). Are those the values you seek ?

Fsutil says after testing "According to the 2 values above, 8.3 creation will work on this volume".

i understand you need to know if the ums folder has an 8.3 path but the creation of 8.3 isn't turned off on my system, never has, yet i still get the yellow warning from your batch file when i install jumpy.

i didn't change any registry value pertaining to this setting, so yes like you said "if the user turns it off" i agree, but i didn't turn it off.

So i'm puzzled why i still see the 8.3 warning during install... Must be a lost in translation thing maybe, i seem to recall you mentioning it only works with english systems.

On that note, If you feel like expanding the setup's understanding of fsutil in other languages, i attached a text file containing the same results from the command line, notice the vowels with accents don't look right in the text file compared with the screenshot above. Taking this into account might help in detection of the fsutil values in french and maybe spanish systems if you use redirection operators in your batch file. it is in simple dos text, not unicode or utf-8.

Maybe some further testing needs to be done on win10 systems, it is still (relativelly) a new beast and M$ can change things at any point. But by all accounts fsutil gives a greenlight for 8.3 paths by default.

But if i may,i'd be willing to try a beta setup if you whip one up for this problem.

Cheers,
Attachments
shortpaths.txt
(702 Bytes) Downloaded 140 times
Win 10 64bits java 8
Qnap TS-212 2x3TB WD Red
Sony Bravia MN (my conf)

sapsa
Posts: 59
Joined: Wed Nov 13, 2013 8:22 am

Re: Jumpy Plugin (26 February 2016)

Post by sapsa » Thu Jun 09, 2016 5:43 pm

infidel wrote:
sapsa wrote: you will probably know
Oops, I know now, anyway :). This is what happens when you can't test the intended use-case. Try version dev-160608.
Now its better but playing video have null catch and wont play.
Attachments
ums_dbg.zip
(84.59 KiB) Downloaded 137 times
server: C2D [email protected] 3GB RAM
network: wired 1000MB/s
render: LG 55LM620S, Samsung LE40C650, PS3
OS: Linux 13.10 64bit

infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy Plugin (26 February 2016)

Post by infidel » Sat Jun 11, 2016 12:48 am

sapsa wrote:Now its better but playing video have null catch and wont play.
My bad, I didn't test in Windows, which is importing plain json as opposed to simplejson :), try dev-160610.

Post Reply