Re: [vdr] [PLUGIN] recsearch - a simple search for recordings
Hi, Am 21.01.2014 21:31, schrieb Joerg Bornkessel: Hi, Thanks Lars, very usefull plugin :) some hints... can you please name your release tags with a proper name? i.e v0.2.2 vdr-recsearch-0.2.2.tar.gz this makes it more clear, if you mirror the files in the WWW The tar.gz is generated by GitHub. Of course I could prefix the version with recsearch-, but on other git-web-platforms these kind of tags looks weird, see http://projects.vdr-developer.org/git/vdr.git/tag/?id=vdr-2.0.5 Actually the pure version number is the best tag, since then it can be easily used with git-buildpackage, see the other godfather :) https://github.com/torvalds/linux/releases On my debian-branch I can just ran git-buildpackage -tc with the following gbp.conf (will add that to my git): [DEFAULT] upstream-branch = master debian-branch = debian [git-buildpackage] upstream-tag = v%(version)s Hm, writing this, of course I can configure git-buildpackage to recognize other version tags... should have omit the 'v'... :) in the untared package it should be named recsearch-0.0.2 For the yaVDR Launchpad PPA I use: git archive --format=tar.gz --prefix=vdr-plugin-recsearch-0.2.2/ --output=../vdr-plugin-recsearch_0.2.2.orig.tar.gz origin/master With this you can do whatever you need with the tarball. I know, there is no standard, but a closer look over the shoulder how the godfather KLS himself it does, should be a good orientation :) the 2 files last.conf searches.conf should be handled in the vdr cache dir, not in the vdr plugins dir? else as you can the templates easy handle by the plugins colored buttons on OSD I decided to use the config-dir, because cache-dir sounds a bit volatile (a good place for e.g. epg.data which can fully be rebuild) and the resource-dir should/may be read-only. And after all they are configuration files. anyway, this is crying on highest level ;) That's good. :) thanks I thank you for your comments. Lars. /dev/joerg ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] [PLUGIN] recsearch - a simple search for recordings
Hi, Thanks Lars, very usefull plugin :) some hints... can you please name your release tags with a proper name? i.e v0.2.2 vdr-recsearch-0.2.2.tar.gz this makes it more clear, if you mirror the files in the WWW in the untared package it should be named recsearch-0.0.2 I know, there is no standard, but a closer look over the shoulder how the godfather KLS himself it does, should be a good orientation :) the 2 files last.conf searches.conf should be handled in the vdr cache dir, not in the vdr plugins dir? else as you can the templates easy handle by the plugins colored buttons on OSD anyway, this is crying on highest level ;) thanks /dev/joerg -- Regards Gentoo Developer Joerg Bornkessel hd_bru...@gentoo.org ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] [PLUGIN] recsearch - a simple search for recordings
Am 19.01.2014 13:53, schrieb Stephan Loescher: Am 01/19/14 11:37, schrieb Lars Hanisch: here's the plugin, which uses it: recsearch [...] It's a simple search for name, shorttext and description, the status (new/edited) and age of a recording. The main reason for me was to get a quick list of the new recordings of the last week. Hi Lars, Wonderful! Would it be possible (as a new feature) to filter/search/sort for recordings by recording-lifetime and/or if it is SD or HD? sorting is done by recordings menu of vdr. No chance, that recsearch can add there an alternative sort mechanism (for now). lifetime is a property of cRecording, so yes, it's possible to add a filter for this. Neither cRecording nor cRecordingInfo provides anything so recsearch can decide, if it's SD or HD. Sorry, can't add something there... Regards, Lars. My use case is this: I normally like to view important and high-quality recordings first, which I typically sort manually in this order: 1. Lifetime (L) 99 and HD 2. L99 + SD 3. L98 + HD 4. L98 + SD 5. L98 + HD 6. L98 + SD Regards, Stephan. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] [PLUGIN] recsearch - a simple search for recordings
Am 19.01.2014 16:09, schrieb Carsten Koch: On 01/19/14 13:53, Stephan Loescher wrote: Would it be possible (as a new feature) to filter/search/sort for recordings by recording-lifetime and/or if it is SD or HD? I had the same problem (long time ago). As a simple solution, I wrote a small python script that creates folders with virtual recordings (symbolic links to the real recordings). The tool creates /video/Surround, /video/HD and /video/Surround+HD. Inside each of them there is the same subfolder structure as under /video, except that they contain only the corresponding subset. Here is the source: import os import shutil import sys video_dir = /video def linkto(root, name): components = [] for root_component in root.split('/')[2:]: components.append(root_component) if root_component.startswith('%'): break source = os.path.join(video_dir, '/'.join(components)) target = os.path.join(video_dir, name, '/'.join(components)) target_parent = os.path.join(video_dir, name, '/'.join(components[:-1])) if not os.path.exists(target_parent): os.makedirs(target_parent) os.symlink(source, target) for subdir in (Surround, HD, Surround+HD): path = os.path.join(video_dir, subdir) if os.path.exists(path): shutil.rmtree(path) os.mkdir(path) surround_dirs = [] hd_dirs = [] surround_hd_dirs = [] for root, dummy_dirs, files in os.walk(video_dir, followlinks=True): if '%' in root and (info in files or info.vdr in files): surround = False hd = False for line in open(os.path.join(root, info if info in files else info.vdr)): if line.startswith(X ): if 5.1 in line: surround = True elif high definition Video in line: hd = True Ah, the components of a recording. Have to look into it, maybe I can detect H.264/MPEG2 encodings. I'll add them to my TODO list. Regards, Lars. if surround: surround_dirs.append(root) if hd: hd_dirs.append(root) if surround and hd: surround_hd_dirs.append(root) for root in surround_dirs: linkto(root, Surround) for root in hd_dirs: linkto(root, HD) for root in surround_hd_dirs: linkto(root, Surround+HD) Cheers, Carsten. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] [PLUGIN] recsearch - a simple search for recordings
Am 01/19/14 11:37, schrieb Lars Hanisch: here's the plugin, which uses it: recsearch [...] It's a simple search for name, shorttext and description, the status (new/edited) and age of a recording. The main reason for me was to get a quick list of the new recordings of the last week. Hi Lars, Wonderful! Would it be possible (as a new feature) to filter/search/sort for recordings by recording-lifetime and/or if it is SD or HD? My use case is this: I normally like to view important and high-quality recordings first, which I typically sort manually in this order: 1. Lifetime (L) 99 and HD 2. L99 + SD 3. L98 + HD 4. L98 + SD 5. L98 + HD 6. L98 + SD Regards, Stephan. -- loesc...@gmx.de http://www.loescher-online.de/ ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] [PLUGIN] recsearch - a simple search for recordings
On 01/19/14 13:53, Stephan Loescher wrote: Would it be possible (as a new feature) to filter/search/sort for recordings by recording-lifetime and/or if it is SD or HD? I had the same problem (long time ago). As a simple solution, I wrote a small python script that creates folders with virtual recordings (symbolic links to the real recordings). The tool creates /video/Surround, /video/HD and /video/Surround+HD. Inside each of them there is the same subfolder structure as under /video, except that they contain only the corresponding subset. Here is the source: import os import shutil import sys video_dir = /video def linkto(root, name): components = [] for root_component in root.split('/')[2:]: components.append(root_component) if root_component.startswith('%'): break source = os.path.join(video_dir, '/'.join(components)) target = os.path.join(video_dir, name, '/'.join(components)) target_parent = os.path.join(video_dir, name, '/'.join(components[:-1])) if not os.path.exists(target_parent): os.makedirs(target_parent) os.symlink(source, target) for subdir in (Surround, HD, Surround+HD): path = os.path.join(video_dir, subdir) if os.path.exists(path): shutil.rmtree(path) os.mkdir(path) surround_dirs = [] hd_dirs = [] surround_hd_dirs = [] for root, dummy_dirs, files in os.walk(video_dir, followlinks=True): if '%' in root and (info in files or info.vdr in files): surround = False hd = False for line in open(os.path.join(root, info if info in files else info.vdr)): if line.startswith(X ): if 5.1 in line: surround = True elif high definition Video in line: hd = True if surround: surround_dirs.append(root) if hd: hd_dirs.append(root) if surround and hd: surround_hd_dirs.append(root) for root in surround_dirs: linkto(root, Surround) for root in hd_dirs: linkto(root, HD) for root in surround_hd_dirs: linkto(root, Surround+HD) Cheers, Carsten. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr