Export custom template - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116) +---- Forum: TinyMediaManager (https://forum.kodi.tv/forumdisplay.php?fid=204) +---- Thread: Export custom template (/showthread.php?tid=237697) Pages:
1
2
|
Export custom template - ShevAbam - 2015-09-03 Hello, I'm trying to create a template for exporting an XML of my movies. It works almost completely! Here is the list.jmte : Code: <?xml version="1.0" encoding="UTF-8"?> I have two problems: 1) ${movie.id} don't work. Well, not always! Here is the error log: Code: ERROR [main] o.t.u.movies.dialogs.MovieExporterDialog:171 - Error exporting movies: Error while parsing 'movie.id' at location (4:15): Property 'id' on object '...' can not be accessed: "java.lang.IllegalArgumentException: wrong number of arguments"! 2) The last block "<files>" don't work. If I remove all the block, the export works. When I'm debugging ${movie}, it seems correct but ${foreach movie.mediaFiles file} does not work (even movie.mediaFile). Any idea ? I have TMM v2.6.9 ; on Windows 7. Thanks for reading RE: Export custom template - mlaggner - 2015-09-05 1) movies.id contains a map of all known ids; I suppose you only want to take <tmdbId>${movie.tmdbId}</tmdbId> <imdbId>${movie.imdbId}</imdbId> 2) the block <file>${file.file}</file> seems a bit strange to me (MediaFile.file is an abstraction of the "real" file - what did you expect here? you already put the path & filename above..) RE: Export custom template - ShevAbam - 2015-09-05 1) Yes I already take tmdbId and imdbId. What I want is to recover the id generated by TMM. Sometimes, it works and I have it but this is rare... 2) Ok you're right but even if I remove the <file>${file.file}</file> block, it doesn't work :/ It works only when I delete ALL the <files> block. RE: Export custom template - mlaggner - 2015-09-06 just checked it at home (with the new development version) a) we do not have any internal ID, so there is no need to export it b) I saw a typo - it should be movie.trailer instead of movie.trailers (after changing that, the block with media files worked for me) but I saw we did some internal changes, which will affect all existing export templates - have to check that too RE: Export custom template - ShevAbam - 2015-09-06 1) Ok, however I had a number few times. Also, the export "ListExampleHtml" contains this : ShowDetails(det${movie.id}) And this export does not work For me, it's okay if I do not have ID, I will do otherwise 2) Thanks! It works now RE: Export custom template - myron - 2015-09-07 IIRC, movie.id was set by the scraper - the movie ID of that one site. We reworked that in latest development version (we store now all kinds of IDs, from various sites) But we don't have/maintain an internal TMM ID (we don't care) Export templates need a bit more testing.... already on our list stay tuned Feel free to test our nightly build (NOT on your productive movies!) RE: Export custom template - ShevAbam - 2015-09-08 Ok thank you. I will test the nightly build RE: Export custom template - ShevAbam - 2015-09-11 I forgot, is it planned to be able to launch an export from the command line? Example : tinyMediaManagerCMD.exe -export {export-name} {destination_folder} Also, why not give the possibility to export the new items. RE: Export custom template - mlaggner - 2015-09-13 a) good idea - will put it on our todo list b) well just exporting new items won't be a good idea; the export templates we have are only list and list/detail ones. Both are re-written on every export, so a "new item" export will only write the new items into the list and drop the old ones.. RE: Export custom template - ShevAbam - 2015-09-13 a) Nice b) Ok, you're right RE: Export custom template - Gaby Pozo - 2020-09-17 How can I put the file size in GB or Mb, and the file duration in Minutes? I use the following: Filesize {movie.runtimeFromMediaFiles} or {movie.mainVideoFile.filesize} Runtime {movie.runtimeFromMediaFiles} But with this configuration, when exporting it does it in Bytes and Seconds RE: Export custom template - arcticminer - 2020-09-17 (2020-09-17, 15:20)Gaby Pozo Wrote: How can I put the file size in GB or Mb, and the file duration in Minutes?I can tell you to put runtime in hrs and minutes the command line will beĀ {movie.mainVideoFile.durationHM} but I'm not sure of filesize yet RE: Export custom template - Gaby Pozo - 2020-09-17 That worked for me thanks, now it only remains to fix the filesize RE: Export custom template - tars - 2020-09-18 (2020-09-17, 15:20)Gaby Pozo Wrote: {movie.mainVideoFile.filesize} You could use "filesizeInMegabytes" in place of "filesize". RE: Export custom template - arcticminer - 2020-09-19 (2020-09-18, 12:39)tars Wrote:Is there a way to show it in Gigabytes? I tried {movie.mainVideoFile.filesizeInGigabytes} but that didn't work.(2020-09-17, 15:20)Gaby Pozo Wrote: {movie.mainVideoFile.filesize} |